diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md index 2d8837938fff..30b1b4ffbb97 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.8 (Unreleased) +## 1.0.0-beta.1 (2024-04-08) + +- Azure Resource Manager ContainerAppsApi client library for Java. This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions extension resource. Package tag package-preview-2024-02. 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 59a801fc4d04..7867a4afb7f2 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-2023-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. Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions extension resource. Package tag package-preview-2024-02. 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.7 + 1.0.0-beta.8 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md index bb9e2e0bf3b2..4eec80b100b4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md @@ -102,6 +102,15 @@ - [Get](#containerappsauthconfigs_get) - [ListByContainerApp](#containerappsauthconfigs_listbycontainerapp) +## ContainerAppsBuilds + +- [Delete](#containerappsbuilds_delete) +- [Get](#containerappsbuilds_get) + +## ContainerAppsBuildsByContainerApp + +- [List](#containerappsbuildsbycontainerapp_list) + ## ContainerAppsDiagnostics - [GetDetector](#containerappsdiagnostics_getdetector) @@ -110,6 +119,14 @@ - [ListDetectors](#containerappsdiagnostics_listdetectors) - [ListRevisions](#containerappsdiagnostics_listrevisions) +## ContainerAppsPatches + +- [Apply](#containerappspatches_apply) +- [Delete](#containerappspatches_delete) +- [Get](#containerappspatches_get) +- [ListByContainerApp](#containerappspatches_listbycontainerapp) +- [SkipConfigure](#containerappspatches_skipconfigure) + ## ContainerAppsRevisionReplicas - [GetReplica](#containerappsrevisionreplicas_getreplica) @@ -160,6 +177,10 @@ - [List](#dotnetcomponents_list) - [Update](#dotnetcomponents_update) +## FunctionsExtension + +- [InvokeFunctionsHost](#functionsextension_invokefunctionshost) + ## JavaComponents - [CreateOrUpdate](#javacomponents_createorupdate) @@ -261,7 +282,7 @@ import java.util.Arrays; public final class AppResiliencyCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_CreateOrUpdate + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_CreateOrUpdate * .json */ /** @@ -298,7 +319,7 @@ public final class AppResiliencyCreateOrUpdateSamples { public final class AppResiliencyDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_Delete.json */ /** * Sample code: Delete App Resiliency. @@ -321,7 +342,7 @@ public final class AppResiliencyDeleteSamples { public final class AppResiliencyGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_Get.json */ /** * Sample code: Get App Resiliency. @@ -344,7 +365,7 @@ public final class AppResiliencyGetSamples { public final class AppResiliencyListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_List.json */ /** * Sample code: List App Resiliency. @@ -369,7 +390,7 @@ import com.azure.resourcemanager.appcontainers.models.TimeoutPolicy; public final class AppResiliencyUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_Patch.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_Patch.json */ /** * Sample code: Update App Resiliency. @@ -395,7 +416,7 @@ public final class AppResiliencyUpdateSamples { */ public final class AvailableWorkloadProfilesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * AvailableWorkloadProfiles_Get.json */ /** @@ -418,7 +439,7 @@ public final class AvailableWorkloadProfilesGetSamples { public final class BillingMetersGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/BillingMeters_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/BillingMeters_Get.json */ /** * Sample code: BillingMeters_Get. @@ -440,7 +461,7 @@ public final class BillingMetersGetSamples { public final class BuildAuthTokenListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_ListAuthToken.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_ListAuthToken.json */ /** * Sample code: Get Build Auth Token. @@ -470,7 +491,7 @@ import java.util.Map; public final class BuildersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_CreateOrUpdate.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_CreateOrUpdate.json */ /** * Sample code: Builders_CreateOrUpdate_0. @@ -519,7 +540,7 @@ public final class BuildersCreateOrUpdateSamples { public final class BuildersDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_Delete.json */ /** * Sample code: Builders_Delete_0. @@ -541,7 +562,7 @@ public final class BuildersDeleteSamples { public final class BuildersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_Get.json */ /** * Sample code: Builders_Get_0. @@ -563,7 +584,7 @@ public final class BuildersGetByResourceGroupSamples { public final class BuildersListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_ListBySubscription. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_ListBySubscription. * json */ /** @@ -587,7 +608,7 @@ public final class BuildersListSamples { public final class BuildersListByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_ListByResourceGroup + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_ListByResourceGroup * .json */ /** @@ -615,7 +636,7 @@ import java.util.Map; public final class BuildersUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_Update.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_Update.json */ /** * Sample code: Builders_Update_0. @@ -658,7 +679,7 @@ import java.util.Arrays; public final class BuildsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_CreateOrUpdate.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_CreateOrUpdate.json */ /** * Sample code: Builds_CreateOrUpdate_WithConfig. @@ -689,7 +710,7 @@ public final class BuildsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * Builds_CreateOrUpdate_NoConfig.json */ /** @@ -713,7 +734,7 @@ public final class BuildsCreateOrUpdateSamples { public final class BuildsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_Delete.json */ /** * Sample code: Builds_Delete_0. @@ -735,7 +756,7 @@ public final class BuildsDeleteSamples { public final class BuildsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_Get.json */ /** * Sample code: Builds_Get_0. @@ -757,7 +778,7 @@ public final class BuildsGetSamples { public final class BuildsByBuilderResourceListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_ListByBuilderResource + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_ListByBuilderResource * .json */ /** @@ -785,7 +806,7 @@ import com.azure.resourcemanager.appcontainers.models.CertificateType; */ public final class CertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * Certificate_CreateOrUpdate_FromKeyVault.json */ /** @@ -806,7 +827,7 @@ public final class CertificatesCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Certificate_CreateOrUpdate. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificate_CreateOrUpdate. * json */ /** @@ -834,7 +855,7 @@ public final class CertificatesCreateOrUpdateSamples { public final class CertificatesDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Certificate_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificate_Delete.json */ /** * Sample code: Delete Certificate. @@ -857,7 +878,7 @@ public final class CertificatesDeleteSamples { public final class CertificatesGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Certificate_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificate_Get.json */ /** * Sample code: Get Certificate. @@ -879,7 +900,7 @@ public final class CertificatesGetSamples { */ public final class CertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * Certificates_ListByManagedEnvironment.json */ /** @@ -907,7 +928,7 @@ import java.util.Map; public final class CertificatesUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Certificates_Patch.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificates_Patch.json */ /** * Sample code: Patch Certificate. @@ -944,7 +965,7 @@ import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReque */ public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsCertificates_CheckNameAvailability.json */ /** @@ -972,7 +993,7 @@ import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; */ public final class ConnectedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironments_CreateOrUpdate.json */ /** @@ -1001,7 +1022,7 @@ public final class ConnectedEnvironmentsCreateOrUpdateSamples { public final class ConnectedEnvironmentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironments_Delete + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironments_Delete * .json */ /** @@ -1025,7 +1046,7 @@ public final class ConnectedEnvironmentsDeleteSamples { public final class ConnectedEnvironmentsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironments_Get. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironments_Get. * json */ /** @@ -1049,7 +1070,7 @@ public final class ConnectedEnvironmentsGetByResourceGroupSamples { */ public final class ConnectedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironments_ListBySubscription.json */ /** @@ -1072,7 +1093,7 @@ public final class ConnectedEnvironmentsListSamples { */ public final class ConnectedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironments_ListByResourceGroup.json */ /** @@ -1096,7 +1117,7 @@ public final class ConnectedEnvironmentsListByResourceGroupSamples { public final class ConnectedEnvironmentsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironments_Patch. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironments_Patch. * json */ /** @@ -1121,7 +1142,7 @@ import com.azure.resourcemanager.appcontainers.models.CertificateProperties; */ public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsCertificate_CreateOrUpdate.json */ /** @@ -1148,7 +1169,7 @@ public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { */ public final class ConnectedEnvironmentsCertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsCertificate_Delete.json */ /** @@ -1171,7 +1192,7 @@ public final class ConnectedEnvironmentsCertificatesDeleteSamples { */ public final class ConnectedEnvironmentsCertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsCertificate_Get.json */ /** @@ -1194,7 +1215,7 @@ public final class ConnectedEnvironmentsCertificatesGetSamples { */ public final class ConnectedEnvironmentsCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json */ /** @@ -1222,7 +1243,7 @@ import java.util.Map; */ public final class ConnectedEnvironmentsCertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsCertificates_Patch.json */ /** @@ -1264,7 +1285,7 @@ import java.util.Arrays; */ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json */ /** @@ -1300,7 +1321,7 @@ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { */ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsDaprComponents_Delete.json */ /** @@ -1323,7 +1344,7 @@ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { */ public final class ConnectedEnvironmentsDaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsDaprComponents_Get.json */ /** @@ -1346,7 +1367,7 @@ public final class ConnectedEnvironmentsDaprComponentsGetSamples { */ public final class ConnectedEnvironmentsDaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsDaprComponents_List.json */ /** @@ -1369,7 +1390,7 @@ public final class ConnectedEnvironmentsDaprComponentsListSamples { */ public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsDaprComponents_ListSecrets.json */ /** @@ -1397,7 +1418,7 @@ import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorag */ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsStorages_CreateOrUpdate.json */ /** @@ -1425,7 +1446,7 @@ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { */ public final class ConnectedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsStorages_Delete.json */ /** @@ -1449,7 +1470,7 @@ public final class ConnectedEnvironmentsStoragesDeleteSamples { */ public final class ConnectedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsStorages_Get.json */ /** @@ -1473,7 +1494,7 @@ public final class ConnectedEnvironmentsStoragesGetSamples { */ public final class ConnectedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsStorages_List.json */ /** @@ -1493,6 +1514,7 @@ public final class ConnectedEnvironmentsStoragesListSamples { ```java import com.azure.resourcemanager.appcontainers.models.Action; +import com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode; import com.azure.resourcemanager.appcontainers.models.Affinity; import com.azure.resourcemanager.appcontainers.models.AppProtocol; import com.azure.resourcemanager.appcontainers.models.BindingType; @@ -1502,6 +1524,7 @@ import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; +import com.azure.resourcemanager.appcontainers.models.ContainerAppPropertiesPatchingConfiguration; import com.azure.resourcemanager.appcontainers.models.ContainerResources; import com.azure.resourcemanager.appcontainers.models.CorsPolicy; import com.azure.resourcemanager.appcontainers.models.CustomDomain; @@ -1509,6 +1532,7 @@ import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; import com.azure.resourcemanager.appcontainers.models.Dapr; import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; +import com.azure.resourcemanager.appcontainers.models.ImageType; import com.azure.resourcemanager.appcontainers.models.Ingress; import com.azure.resourcemanager.appcontainers.models.IngressClientCertificateMode; import com.azure.resourcemanager.appcontainers.models.IngressPortMapping; @@ -1516,7 +1540,16 @@ import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; import com.azure.resourcemanager.appcontainers.models.InitContainer; import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; +import com.azure.resourcemanager.appcontainers.models.Kind; +import com.azure.resourcemanager.appcontainers.models.Level; import com.azure.resourcemanager.appcontainers.models.LogLevel; +import com.azure.resourcemanager.appcontainers.models.LoggerSetting; +import com.azure.resourcemanager.appcontainers.models.PatchingMode; +import com.azure.resourcemanager.appcontainers.models.Runtime; +import com.azure.resourcemanager.appcontainers.models.RuntimeDotnet; +import com.azure.resourcemanager.appcontainers.models.RuntimeJava; +import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgent; +import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgentLogging; import com.azure.resourcemanager.appcontainers.models.Scale; import com.azure.resourcemanager.appcontainers.models.ScaleRule; import com.azure.resourcemanager.appcontainers.models.Service; @@ -1537,7 +1570,93 @@ import java.util.Map; */ public final class ContainerAppsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerApps_SourceToCloudApp_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update SourceToCloud App. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + createOrUpdateSourceToCloudApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().define("testcontainerApp0").withRegion("East US").withExistingResourceGroup("rg") + .withEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") + .withWorkloadProfileName("My-GP-01") + .withPatchingConfiguration(new ContainerAppPropertiesPatchingConfiguration() + .withPatchingMode(PatchingMode.AUTOMATIC)) + .withConfiguration( + new Configuration() + .withIngress(new Ingress().withExternal(true).withTargetPort(3000) + .withTraffic(Arrays + .asList(new TrafficWeight().withRevisionName("testcontainerApp0-ab1234").withWeight(100) + .withLabel("production"))) + .withCustomDomains(Arrays.asList(new CustomDomain() + .withName("www.my-name.com").withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), + new CustomDomain().withName("www.my-other-name.com").withBindingType( + BindingType.SNI_ENABLED).withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions(Arrays + .asList(new IpSecurityRestrictionRule().withName("Allow work IP A subnet") + .withDescription("Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/32").withAction(Action.ALLOW), + new IpSecurityRestrictionRule() + .withName("Allow work IP B subnet").withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/8").withAction(Action.ALLOW))) + .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY)) + .withClientCertificateMode(IngressClientCertificateMode.ACCEPT).withCorsPolicy(new CorsPolicy() + .withAllowedOrigins(Arrays.asList("https://a.test.com", "https://b.test.com")) + .withAllowedMethods(Arrays.asList("GET", "POST")).withAllowedHeaders( + Arrays.asList("HEADER1", "HEADER2")) + .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")).withMaxAge(1234) + .withAllowCredentials(true)) + .withAdditionalPortMappings( + Arrays.asList(new IngressPortMapping().withExternal(true).withTargetPort(1234), + new IngressPortMapping().withExternal(false).withTargetPort(2345) + .withExposedPort(3456)))) + .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000) + .withHttpReadBufferSize(30).withHttpMaxRequestSize(10).withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withMaxInactiveRevisions(10).withService(new Service().withType("redis"))) + .withTemplate(new Template() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") + .withName("testinitcontainerApp0").withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers(Arrays.asList( + new Container().withImage("").withImageType(ImageType.CLOUD_BUILD).withName("testcontainerApp0") + .withVolumeMounts(Arrays.asList( + new VolumeMount().withVolumeName("azurefile").withMountPath("/mnt/path1") + .withSubPath("subPath1"), + new VolumeMount().withVolumeName("nfsazurefile").withMountPath("/mnt/path2") + .withSubPath("subPath2"))) + .withProbes(Arrays.asList(new ContainerAppProbe() + .withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() + .withName("Custom-Header").withValue("Awesome"))) + .withPath("/health").withPort(8080)) + .withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) + .withScale(new Scale().withMinReplicas(1).withMaxReplicas(5) + .withRules(Arrays.asList(new ScaleRule().withName("httpscalingrule").withCustom( + new CustomScaleRule().withType("http").withMetadata(mapOf("concurrentRequests", "50")))))) + .withVolumes(Arrays.asList( + new Volume().withName("azurefile").withStorageType(StorageType.AZURE_FILE) + .withStorageName("storage"), + new Volume().withName("nfsazurefile").withStorageType(StorageType.NFS_AZURE_FILE) + .withStorageName("nfsStorage"))) + .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService") + .withName("redisService").withClientType("dotnet") + .withCustomizedKeys(mapOf("DesiredKey", "fakeTokenPlaceholder"))))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ContainerApps_CreateOrUpdate_ConnectedEnvironment.json */ /** @@ -1579,11 +1698,15 @@ public final class ContainerAppsCreateOrUpdateSamples { .withAdditionalPortMappings( Arrays.asList(new IngressPortMapping().withExternal(true).withTargetPort(1234), new IngressPortMapping().withExternal(false).withTargetPort(2345).withExposedPort(3456)))) - .withDapr( - new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000) - .withHttpReadBufferSize(30).withHttpMaxRequestSize(10).withLogLevel( - LogLevel.DEBUG) - .withEnableApiLogging(true)) + .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000) + .withHttpReadBufferSize(30).withHttpMaxRequestSize(10).withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withRuntime(new Runtime() + .withJava(new RuntimeJava().withEnableMetrics(true) + .withJavaAgent(new RuntimeJavaAgent().withEnabled(true) + .withLogging(new RuntimeJavaAgentLogging().withLoggerSettings(Arrays.asList( + new LoggerSetting().withLogger("org.springframework.boot").withLevel(Level.DEBUG)))))) + .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) .withMaxInactiveRevisions(10)) .withTemplate(new Template() .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") @@ -1607,7 +1730,7 @@ public final class ContainerAppsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_CreateOrUpdate + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_CreateOrUpdate * .json */ /** @@ -1651,42 +1774,59 @@ public final class ContainerAppsCreateOrUpdateSamples { .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000) .withHttpReadBufferSize(30).withHttpMaxRequestSize(10).withLogLevel(LogLevel.DEBUG) .withEnableApiLogging(true)) + .withRuntime(new Runtime().withJava(new RuntimeJava().withEnableMetrics(true) + .withJavaAgent(new RuntimeJavaAgent().withEnabled(true) + .withLogging(new RuntimeJavaAgentLogging().withLoggerSettings(Arrays.asList(new LoggerSetting() + .withLogger("org.springframework.boot").withLevel(Level.DEBUG)))))) + .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) .withMaxInactiveRevisions(10).withService(new Service().withType("redis"))) - .withTemplate(new Template() - .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") - .withName("testinitcontainerApp0").withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers( - Arrays.asList(new Container().withImage("repo/testcontainerApp0:v1").withName("testcontainerApp0") - .withVolumeMounts(Arrays.asList( - new VolumeMount().withVolumeName("azurefile").withMountPath("/mnt/path1") - .withSubPath("subPath1"), - new VolumeMount().withVolumeName("nfsazurefile").withMountPath("/mnt/path2") - .withSubPath("subPath2"))) - .withProbes(Arrays.asList(new ContainerAppProbe() - .withHttpGet(new ContainerAppProbeHttpGet() - .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header").withValue("Awesome"))) - .withPath("/health").withPort(8080)) - .withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) - .withScale(new Scale().withMinReplicas(1).withMaxReplicas(5) - .withRules(Arrays.asList(new ScaleRule().withName("httpscalingrule").withCustom( - new CustomScaleRule().withType("http").withMetadata(mapOf("concurrentRequests", "50")))))) - .withVolumes(Arrays.asList( - new Volume().withName("azurefile").withStorageType(StorageType.AZURE_FILE) - .withStorageName("storage"), - new Volume().withName("nfsazurefile").withStorageType(StorageType.NFS_AZURE_FILE) - .withStorageName("nfsStorage"))) - .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService") - .withName("redisService").withClientType("dotnet") - .withCustomizedKeys(mapOf("DesiredKey", "fakeTokenPlaceholder"))))) + .withTemplate( + new Template() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") + .withName("testinitcontainerApp0").withCommand(Arrays.asList("/bin/sh")).withArgs(Arrays.asList( + "-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers( + Arrays + .asList( + new Container().withImage("repo/testcontainerApp0:v1").withName("testcontainerApp0") + .withVolumeMounts( + Arrays.asList( + new VolumeMount().withVolumeName("azurefile").withMountPath( + "/mnt/path1").withSubPath("subPath1"), + new VolumeMount().withVolumeName("nfsazurefile").withMountPath( + "/mnt/path2").withSubPath( + "subPath2"))) + .withProbes(Arrays.asList(new ContainerAppProbe() + .withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() + .withName("Custom-Header").withValue("Awesome"))) + .withPath("/health").withPort(8080)) + .withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) + .withScale(new Scale().withMinReplicas(1).withMaxReplicas(5).withRules(Arrays.asList(new ScaleRule() + .withName("httpscalingrule") + .withCustom( + new CustomScaleRule().withType("http").withMetadata(mapOf("concurrentRequests", "50"))), + new ScaleRule().withName("servicebus").withCustom(new CustomScaleRule() + .withType("azure-servicebus") + .withMetadata( + mapOf("messageCount", "5", "namespace", "mynamespace", "queueName", "myqueue")) + .withIdentity( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity"))))) + .withVolumes(Arrays.asList( + new Volume().withName("azurefile").withStorageType(StorageType.AZURE_FILE) + .withStorageName("storage"), + new Volume().withName("nfsazurefile").withStorageType(StorageType.NFS_AZURE_FILE) + .withStorageName("nfsStorage"))) + .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService") + .withName("redisService").withClientType("dotnet") + .withCustomizedKeys(mapOf("DesiredKey", "fakeTokenPlaceholder"))))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ContainerApps_TcpApp_CreateOrUpdate.json */ /** @@ -1723,7 +1863,33 @@ public final class ContainerAppsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerApps_Kind_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update App Kind. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateAppKind(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().define("testcontainerAppKind").withRegion("East Us").withExistingResourceGroup("rg") + .withManagedBy( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Web/sites/testcontainerAppKind") + .withKind(Kind.WORKFLOWAPP) + .withManagedEnvironmentId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/testmanagedenv3") + .withConfiguration(new Configuration().withActiveRevisionsMode(ActiveRevisionsMode.SINGLE) + .withIngress(new Ingress().withExternal(true).withTargetPort(80).withAllowInsecure(true))) + .withTemplate(new Template() + .withContainers(Arrays + .asList(new Container().withImage("default/logicapps-base:latest").withName("logicapps-container") + .withResources(new ContainerResources().withCpu(1.0D).withMemory("2.0Gi")))) + .withScale(new Scale().withMinReplicas(1).withMaxReplicas(30))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ContainerApps_ManagedBy_CreateOrUpdate.json */ /** @@ -1783,7 +1949,7 @@ public final class ContainerAppsCreateOrUpdateSamples { public final class ContainerAppsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Delete.json */ /** * Sample code: Delete Container App. @@ -1805,7 +1971,7 @@ public final class ContainerAppsDeleteSamples { public final class ContainerAppsGetAuthTokenSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_GetAuthToken. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_GetAuthToken. * json */ /** @@ -1829,7 +1995,7 @@ public final class ContainerAppsGetAuthTokenSamples { public final class ContainerAppsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. @@ -1851,7 +2017,7 @@ public final class ContainerAppsGetByResourceGroupSamples { */ public final class ContainerAppsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ContainerApps_ListBySubscription.json */ /** @@ -1874,7 +2040,7 @@ public final class ContainerAppsListSamples { */ public final class ContainerAppsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ContainerApps_ListByResourceGroup.json */ /** @@ -1897,7 +2063,7 @@ public final class ContainerAppsListByResourceGroupSamples { */ public final class ContainerAppsListCustomHostnameAnalysisSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ContainerApps_ListCustomHostNameAnalysis.json */ /** @@ -1921,7 +2087,7 @@ public final class ContainerAppsListCustomHostnameAnalysisSamples { public final class ContainerAppsListSecretsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_ListSecrets. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_ListSecrets. * json */ /** @@ -1945,7 +2111,7 @@ public final class ContainerAppsListSecretsSamples { public final class ContainerAppsStartSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Start.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Start.json */ /** * Sample code: Start Container App. @@ -1967,7 +2133,7 @@ public final class ContainerAppsStartSamples { public final class ContainerAppsStopSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Stop.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Stop.json */ /** * Sample code: Stop Container App. @@ -2001,7 +2167,14 @@ import com.azure.resourcemanager.appcontainers.models.Ingress; import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; import com.azure.resourcemanager.appcontainers.models.InitContainer; import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; +import com.azure.resourcemanager.appcontainers.models.Level; import com.azure.resourcemanager.appcontainers.models.LogLevel; +import com.azure.resourcemanager.appcontainers.models.LoggerSetting; +import com.azure.resourcemanager.appcontainers.models.Runtime; +import com.azure.resourcemanager.appcontainers.models.RuntimeDotnet; +import com.azure.resourcemanager.appcontainers.models.RuntimeJava; +import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgent; +import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgentLogging; import com.azure.resourcemanager.appcontainers.models.Scale; import com.azure.resourcemanager.appcontainers.models.ScaleRule; import com.azure.resourcemanager.appcontainers.models.Service; @@ -2019,7 +2192,7 @@ import java.util.Map; public final class ContainerAppsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Patch.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Patch.json */ /** * Sample code: Patch Container App. @@ -2052,6 +2225,12 @@ public final class ContainerAppsUpdateSamples { .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000) .withHttpReadBufferSize(30).withHttpMaxRequestSize(10).withLogLevel(LogLevel.DEBUG) .withEnableApiLogging(true)) + .withRuntime(new Runtime() + .withJava(new RuntimeJava().withEnableMetrics(true) + .withJavaAgent(new RuntimeJavaAgent().withEnabled(true) + .withLogging(new RuntimeJavaAgentLogging().withLoggerSettings(Arrays.asList( + new LoggerSetting().withLogger("org.springframework.boot").withLevel(Level.DEBUG)))))) + .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) .withMaxInactiveRevisions(10).withService(new Service().withType("redis"))) .withTemplate( new Template() @@ -2106,7 +2285,7 @@ import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActio public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AuthConfigs_CreateOrUpdate. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AuthConfigs_CreateOrUpdate. * json */ /** @@ -2140,7 +2319,7 @@ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { public final class ContainerAppsAuthConfigsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AuthConfigs_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AuthConfigs_Delete.json */ /** * Sample code: Delete Container App AuthConfig. @@ -2164,7 +2343,7 @@ public final class ContainerAppsAuthConfigsDeleteSamples { public final class ContainerAppsAuthConfigsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AuthConfigs_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AuthConfigs_Get.json */ /** * Sample code: Get Container App's AuthConfig. @@ -2188,7 +2367,7 @@ public final class ContainerAppsAuthConfigsGetSamples { public final class ContainerAppsAuthConfigsListByContainerAppSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AuthConfigs_ListByContainer. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AuthConfigs_ListByContainer. * json */ /** @@ -2204,6 +2383,76 @@ public final class ContainerAppsAuthConfigsListByContainerAppSamples { } ``` +### ContainerAppsBuilds_Delete + +```java +/** + * Samples for ContainerAppsBuilds Delete. + */ +public final class ContainerAppsBuildsDeleteSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsBuilds_Delete. + * json + */ + /** + * Sample code: ContainerAppsBuilds_Delete_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + containerAppsBuildsDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsBuilds().delete("rg", "testCapp", "testBuild", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsBuilds_Get + +```java +/** + * Samples for ContainerAppsBuilds Get. + */ +public final class ContainerAppsBuildsGetSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsBuilds_Get.json + */ + /** + * Sample code: ContainerAppsBuilds_Get_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + containerAppsBuildsGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsBuilds().getWithResponse("rg", "testCapp", "testBuild", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsBuildsByContainerApp_List + +```java +/** + * Samples for ContainerAppsBuildsByContainerApp List. + */ +public final class ContainerAppsBuildsByContainerAppListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerAppsBuilds_ListByContainerApp.json + */ + /** + * Sample code: ContainerAppsBuilds_ListByContainerApp_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void containerAppsBuildsListByContainerApp0( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsBuildsByContainerApps().list("rg", "testCapp", com.azure.core.util.Context.NONE); + } +} +``` + ### ContainerAppsDiagnostics_GetDetector ```java @@ -2213,7 +2462,7 @@ public final class ContainerAppsAuthConfigsListByContainerAppSamples { public final class ContainerAppsDiagnosticsGetDetectorSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerAppsDiagnostics_Get + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsDiagnostics_Get * .json */ /** @@ -2238,7 +2487,7 @@ public final class ContainerAppsDiagnosticsGetDetectorSamples { public final class ContainerAppsDiagnosticsGetRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. @@ -2262,7 +2511,7 @@ public final class ContainerAppsDiagnosticsGetRevisionSamples { public final class ContainerAppsDiagnosticsGetRootSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. @@ -2284,7 +2533,7 @@ public final class ContainerAppsDiagnosticsGetRootSamples { */ public final class ContainerAppsDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ContainerAppsDiagnostics_List.json */ /** @@ -2309,7 +2558,7 @@ public final class ContainerAppsDiagnosticsListDetectorsSamples { public final class ContainerAppsDiagnosticsListRevisionsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. @@ -2324,6 +2573,128 @@ public final class ContainerAppsDiagnosticsListRevisionsSamples { } ``` +### ContainerAppsPatches_Apply + +```java +/** + * Samples for ContainerAppsPatches Apply. + */ +public final class ContainerAppsPatchesApplySamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsPatches_Apply. + * json + */ + /** + * Sample code: ContainerAppsPatches_Apply_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + containerAppsPatchesApply0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsPatches().apply("rg", "test-app", "testPatch-25fe4b", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsPatches_Delete + +```java +/** + * Samples for ContainerAppsPatches Delete. + */ +public final class ContainerAppsPatchesDeleteSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsPatches_Delete. + * json + */ + /** + * Sample code: ContainerAppsPatches_Delete_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + containerAppsPatchesDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsPatches().delete("rg", "test-app", "testPatch-25fe4b", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsPatches_Get + +```java +/** + * Samples for ContainerAppsPatches Get. + */ +public final class ContainerAppsPatchesGetSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsPatches_Get. + * json + */ + /** + * Sample code: ContainerAppsPatches_Get_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + containerAppsPatchesGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsPatches().getWithResponse("rg", "test-app", "testPatch-25fe4b", + com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsPatches_ListByContainerApp + +```java +/** + * Samples for ContainerAppsPatches ListByContainerApp. + */ +public final class ContainerAppsPatchesListByContainerAppSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerAppsPatches_ListByContainerApp.json + */ + /** + * Sample code: ContainerAppsPatches_ListByContainerApp_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void containerAppsPatchesListByContainerApp0( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsPatches().listByContainerApp("rg", "test-app", null, com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsPatches_SkipConfigure + +```java +import com.azure.resourcemanager.appcontainers.models.PatchSkipConfig; + +/** + * Samples for ContainerAppsPatches SkipConfigure. + */ +public final class ContainerAppsPatchesSkipConfigureSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerAppsPatches_Skip_Configure.json + */ + /** + * Sample code: ContainerAppsPatches_Skip_Configure_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + containerAppsPatchesSkipConfigure0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsPatches().skipConfigure("rg", "test-app", "testPatch-25fe4b", + new PatchSkipConfig().withSkip(true), com.azure.core.util.Context.NONE); + } +} +``` + ### ContainerAppsRevisionReplicas_GetReplica ```java @@ -2333,7 +2704,7 @@ public final class ContainerAppsDiagnosticsListRevisionsSamples { public final class ContainerAppsRevisionReplicasGetReplicaSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Replicas_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Replicas_Get.json */ /** * Sample code: Get Container App's revision replica. @@ -2357,7 +2728,7 @@ public final class ContainerAppsRevisionReplicasGetReplicaSamples { public final class ContainerAppsRevisionReplicasListReplicasSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Replicas_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Replicas_List.json */ /** * Sample code: List Container App's replicas. @@ -2381,7 +2752,7 @@ public final class ContainerAppsRevisionReplicasListReplicasSamples { public final class ContainerAppsRevisionsActivateRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_Activate.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Activate.json */ /** * Sample code: Activate Container App's revision. @@ -2405,7 +2776,7 @@ public final class ContainerAppsRevisionsActivateRevisionSamples { public final class ContainerAppsRevisionsDeactivateRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_Deactivate.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Deactivate.json */ /** * Sample code: Deactivate Container App's revision. @@ -2429,7 +2800,7 @@ public final class ContainerAppsRevisionsDeactivateRevisionSamples { public final class ContainerAppsRevisionsGetRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. @@ -2453,7 +2824,7 @@ public final class ContainerAppsRevisionsGetRevisionSamples { public final class ContainerAppsRevisionsListRevisionsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. @@ -2477,7 +2848,7 @@ public final class ContainerAppsRevisionsListRevisionsSamples { public final class ContainerAppsRevisionsRestartRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_Restart.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Restart.json */ /** * Sample code: Restart Container App's revision. @@ -2506,7 +2877,7 @@ import java.util.Arrays; */ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * SourceControls_CreateOrUpdate.json */ /** @@ -2542,7 +2913,7 @@ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { public final class ContainerAppsSourceControlsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/SourceControls_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SourceControls_Delete.json */ /** * Sample code: Delete Container App SourceControl. @@ -2566,7 +2937,7 @@ public final class ContainerAppsSourceControlsDeleteSamples { public final class ContainerAppsSourceControlsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/SourceControls_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SourceControls_Get.json */ /** * Sample code: Get Container App's SourceControl. @@ -2589,7 +2960,7 @@ public final class ContainerAppsSourceControlsGetSamples { */ public final class ContainerAppsSourceControlsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * SourceControls_ListByContainer.json */ /** @@ -2618,7 +2989,7 @@ import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPol */ public final class DaprComponentResiliencyPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprComponentResiliencyPolicy_CreateOrUpdate_OutboundOnly.json */ /** @@ -2642,7 +3013,7 @@ public final class DaprComponentResiliencyPoliciesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprComponentResiliencyPolicy_CreateOrUpdate_AllOptions.json */ /** @@ -2674,7 +3045,7 @@ public final class DaprComponentResiliencyPoliciesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprComponentResiliencyPolicy_CreateOrUpdate_SparseOptions.json */ /** @@ -2707,7 +3078,7 @@ public final class DaprComponentResiliencyPoliciesCreateOrUpdateSamples { */ public final class DaprComponentResiliencyPoliciesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprComponentResiliencyPolicies_Delete.json */ /** @@ -2731,7 +3102,7 @@ public final class DaprComponentResiliencyPoliciesDeleteSamples { */ public final class DaprComponentResiliencyPoliciesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprComponentResiliencyPolicies_Get.json */ /** @@ -2755,7 +3126,7 @@ public final class DaprComponentResiliencyPoliciesGetSamples { */ public final class DaprComponentResiliencyPoliciesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprComponentResiliencyPolicies_List.json */ /** @@ -2786,7 +3157,7 @@ import java.util.Arrays; */ public final class DaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprComponents_CreateOrUpdate_Secrets.json */ /** @@ -2814,7 +3185,7 @@ public final class DaprComponentsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprComponents_CreateOrUpdate_SecretStoreComponent.json */ /** @@ -2851,7 +3222,7 @@ public final class DaprComponentsCreateOrUpdateSamples { public final class DaprComponentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponents_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_Delete.json */ /** * Sample code: Delete dapr component. @@ -2873,7 +3244,7 @@ public final class DaprComponentsDeleteSamples { */ public final class DaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprComponents_Get_SecretStoreComponent.json */ /** @@ -2889,7 +3260,7 @@ public final class DaprComponentsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponents_Get_Secrets. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_Get_Secrets. * json */ /** @@ -2914,7 +3285,7 @@ public final class DaprComponentsGetSamples { public final class DaprComponentsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponents_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_List.json */ /** * Sample code: List Dapr Components. @@ -2936,7 +3307,7 @@ public final class DaprComponentsListSamples { public final class DaprComponentsListSecretsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponents_ListSecrets. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_ListSecrets. * json */ /** @@ -2967,7 +3338,7 @@ import java.util.Map; */ public final class DaprSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprSubscriptions_CreateOrUpdate_RouteRulesAndMetadata.json */ /** @@ -2989,7 +3360,7 @@ public final class DaprSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprSubscriptions_CreateOrUpdate_DefaultRoute.json */ /** @@ -3005,7 +3376,7 @@ public final class DaprSubscriptionsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprSubscriptions_CreateOrUpdate_BulkSubscribeAndScopes.json */ /** @@ -3047,7 +3418,7 @@ public final class DaprSubscriptionsCreateOrUpdateSamples { public final class DaprSubscriptionsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprSubscriptions_Delete. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_Delete. * json */ /** @@ -3070,7 +3441,7 @@ public final class DaprSubscriptionsDeleteSamples { */ public final class DaprSubscriptionsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprSubscriptions_Get_DefaultRoute.json */ /** @@ -3085,7 +3456,7 @@ public final class DaprSubscriptionsGetSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprSubscriptions_Get_BulkSubscribeAndScopes.json */ /** @@ -3100,7 +3471,7 @@ public final class DaprSubscriptionsGetSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprSubscriptions_Get_RouteRulesAndMetadata.json */ /** @@ -3125,7 +3496,7 @@ public final class DaprSubscriptionsGetSamples { public final class DaprSubscriptionsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprSubscriptions_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_List.json */ /** * Sample code: List Dapr subscriptions. @@ -3151,7 +3522,7 @@ import java.util.Arrays; */ public final class DotNetComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DotNetComponents_CreateOrUpdate.json */ /** @@ -3170,7 +3541,7 @@ public final class DotNetComponentsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DotNetComponents_CreateOrUpdate_ServiceBind.json */ /** @@ -3201,7 +3572,7 @@ public final class DotNetComponentsCreateOrUpdateSamples { public final class DotNetComponentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Delete.json */ /** * Sample code: Delete .NET Component. @@ -3223,7 +3594,7 @@ public final class DotNetComponentsDeleteSamples { */ public final class DotNetComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DotNetComponents_Get_ServiceBind.json */ /** @@ -3239,7 +3610,7 @@ public final class DotNetComponentsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Get.json */ /** * Sample code: Get .NET Component. @@ -3262,7 +3633,7 @@ public final class DotNetComponentsGetSamples { public final class DotNetComponentsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_List.json */ /** * Sample code: List .NET Components. @@ -3274,7 +3645,7 @@ public final class DotNetComponentsListSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DotNetComponents_List_ServiceBind.json */ /** @@ -3303,7 +3674,7 @@ import java.util.Arrays; */ public final class DotNetComponentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DotNetComponents_Patch_ServiceBind.json */ /** @@ -3326,7 +3697,7 @@ public final class DotNetComponentsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_Patch.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Patch.json */ /** * Sample code: Patch .NET Component. @@ -3345,12 +3716,36 @@ public final class DotNetComponentsUpdateSamples { } ``` +### FunctionsExtension_InvokeFunctionsHost + +```java +/** + * Samples for FunctionsExtension InvokeFunctionsHost. + */ +public final class FunctionsExtensionInvokeFunctionsHostSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/FunctionsExtension_Post.json + */ + /** + * Sample code: Invoke Functions host using Functions Extension API. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void invokeFunctionsHostUsingFunctionsExtensionAPI( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.functionsExtensions().invokeFunctionsHostWithResponse("rg", "testcontainerApp0", + "testcontainerApp0-pjxhsye", "testcontainerApp0", com.azure.core.util.Context.NONE); + } +} +``` + ### JavaComponents_CreateOrUpdate ```java import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; +import com.azure.resourcemanager.appcontainers.models.SpringBootAdminComponent; import java.util.Arrays; /** @@ -3358,7 +3753,7 @@ import java.util.Arrays; */ public final class JavaComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * JavaComponents_CreateOrUpdate_ServiceBind.json */ /** @@ -3369,19 +3764,19 @@ public final class JavaComponentsCreateOrUpdateSamples { public static void createOrUpdateJavaComponentWithServiceBinds( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.javaComponents().define("myjavacomponent").withExistingManagedEnvironment("examplerg", "myenvironment") - .withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) - .withConfigurations(Arrays.asList( - new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") - .withValue("true"), - new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") - .withValue("10000ms"))) - .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("yellowcat").withServiceId( - "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat"))) + .withProperties(new SpringBootAdminComponent() + .withConfigurations(Arrays.asList( + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") + .withValue("true"), + new JavaComponentConfigurationProperty() + .withPropertyName("spring.boot.admin.monitor.status-interval").withValue("10000ms"))) + .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("yellowcat").withServiceId( + "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat")))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * JavaComponents_CreateOrUpdate.json */ /** @@ -3392,12 +3787,11 @@ public final class JavaComponentsCreateOrUpdateSamples { public static void createOrUpdateJavaComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.javaComponents().define("myjavacomponent").withExistingManagedEnvironment("examplerg", "myenvironment") - .withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) - .withConfigurations(Arrays.asList( + .withProperties(new SpringBootAdminComponent().withConfigurations(Arrays.asList( new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") .withValue("true"), new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") - .withValue("10000ms"))) + .withValue("10000ms")))) .create(); } } @@ -3412,7 +3806,7 @@ public final class JavaComponentsCreateOrUpdateSamples { public final class JavaComponentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Delete.json */ /** * Sample code: Delete Java Component. @@ -3435,7 +3829,7 @@ public final class JavaComponentsDeleteSamples { public final class JavaComponentsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Get.json */ /** * Sample code: Get Java Component. @@ -3448,7 +3842,7 @@ public final class JavaComponentsGetSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * JavaComponents_Get_ServiceBind.json */ /** @@ -3473,7 +3867,7 @@ public final class JavaComponentsGetSamples { public final class JavaComponentsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_List.json */ /** * Sample code: List Java Components. @@ -3485,7 +3879,7 @@ public final class JavaComponentsListSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * JavaComponents_List_ServiceBind.json */ /** @@ -3506,7 +3900,7 @@ public final class JavaComponentsListSamples { import com.azure.resourcemanager.appcontainers.models.JavaComponent; import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; +import com.azure.resourcemanager.appcontainers.models.SpringBootAdminComponent; import java.util.Arrays; /** @@ -3515,7 +3909,7 @@ import java.util.Arrays; public final class JavaComponentsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_Patch.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Patch.json */ /** * Sample code: Patch Java Component. @@ -3526,17 +3920,17 @@ public final class JavaComponentsUpdateSamples { JavaComponent resource = manager.javaComponents() .getWithResponse("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) - .withConfigurations(Arrays.asList( + resource.update() + .withProperties(new SpringBootAdminComponent().withConfigurations(Arrays.asList( new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") .withValue("true"), new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") - .withValue("10000ms"))) + .withValue("10000ms")))) .apply(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * JavaComponents_Patch_ServiceBind.json */ /** @@ -3549,14 +3943,14 @@ public final class JavaComponentsUpdateSamples { JavaComponent resource = manager.javaComponents() .getWithResponse("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) + resource.update().withProperties(new SpringBootAdminComponent() .withConfigurations(Arrays.asList( new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") .withValue("true"), new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") .withValue("10000ms"))) .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("yellowcat").withServiceId( - "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat"))) + "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat")))) .apply(); } } @@ -3581,18 +3975,23 @@ import com.azure.resourcemanager.appcontainers.models.JobConfigurationManualTrig import com.azure.resourcemanager.appcontainers.models.JobScale; import com.azure.resourcemanager.appcontainers.models.JobScaleRule; import com.azure.resourcemanager.appcontainers.models.JobTemplate; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; import com.azure.resourcemanager.appcontainers.models.TriggerType; import com.azure.resourcemanager.appcontainers.models.Type; +import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; import com.azure.resourcemanager.appcontainers.models.VolumeMount; import java.io.IOException; import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** * Samples for Jobs CreateOrUpdate. */ public final class JobsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * Job_CreateorUpdate_ConnectedEnvironment.json */ /** @@ -3628,7 +4027,7 @@ public final class JobsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * Job_CreateorUpdate_EventTrigger.json */ /** @@ -3639,16 +4038,23 @@ public final class JobsCreateOrUpdateSamples { public static void createOrUpdateContainerAppsJobWithEventDrivenTrigger( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) throws IOException { manager.jobs().define("testcontainerAppsJob0").withRegion("East US").withExistingResourceGroup("rg") + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity", + new UserAssignedIdentity()))) .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.EVENT).withReplicaTimeout(10) - .withReplicaRetryLimit(10).withEventTriggerConfig( - new JobConfigurationEventTriggerConfig().withReplicaCompletionCount(1).withParallelism(4) - .withScale(new JobScale().withPollingInterval(40).withMinExecutions(1).withMaxExecutions(5) - .withRules(Arrays.asList(new JobScaleRule().withName("servicebuscalingrule") - .withType("azure-servicebus") - .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter().deserialize( - "{\"topicName\":\"my-topic\"}", Object.class, SerializerEncoding.JSON))))))) + .withReplicaRetryLimit(10) + .withEventTriggerConfig(new JobConfigurationEventTriggerConfig().withReplicaCompletionCount(1) + .withParallelism(4) + .withScale(new JobScale().withPollingInterval(40).withMinExecutions(1).withMaxExecutions(5) + .withRules(Arrays.asList(new JobScaleRule().withName("servicebuscalingrule") + .withType("azure-servicebus") + .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"topicName\":\"my-topic\"}", Object.class, SerializerEncoding.JSON)) + .withIdentity( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity")))))) .withTemplate(new JobTemplate() .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") .withName("testinitcontainerAppsJob0").withCommand(Arrays.asList("/bin/sh")) @@ -3661,7 +4067,7 @@ public final class JobsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_CreateorUpdate.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_CreateorUpdate.json */ /** * Sample code: Create or Update Container Apps Job. @@ -3697,6 +4103,18 @@ public final class JobsCreateOrUpdateSamples { .withInitialDelaySeconds(5).withPeriodSeconds(3).withType(Type.LIVENESS)))))) .create(); } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } } ``` @@ -3709,7 +4127,7 @@ public final class JobsCreateOrUpdateSamples { public final class JobsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Delete.json */ /** * Sample code: Delete Container Apps Job. @@ -3731,7 +4149,7 @@ public final class JobsDeleteSamples { public final class JobsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Get.json */ /** * Sample code: Get Container Apps Job. @@ -3753,7 +4171,7 @@ public final class JobsGetByResourceGroupSamples { public final class JobsGetDetectorSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_GetDetector.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_GetDetector.json */ /** * Sample code: Get diagnostic data for a Container App Job. @@ -3777,7 +4195,7 @@ public final class JobsGetDetectorSamples { public final class JobsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Jobs_ListBySubscription.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Jobs_ListBySubscription.json */ /** * Sample code: List Container Apps Jobs by subscription. @@ -3800,7 +4218,7 @@ public final class JobsListSamples { public final class JobsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Jobs_ListByResourceGroup. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Jobs_ListByResourceGroup. * json */ /** @@ -3824,7 +4242,7 @@ public final class JobsListByResourceGroupSamples { public final class JobsListDetectorsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_ListDetectors.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_ListDetectors.json */ /** * Sample code: Get the list of available diagnostic data for a Container App Job. @@ -3848,7 +4266,7 @@ public final class JobsListDetectorsSamples { public final class JobsListSecretsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_ListSecrets.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_ListSecrets.json */ /** * Sample code: List Container Apps Job Secrets. @@ -3871,7 +4289,7 @@ public final class JobsListSecretsSamples { public final class JobsProxyGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_ProxyGet.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_ProxyGet.json */ /** * Sample code: Get Container App Job by name. @@ -3899,7 +4317,7 @@ import java.util.Arrays; public final class JobsStartSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Start.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Start.json */ /** * Sample code: Run a Container Apps Job. @@ -3930,7 +4348,7 @@ public final class JobsStartSamples { public final class JobsStopExecutionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Stop_Execution.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Stop_Execution.json */ /** * Sample code: Terminate a Container Apps Job. @@ -3953,7 +4371,7 @@ public final class JobsStopExecutionSamples { public final class JobsStopMultipleExecutionsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Stop_Multiple.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Stop_Multiple.json */ /** * Sample code: Terminate Multiple Container Apps Job. @@ -3991,7 +4409,7 @@ import java.util.Arrays; public final class JobsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Patch.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Patch.json */ /** * Sample code: Patch Container Apps Job. @@ -4036,7 +4454,7 @@ public final class JobsUpdateSamples { public final class JobsExecutionsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Executions_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Executions_Get.json */ /** * Sample code: Get a Container Apps Job Executions. @@ -4061,7 +4479,7 @@ import com.azure.resourcemanager.appcontainers.models.ManagedCertificateProperti */ public final class ManagedCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedCertificate_CreateOrUpdate.json */ /** @@ -4089,7 +4507,7 @@ public final class ManagedCertificatesCreateOrUpdateSamples { public final class ManagedCertificatesDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedCertificate_Delete. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedCertificate_Delete. * json */ /** @@ -4113,7 +4531,7 @@ public final class ManagedCertificatesDeleteSamples { public final class ManagedCertificatesGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedCertificate_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedCertificate_Get.json */ /** * Sample code: Get Certificate. @@ -4135,7 +4553,7 @@ public final class ManagedCertificatesGetSamples { */ public final class ManagedCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedCertificates_ListByManagedEnvironment.json */ /** @@ -4163,7 +4581,7 @@ import java.util.Map; public final class ManagedCertificatesUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedCertificates_Patch. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedCertificates_Patch. * json */ /** @@ -4200,7 +4618,7 @@ public final class ManagedCertificatesUpdateSamples { */ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironmentDiagnostics_Get.json */ /** @@ -4224,7 +4642,7 @@ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { */ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironmentDiagnostics_List.json */ /** @@ -4248,7 +4666,7 @@ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { */ public final class ManagedEnvironmentUsagesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironmentUsages_List.json */ /** @@ -4275,6 +4693,8 @@ import com.azure.resourcemanager.appcontainers.models.Header; import com.azure.resourcemanager.appcontainers.models.LogAnalyticsConfiguration; import com.azure.resourcemanager.appcontainers.models.LogsConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfiguration; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; import com.azure.resourcemanager.appcontainers.models.MetricsConfiguration; @@ -4294,7 +4714,7 @@ import java.util.Map; */ public final class ManagedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json */ /** @@ -4327,7 +4747,7 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironments_CreateOrUpdate.json */ /** @@ -4378,6 +4798,8 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { new WorkloadProfile().withName("My-consumption-01").withWorkloadProfileType("Consumption"))) .withPeerAuthentication( new ManagedEnvironmentPropertiesPeerAuthentication().withMtls(new Mtls().withEnabled(true))) + .withPeerTrafficConfiguration(new ManagedEnvironmentPropertiesPeerTrafficConfiguration() + .withEncryption(new ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption().withEnabled(true))) .create(); } @@ -4404,7 +4826,7 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { public final class ManagedEnvironmentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_Delete. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_Delete. * json */ /** @@ -4427,7 +4849,7 @@ public final class ManagedEnvironmentsDeleteSamples { */ public final class ManagedEnvironmentsGetAuthTokenSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironments_GetAuthToken.json */ /** @@ -4451,7 +4873,7 @@ public final class ManagedEnvironmentsGetAuthTokenSamples { public final class ManagedEnvironmentsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. @@ -4473,7 +4895,7 @@ public final class ManagedEnvironmentsGetByResourceGroupSamples { */ public final class ManagedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironments_ListBySubscription.json */ /** @@ -4496,7 +4918,7 @@ public final class ManagedEnvironmentsListSamples { */ public final class ManagedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironments_ListByResourceGroup.json */ /** @@ -4519,7 +4941,7 @@ public final class ManagedEnvironmentsListByResourceGroupSamples { */ public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironments_ListWorkloadProfileStates.json */ /** @@ -4548,7 +4970,7 @@ import java.util.Map; public final class ManagedEnvironmentsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_Patch. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_Patch. * json */ /** @@ -4587,7 +5009,7 @@ public final class ManagedEnvironmentsUpdateSamples { public final class ManagedEnvironmentsDiagnosticsGetRootSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. @@ -4614,7 +5036,7 @@ import com.azure.resourcemanager.appcontainers.models.NfsAzureFileProperties; */ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironmentsStorages_CreateOrUpdate_NfsAzureFile.json */ /** @@ -4632,7 +5054,7 @@ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironmentsStorages_CreateOrUpdate.json */ /** @@ -4660,7 +5082,7 @@ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { */ public final class ManagedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironmentsStorages_Delete.json */ /** @@ -4684,7 +5106,7 @@ public final class ManagedEnvironmentsStoragesDeleteSamples { */ public final class ManagedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironmentsStorages_Get.json */ /** @@ -4699,7 +5121,7 @@ public final class ManagedEnvironmentsStoragesGetSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironmentsStorages_Get_NfsAzureFile.json */ /** @@ -4723,7 +5145,7 @@ public final class ManagedEnvironmentsStoragesGetSamples { */ public final class ManagedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironmentsStorages_List.json */ /** @@ -4749,7 +5171,7 @@ import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReque */ public final class NamespacesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * Certificates_CheckNameAvailability.json */ /** @@ -4766,7 +5188,7 @@ public final class NamespacesCheckNameAvailabilitySamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ContainerApps_CheckNameAvailability.json */ /** @@ -4792,7 +5214,7 @@ public final class NamespacesCheckNameAvailabilitySamples { public final class OperationsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Operations_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Operations_List.json */ /** * Sample code: List all operations. @@ -4813,7 +5235,7 @@ public final class OperationsListSamples { */ public final class ResourceProviderGetCustomDomainVerificationIdSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * Subscriptions_GetCustomDomainVerificationId.json */ /** @@ -4836,7 +5258,7 @@ public final class ResourceProviderGetCustomDomainVerificationIdSamples { public final class ResourceProviderJobExecutionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Execution_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Execution_Get.json */ /** * Sample code: Get a single Job Execution. @@ -4859,7 +5281,7 @@ public final class ResourceProviderJobExecutionSamples { public final class UsagesListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Usages_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Usages_List.json */ /** * Sample code: List usages. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml b/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml index eda8e513cb34..0136f05d35db 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-2023-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. Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions extension resource. Package tag package-preview-2024-02. 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 087cc2b9ecae..830e53728b09 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 @@ -38,8 +38,11 @@ import com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsStoragesImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsApiClientBuilder; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsAuthConfigsImpl; +import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsBuildsByContainerAppsImpl; +import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsBuildsImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsDiagnosticsImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsImpl; +import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsPatchesImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionReplicasImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionsImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsSourceControlsImpl; @@ -47,6 +50,7 @@ import com.azure.resourcemanager.appcontainers.implementation.DaprComponentsImpl; import com.azure.resourcemanager.appcontainers.implementation.DaprSubscriptionsImpl; import com.azure.resourcemanager.appcontainers.implementation.DotNetComponentsImpl; +import com.azure.resourcemanager.appcontainers.implementation.FunctionsExtensionsImpl; import com.azure.resourcemanager.appcontainers.implementation.JavaComponentsImpl; import com.azure.resourcemanager.appcontainers.implementation.JobsExecutionsImpl; import com.azure.resourcemanager.appcontainers.implementation.JobsImpl; @@ -74,7 +78,10 @@ import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsStorages; import com.azure.resourcemanager.appcontainers.models.ContainerApps; import com.azure.resourcemanager.appcontainers.models.ContainerAppsAuthConfigs; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuilds; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildsByContainerApps; import com.azure.resourcemanager.appcontainers.models.ContainerAppsDiagnostics; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsPatches; import com.azure.resourcemanager.appcontainers.models.ContainerAppsRevisionReplicas; import com.azure.resourcemanager.appcontainers.models.ContainerAppsRevisions; import com.azure.resourcemanager.appcontainers.models.ContainerAppsSourceControls; @@ -82,6 +89,7 @@ import com.azure.resourcemanager.appcontainers.models.DaprComponents; import com.azure.resourcemanager.appcontainers.models.DaprSubscriptions; import com.azure.resourcemanager.appcontainers.models.DotNetComponents; +import com.azure.resourcemanager.appcontainers.models.FunctionsExtensions; import com.azure.resourcemanager.appcontainers.models.JavaComponents; import com.azure.resourcemanager.appcontainers.models.Jobs; import com.azure.resourcemanager.appcontainers.models.JobsExecutions; @@ -104,6 +112,9 @@ /** * Entry point to ContainerAppsApiManager. + * Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the + * function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions + * extension resource. */ public final class ContainerAppsApiManager { private AppResiliencies appResiliencies; @@ -136,6 +147,12 @@ public final class ContainerAppsApiManager { private ContainerAppsRevisionReplicas containerAppsRevisionReplicas; + private ContainerAppsBuildsByContainerApps containerAppsBuildsByContainerApps; + + private ContainerAppsBuilds containerAppsBuilds; + + private ContainerAppsPatches containerAppsPatches; + private ContainerAppsDiagnostics containerAppsDiagnostics; private ManagedEnvironmentDiagnostics managedEnvironmentDiagnostics; @@ -144,8 +161,12 @@ public final class ContainerAppsApiManager { private Jobs jobs; + private DotNetComponents dotNetComponents; + private Operations operations; + private JavaComponents javaComponents; + private JobsExecutions jobsExecutions; private ResourceProviders resourceProviders; @@ -172,9 +193,7 @@ public final class ContainerAppsApiManager { private ManagedEnvironmentUsages managedEnvironmentUsages; - private JavaComponents javaComponents; - - private DotNetComponents dotNetComponents; + private FunctionsExtensions functionsExtensions; private final ContainerAppsApiClient clientObject; @@ -335,7 +354,7 @@ public ContainerAppsApiManager authenticate(TokenCredential credential, AzurePro StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.appcontainers") - .append("/").append("1.0.0-beta.7"); + .append("/").append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version")) .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ") @@ -562,6 +581,43 @@ public ContainerAppsRevisionReplicas containerAppsRevisionReplicas() { return containerAppsRevisionReplicas; } + /** + * Gets the resource collection API of ContainerAppsBuildsByContainerApps. + * + * @return Resource collection API of ContainerAppsBuildsByContainerApps. + */ + public ContainerAppsBuildsByContainerApps containerAppsBuildsByContainerApps() { + if (this.containerAppsBuildsByContainerApps == null) { + this.containerAppsBuildsByContainerApps = new ContainerAppsBuildsByContainerAppsImpl( + clientObject.getContainerAppsBuildsByContainerApps(), this); + } + return containerAppsBuildsByContainerApps; + } + + /** + * Gets the resource collection API of ContainerAppsBuilds. + * + * @return Resource collection API of ContainerAppsBuilds. + */ + public ContainerAppsBuilds containerAppsBuilds() { + if (this.containerAppsBuilds == null) { + this.containerAppsBuilds = new ContainerAppsBuildsImpl(clientObject.getContainerAppsBuilds(), this); + } + return containerAppsBuilds; + } + + /** + * Gets the resource collection API of ContainerAppsPatches. + * + * @return Resource collection API of ContainerAppsPatches. + */ + public ContainerAppsPatches containerAppsPatches() { + if (this.containerAppsPatches == null) { + this.containerAppsPatches = new ContainerAppsPatchesImpl(clientObject.getContainerAppsPatches(), this); + } + return containerAppsPatches; + } + /** * Gets the resource collection API of ContainerAppsDiagnostics. * @@ -613,6 +669,18 @@ public Jobs jobs() { return jobs; } + /** + * Gets the resource collection API of DotNetComponents. It manages DotNetComponent. + * + * @return Resource collection API of DotNetComponents. + */ + public DotNetComponents dotNetComponents() { + if (this.dotNetComponents == null) { + this.dotNetComponents = new DotNetComponentsImpl(clientObject.getDotNetComponents(), this); + } + return dotNetComponents; + } + /** * Gets the resource collection API of Operations. * @@ -625,6 +693,18 @@ public Operations operations() { return operations; } + /** + * Gets the resource collection API of JavaComponents. It manages JavaComponent. + * + * @return Resource collection API of JavaComponents. + */ + public JavaComponents javaComponents() { + if (this.javaComponents == null) { + this.javaComponents = new JavaComponentsImpl(clientObject.getJavaComponents(), this); + } + return javaComponents; + } + /** * Gets the resource collection API of JobsExecutions. * @@ -786,27 +866,15 @@ public ManagedEnvironmentUsages managedEnvironmentUsages() { } /** - * Gets the resource collection API of JavaComponents. It manages JavaComponent. + * Gets the resource collection API of FunctionsExtensions. * - * @return Resource collection API of JavaComponents. + * @return Resource collection API of FunctionsExtensions. */ - public JavaComponents javaComponents() { - if (this.javaComponents == null) { - this.javaComponents = new JavaComponentsImpl(clientObject.getJavaComponents(), this); + public FunctionsExtensions functionsExtensions() { + if (this.functionsExtensions == null) { + this.functionsExtensions = new FunctionsExtensionsImpl(clientObject.getFunctionsExtensions(), this); } - return javaComponents; - } - - /** - * Gets the resource collection API of DotNetComponents. It manages DotNetComponent. - * - * @return Resource collection API of DotNetComponents. - */ - public DotNetComponents dotNetComponents() { - if (this.dotNetComponents == null) { - this.dotNetComponents = new DotNetComponentsImpl(clientObject.getDotNetComponents(), this); - } - return dotNetComponents; + return functionsExtensions; } /** 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 51855da3e2ff..91075b7b036a 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 @@ -151,6 +151,27 @@ public interface ContainerAppsApiClient { */ ContainerAppsRevisionReplicasClient getContainerAppsRevisionReplicas(); + /** + * Gets the ContainerAppsBuildsByContainerAppsClient object to access its operations. + * + * @return the ContainerAppsBuildsByContainerAppsClient object. + */ + ContainerAppsBuildsByContainerAppsClient getContainerAppsBuildsByContainerApps(); + + /** + * Gets the ContainerAppsBuildsClient object to access its operations. + * + * @return the ContainerAppsBuildsClient object. + */ + ContainerAppsBuildsClient getContainerAppsBuilds(); + + /** + * Gets the ContainerAppsPatchesClient object to access its operations. + * + * @return the ContainerAppsPatchesClient object. + */ + ContainerAppsPatchesClient getContainerAppsPatches(); + /** * Gets the ContainerAppsDiagnosticsClient object to access its operations. * @@ -179,6 +200,13 @@ public interface ContainerAppsApiClient { */ JobsClient getJobs(); + /** + * Gets the DotNetComponentsClient object to access its operations. + * + * @return the DotNetComponentsClient object. + */ + DotNetComponentsClient getDotNetComponents(); + /** * Gets the OperationsClient object to access its operations. * @@ -186,6 +214,13 @@ public interface ContainerAppsApiClient { */ OperationsClient getOperations(); + /** + * Gets the JavaComponentsClient object to access its operations. + * + * @return the JavaComponentsClient object. + */ + JavaComponentsClient getJavaComponents(); + /** * Gets the JobsExecutionsClient object to access its operations. * @@ -278,16 +313,9 @@ public interface ContainerAppsApiClient { ManagedEnvironmentUsagesClient getManagedEnvironmentUsages(); /** - * Gets the JavaComponentsClient object to access its operations. - * - * @return the JavaComponentsClient object. - */ - JavaComponentsClient getJavaComponents(); - - /** - * Gets the DotNetComponentsClient object to access its operations. + * Gets the FunctionsExtensionsClient object to access its operations. * - * @return the DotNetComponentsClient object. + * @return the FunctionsExtensionsClient object. */ - DotNetComponentsClient getDotNetComponents(); + FunctionsExtensionsClient getFunctionsExtensions(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsBuildsByContainerAppsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsBuildsByContainerAppsClient.java new file mode 100644 index 000000000000..258e621ecb99 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsBuildsByContainerAppsClient.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.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner; + +/** + * An instance of this class provides access to all the operations defined in ContainerAppsBuildsByContainerAppsClient. + */ +public interface ContainerAppsBuildsByContainerAppsClient { + /** + * List Container Apps Build resources by Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Container Apps Build Resource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String containerAppName); + + /** + * List Container Apps Build resources by Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Container Apps Build Resource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String containerAppName, + Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsBuildsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsBuildsClient.java new file mode 100644 index 000000000000..7d3c288df126 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsBuildsClient.java @@ -0,0 +1,105 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner; + +/** + * An instance of this class provides access to all the operations defined in ContainerAppsBuildsClient. + */ +public interface ContainerAppsBuildsClient { + /** + * Get a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Container Apps Build resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String containerAppName, + String buildName, Context context); + + /** + * Get a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Container Apps Build resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ContainerAppsBuildResourceInner get(String resourceGroupName, String containerAppName, String buildName); + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String containerAppName, String buildName); + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String containerAppName, String buildName, + Context context); + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String containerAppName, String buildName); + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String containerAppName, String buildName, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsPatchesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsPatchesClient.java new file mode 100644 index 000000000000..12ce9706f0b7 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsPatchesClient.java @@ -0,0 +1,263 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsPatchResourceInner; +import com.azure.resourcemanager.appcontainers.models.PatchSkipConfig; + +/** + * An instance of this class provides access to all the operations defined in ContainerAppsPatchesClient. + */ +public interface ContainerAppsPatchesClient { + /** + * List Container Apps Patch resources by ContainerApp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App patch collection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByContainerApp(String resourceGroupName, + String containerAppName); + + /** + * List Container Apps Patch resources by ContainerApp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param filter The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq + * 'Succeeded'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App patch collection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByContainerApp(String resourceGroupName, String containerAppName, + String filter, Context context); + + /** + * Get details for specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details for specific Container Apps Patch by patch name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String containerAppName, + String patchName, Context context); + + /** + * Get details for specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details for specific Container Apps Patch by patch name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ContainerAppsPatchResourceInner get(String resourceGroupName, String containerAppName, String patchName); + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String containerAppName, String patchName); + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String containerAppName, String patchName, + Context context); + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String containerAppName, String patchName); + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String containerAppName, String patchName, Context context); + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginSkipConfigure(String resourceGroupName, String containerAppName, + String patchName, PatchSkipConfig patchSkipConfig); + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginSkipConfigure(String resourceGroupName, String containerAppName, + String patchName, PatchSkipConfig patchSkipConfig, Context context); + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void skipConfigure(String resourceGroupName, String containerAppName, String patchName, + PatchSkipConfig patchSkipConfig); + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void skipConfigure(String resourceGroupName, String containerAppName, String patchName, + PatchSkipConfig patchSkipConfig, Context context); + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of container App Patch. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ContainerAppsPatchResourceInner> + beginApply(String resourceGroupName, String containerAppName, String patchName); + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of container App Patch. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ContainerAppsPatchResourceInner> + beginApply(String resourceGroupName, String containerAppName, String patchName, Context context); + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Patch. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ContainerAppsPatchResourceInner apply(String resourceGroupName, String containerAppName, String patchName); + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Patch. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ContainerAppsPatchResourceInner apply(String resourceGroupName, String containerAppName, String patchName, + Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/FunctionsExtensionsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/FunctionsExtensionsClient.java new file mode 100644 index 000000000000..45732c3aac77 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/FunctionsExtensionsClient.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.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * An instance of this class provides access to all the operations defined in FunctionsExtensionsClient. + */ +public interface FunctionsExtensionsClient { + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response invokeFunctionsHostWithResponse(String resourceGroupName, String containerAppName, + String revisionName, String functionAppName, Context context); + + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + String invokeFunctionsHost(String resourceGroupName, String containerAppName, String revisionName, + String functionAppName); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java index a51478dfb1d9..c6aecd131938 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java @@ -8,8 +8,10 @@ import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.Configuration; +import com.azure.resourcemanager.appcontainers.models.ContainerAppPropertiesPatchingConfiguration; import com.azure.resourcemanager.appcontainers.models.ContainerAppProvisioningState; import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; +import com.azure.resourcemanager.appcontainers.models.Kind; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; import com.azure.resourcemanager.appcontainers.models.Template; import com.fasterxml.jackson.annotation.JsonProperty; @@ -42,6 +44,13 @@ public final class ContainerAppInner extends Resource { @JsonProperty(value = "managedBy") private String managedBy; + /* + * Metadata used to render different experiences for resources of the same type; e.g. WorkflowApp is a kind of + * Microsoft.App/ContainerApps type. If supported, the resource provider must validate and persist this value. + */ + @JsonProperty(value = "kind") + private Kind kind; + /* * ContainerApp resource specific properties */ @@ -126,6 +135,30 @@ public ContainerAppInner withManagedBy(String managedBy) { return this; } + /** + * Get the kind property: Metadata used to render different experiences for resources of the same type; e.g. + * WorkflowApp is a kind of Microsoft.App/ContainerApps type. If supported, the resource provider must validate and + * persist this value. + * + * @return the kind value. + */ + public Kind kind() { + return this.kind; + } + + /** + * Set the kind property: Metadata used to render different experiences for resources of the same type; e.g. + * WorkflowApp is a kind of Microsoft.App/ContainerApps type. If supported, the resource provider must validate and + * persist this value. + * + * @param kind the kind value to set. + * @return the ContainerAppInner object itself. + */ + public ContainerAppInner withKind(Kind kind) { + this.kind = kind; + return this; + } + /** * Get the innerProperties property: ContainerApp resource specific properties. * @@ -240,6 +273,30 @@ public ContainerAppInner withWorkloadProfileName(String workloadProfileName) { return this; } + /** + * Get the patchingConfiguration property: Container App auto patch configuration. + * + * @return the patchingConfiguration value. + */ + public ContainerAppPropertiesPatchingConfiguration patchingConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().patchingConfiguration(); + } + + /** + * Set the patchingConfiguration property: Container App auto patch configuration. + * + * @param patchingConfiguration the patchingConfiguration value to set. + * @return the ContainerAppInner object itself. + */ + public ContainerAppInner + withPatchingConfiguration(ContainerAppPropertiesPatchingConfiguration patchingConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new ContainerAppProperties(); + } + this.innerProperties().withPatchingConfiguration(patchingConfiguration); + return this; + } + /** * Get the latestRevisionName property: Name of the latest revision of the Container App. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppProperties.java index 312d98bd745c..a4751afca8a1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppProperties.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.appcontainers.models.Configuration; +import com.azure.resourcemanager.appcontainers.models.ContainerAppPropertiesPatchingConfiguration; import com.azure.resourcemanager.appcontainers.models.ContainerAppProvisioningState; import com.azure.resourcemanager.appcontainers.models.Template; import com.fasterxml.jackson.annotation.JsonProperty; @@ -40,6 +41,12 @@ public final class ContainerAppProperties { @JsonProperty(value = "workloadProfileName") private String workloadProfileName; + /* + * Container App auto patch configuration. + */ + @JsonProperty(value = "patchingConfiguration") + private ContainerAppPropertiesPatchingConfiguration patchingConfiguration; + /* * Name of the latest revision of the Container App. */ @@ -163,6 +170,27 @@ public ContainerAppProperties withWorkloadProfileName(String workloadProfileName return this; } + /** + * Get the patchingConfiguration property: Container App auto patch configuration. + * + * @return the patchingConfiguration value. + */ + public ContainerAppPropertiesPatchingConfiguration patchingConfiguration() { + return this.patchingConfiguration; + } + + /** + * Set the patchingConfiguration property: Container App auto patch configuration. + * + * @param patchingConfiguration the patchingConfiguration value to set. + * @return the ContainerAppProperties object itself. + */ + public ContainerAppProperties + withPatchingConfiguration(ContainerAppPropertiesPatchingConfiguration patchingConfiguration) { + this.patchingConfiguration = patchingConfiguration; + return this; + } + /** * Get the latestRevisionName property: Name of the latest revision of the Container App. * @@ -263,6 +291,9 @@ public String eventStreamEndpoint() { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (patchingConfiguration() != null) { + patchingConfiguration().validate(); + } if (configuration() != null) { configuration().validate(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsBuildProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsBuildProperties.java new file mode 100644 index 000000000000..964024fa64dc --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsBuildProperties.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.resourcemanager.appcontainers.models.BuildProvisioningState; +import com.azure.resourcemanager.appcontainers.models.BuildStatus; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildConfiguration; +import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The ContainerAppBuild properties. + */ +@Immutable +public final class ContainerAppsBuildProperties { + /* + * Build provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private BuildProvisioningState provisioningState; + + /* + * Status of the build once it has been provisioned. + */ + @JsonProperty(value = "buildStatus", access = JsonProperty.Access.WRITE_ONLY) + private BuildStatus buildStatus; + + /* + * Container registry that the final image will be uploaded to. + */ + @JsonProperty(value = "destinationContainerRegistry", access = JsonProperty.Access.WRITE_ONLY) + private ContainerRegistryWithCustomImage destinationContainerRegistry; + + /* + * Configuration of the build. + */ + @JsonProperty(value = "configuration", access = JsonProperty.Access.WRITE_ONLY) + private ContainerAppsBuildConfiguration configuration; + + /* + * Endpoint from which the build logs can be streamed. + */ + @JsonProperty(value = "logStreamEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String logStreamEndpoint; + + /** + * Creates an instance of ContainerAppsBuildProperties class. + */ + public ContainerAppsBuildProperties() { + } + + /** + * Get the provisioningState property: Build provisioning state. + * + * @return the provisioningState value. + */ + public BuildProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the buildStatus property: Status of the build once it has been provisioned. + * + * @return the buildStatus value. + */ + public BuildStatus buildStatus() { + return this.buildStatus; + } + + /** + * Get the destinationContainerRegistry property: Container registry that the final image will be uploaded to. + * + * @return the destinationContainerRegistry value. + */ + public ContainerRegistryWithCustomImage destinationContainerRegistry() { + return this.destinationContainerRegistry; + } + + /** + * Get the configuration property: Configuration of the build. + * + * @return the configuration value. + */ + public ContainerAppsBuildConfiguration configuration() { + return this.configuration; + } + + /** + * Get the logStreamEndpoint property: Endpoint from which the build logs can be streamed. + * + * @return the logStreamEndpoint value. + */ + public String logStreamEndpoint() { + return this.logStreamEndpoint; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (destinationContainerRegistry() != null) { + destinationContainerRegistry().validate(); + } + if (configuration() != null) { + configuration().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsBuildResourceInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsBuildResourceInner.java new file mode 100644 index 000000000000..fd417e534aa4 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsBuildResourceInner.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.models.BuildProvisioningState; +import com.azure.resourcemanager.appcontainers.models.BuildStatus; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildConfiguration; +import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information pertaining to an individual build. + */ +@Immutable +public final class ContainerAppsBuildResourceInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private ContainerAppsBuildProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ContainerAppsBuildResourceInner class. + */ + public ContainerAppsBuildResourceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private ContainerAppsBuildProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: Build provisioning state. + * + * @return the provisioningState value. + */ + public BuildProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the buildStatus property: Status of the build once it has been provisioned. + * + * @return the buildStatus value. + */ + public BuildStatus buildStatus() { + return this.innerProperties() == null ? null : this.innerProperties().buildStatus(); + } + + /** + * Get the destinationContainerRegistry property: Container registry that the final image will be uploaded to. + * + * @return the destinationContainerRegistry value. + */ + public ContainerRegistryWithCustomImage destinationContainerRegistry() { + return this.innerProperties() == null ? null : this.innerProperties().destinationContainerRegistry(); + } + + /** + * Get the configuration property: Configuration of the build. + * + * @return the configuration value. + */ + public ContainerAppsBuildConfiguration configuration() { + return this.innerProperties() == null ? null : this.innerProperties().configuration(); + } + + /** + * Get the logStreamEndpoint property: Endpoint from which the build logs can be streamed. + * + * @return the logStreamEndpoint value. + */ + public String logStreamEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().logStreamEndpoint(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsPatchResourceInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsPatchResourceInner.java new file mode 100644 index 000000000000..34145a127eee --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppsPatchResourceInner.java @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.models.PatchProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Container App Patch. + */ +@Immutable +public final class ContainerAppsPatchResourceInner extends ProxyResource { + /* + * Properties that describes current states of the patch resource. + */ + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private PatchProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ContainerAppsPatchResourceInner class. + */ + public ContainerAppsPatchResourceInner() { + } + + /** + * Get the properties property: Properties that describes current states of the patch resource. + * + * @return the properties value. + */ + public PatchProperties properties() { + return this.properties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JavaComponentInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JavaComponentInner.java index cedf0eaf85e1..4340ed8e2712 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JavaComponentInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JavaComponentInner.java @@ -7,12 +7,8 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentProvisioningState; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; +import com.azure.resourcemanager.appcontainers.models.JavaComponentProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; /** * Java Component. @@ -23,7 +19,7 @@ public final class JavaComponentInner extends ProxyResource { * Java Component resource specific properties */ @JsonProperty(value = "properties") - private JavaComponentProperties innerProperties; + private JavaComponentProperties properties; /* * Azure Resource Manager metadata containing createdBy and modifiedBy information. @@ -38,99 +34,32 @@ public JavaComponentInner() { } /** - * Get the innerProperties property: Java Component resource specific properties. + * Get the properties property: Java Component resource specific properties. * - * @return the innerProperties value. + * @return the properties value. */ - private JavaComponentProperties innerProperties() { - return this.innerProperties; + public JavaComponentProperties properties() { + return this.properties; } /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - public SystemData systemData() { - return this.systemData; - } - - /** - * Get the componentType property: Type of the Java Component. + * Set the properties property: Java Component resource specific properties. * - * @return the componentType value. - */ - public JavaComponentType componentType() { - return this.innerProperties() == null ? null : this.innerProperties().componentType(); - } - - /** - * Set the componentType property: Type of the Java Component. - * - * @param componentType the componentType value to set. + * @param properties the properties value to set. * @return the JavaComponentInner object itself. */ - public JavaComponentInner withComponentType(JavaComponentType componentType) { - if (this.innerProperties() == null) { - this.innerProperties = new JavaComponentProperties(); - } - this.innerProperties().withComponentType(componentType); + public JavaComponentInner withProperties(JavaComponentProperties properties) { + this.properties = properties; return this; } /** - * Get the provisioningState property: Provisioning state of the Java Component. - * - * @return the provisioningState value. - */ - public JavaComponentProvisioningState provisioningState() { - return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); - } - - /** - * Get the configurations property: List of Java Components configuration properties. - * - * @return the configurations value. - */ - public List configurations() { - return this.innerProperties() == null ? null : this.innerProperties().configurations(); - } - - /** - * Set the configurations property: List of Java Components configuration properties. - * - * @param configurations the configurations value to set. - * @return the JavaComponentInner object itself. - */ - public JavaComponentInner withConfigurations(List configurations) { - if (this.innerProperties() == null) { - this.innerProperties = new JavaComponentProperties(); - } - this.innerProperties().withConfigurations(configurations); - return this; - } - - /** - * Get the serviceBinds property: List of Java Components that are bound to the Java component. - * - * @return the serviceBinds value. - */ - public List serviceBinds() { - return this.innerProperties() == null ? null : this.innerProperties().serviceBinds(); - } - - /** - * Set the serviceBinds property: List of Java Components that are bound to the Java component. + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @param serviceBinds the serviceBinds value to set. - * @return the JavaComponentInner object itself. + * @return the systemData value. */ - public JavaComponentInner withServiceBinds(List serviceBinds) { - if (this.innerProperties() == null) { - this.innerProperties = new JavaComponentProperties(); - } - this.innerProperties().withServiceBinds(serviceBinds); - return this; + public SystemData systemData() { + return this.systemData; } /** @@ -139,8 +68,8 @@ public JavaComponentInner withServiceBinds(List servic * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (properties() != null) { + properties().validate(); } } } 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 d407d72fc16f..f5d3db346f1c 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 @@ -5,6 +5,7 @@ package com.azure.resourcemanager.appcontainers.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.models.ExecutionStatus; import com.azure.resourcemanager.appcontainers.models.JobExecutionRunningState; import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; import com.fasterxml.jackson.annotation.JsonProperty; @@ -192,6 +193,29 @@ public JobExecutionInner withTemplate(JobExecutionTemplate template) { return this; } + /** + * Get the detailedStatus property: Detailed status of the job execution. + * + * @return the detailedStatus value. + */ + public ExecutionStatus detailedStatus() { + return this.innerProperties() == null ? null : this.innerProperties().detailedStatus(); + } + + /** + * Set the detailedStatus property: Detailed status of the job execution. + * + * @param detailedStatus the detailedStatus value to set. + * @return the JobExecutionInner object itself. + */ + public JobExecutionInner withDetailedStatus(ExecutionStatus detailedStatus) { + if (this.innerProperties() == null) { + this.innerProperties = new JobExecutionProperties(); + } + this.innerProperties().withDetailedStatus(detailedStatus); + return this; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionProperties.java index 38038116fad5..3568e1835e9d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionProperties.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.appcontainers.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.models.ExecutionStatus; import com.azure.resourcemanager.appcontainers.models.JobExecutionRunningState; import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; import com.fasterxml.jackson.annotation.JsonProperty; @@ -39,6 +40,12 @@ public final class JobExecutionProperties { @JsonProperty(value = "template") private JobExecutionTemplate template; + /* + * Detailed status of the job execution. + */ + @JsonProperty(value = "detailedStatus") + private ExecutionStatus detailedStatus; + /** * Creates an instance of JobExecutionProperties class. */ @@ -114,6 +121,26 @@ public JobExecutionProperties withTemplate(JobExecutionTemplate template) { return this; } + /** + * Get the detailedStatus property: Detailed status of the job execution. + * + * @return the detailedStatus value. + */ + public ExecutionStatus detailedStatus() { + return this.detailedStatus; + } + + /** + * Set the detailedStatus property: Detailed status of the job execution. + * + * @param detailedStatus the detailedStatus value to set. + * @return the JobExecutionProperties object itself. + */ + public JobExecutionProperties withDetailedStatus(ExecutionStatus detailedStatus) { + this.detailedStatus = detailedStatus; + return this; + } + /** * Validates the instance. * @@ -123,5 +150,8 @@ public void validate() { if (template() != null) { template().validate(); } + if (detailedStatus() != null) { + detailedStatus().validate(); + } } } 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 c31e5a5ee4f0..694e40ffaff9 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 @@ -14,6 +14,7 @@ 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.ManagedEnvironmentPropertiesPeerTrafficConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; import com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; @@ -494,6 +495,30 @@ public ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication() { return this; } + /** + * Get the peerTrafficConfiguration property: Peer traffic settings for the Managed Environment. + * + * @return the peerTrafficConfiguration value. + */ + public ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().peerTrafficConfiguration(); + } + + /** + * Set the peerTrafficConfiguration property: Peer traffic settings for the Managed Environment. + * + * @param peerTrafficConfiguration the peerTrafficConfiguration value to set. + * @return the ManagedEnvironmentInner object itself. + */ + public ManagedEnvironmentInner + withPeerTrafficConfiguration(ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedEnvironmentProperties(); + } + this.innerProperties().withPeerTrafficConfiguration(peerTrafficConfiguration); + 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 8cdc1ac40fbd..49b382f044e7 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 @@ -12,6 +12,7 @@ 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.ManagedEnvironmentPropertiesPeerTrafficConfiguration; import com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; @@ -135,6 +136,12 @@ public final class ManagedEnvironmentProperties { @JsonProperty(value = "peerAuthentication") private ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication; + /* + * Peer traffic settings for the Managed Environment + */ + @JsonProperty(value = "peerTrafficConfiguration") + private ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration; + /** * Creates an instance of ManagedEnvironmentProperties class. */ @@ -462,6 +469,27 @@ public ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication() { return this; } + /** + * Get the peerTrafficConfiguration property: Peer traffic settings for the Managed Environment. + * + * @return the peerTrafficConfiguration value. + */ + public ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration() { + return this.peerTrafficConfiguration; + } + + /** + * Set the peerTrafficConfiguration property: Peer traffic settings for the Managed Environment. + * + * @param peerTrafficConfiguration the peerTrafficConfiguration value to set. + * @return the ManagedEnvironmentProperties object itself. + */ + public ManagedEnvironmentProperties + withPeerTrafficConfiguration(ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration) { + this.peerTrafficConfiguration = peerTrafficConfiguration; + return this; + } + /** * Validates the instance. * @@ -495,5 +523,8 @@ public void validate() { if (peerAuthentication() != null) { peerAuthentication().validate(); } + if (peerTrafficConfiguration() != null) { + peerTrafficConfiguration().validate(); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/package-info.java index 9ea383c7aad7..f87287ab52d0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/package-info.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/package-info.java @@ -4,6 +4,8 @@ /** * Package containing the inner data models for ContainerAppsApiClient. - * null. + * Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the + * function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions + * extension resource. */ package com.azure.resourcemanager.appcontainers.fluent.models; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/package-info.java index 131b0b619aad..0eba2fe983f2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/package-info.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/package-info.java @@ -4,6 +4,8 @@ /** * Package containing the service clients for ContainerAppsApiClient. - * null. + * Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the + * function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions + * extension resource. */ package com.azure.resourcemanager.appcontainers.fluent; 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 1325dc07837e..cd9976973705 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppImpl.java @@ -12,9 +12,11 @@ import com.azure.resourcemanager.appcontainers.models.Configuration; import com.azure.resourcemanager.appcontainers.models.ContainerApp; import com.azure.resourcemanager.appcontainers.models.ContainerAppAuthToken; +import com.azure.resourcemanager.appcontainers.models.ContainerAppPropertiesPatchingConfiguration; import com.azure.resourcemanager.appcontainers.models.ContainerAppProvisioningState; import com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResult; import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; +import com.azure.resourcemanager.appcontainers.models.Kind; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; import com.azure.resourcemanager.appcontainers.models.SecretsCollection; import com.azure.resourcemanager.appcontainers.models.Template; @@ -64,6 +66,10 @@ public String managedBy() { return this.innerModel().managedBy(); } + public Kind kind() { + return this.innerModel().kind(); + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -84,6 +90,10 @@ public String workloadProfileName() { return this.innerModel().workloadProfileName(); } + public ContainerAppPropertiesPatchingConfiguration patchingConfiguration() { + return this.innerModel().patchingConfiguration(); + } + public String latestRevisionName() { return this.innerModel().latestRevisionName(); } @@ -276,6 +286,11 @@ public ContainerAppImpl withManagedBy(String managedBy) { return this; } + public ContainerAppImpl withKind(Kind kind) { + this.innerModel().withKind(kind); + return this; + } + public ContainerAppImpl withManagedEnvironmentId(String managedEnvironmentId) { this.innerModel().withManagedEnvironmentId(managedEnvironmentId); return this; @@ -291,6 +306,12 @@ public ContainerAppImpl withWorkloadProfileName(String workloadProfileName) { return this; } + public ContainerAppImpl + withPatchingConfiguration(ContainerAppPropertiesPatchingConfiguration patchingConfiguration) { + this.innerModel().withPatchingConfiguration(patchingConfiguration); + return this; + } + public ContainerAppImpl withConfiguration(Configuration configuration) { this.innerModel().withConfiguration(configuration); return this; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java index 1253a9deec72..606a0f39e8ee 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 @@ -36,8 +36,11 @@ import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsStoragesClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsApiClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsAuthConfigsClient; +import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsBuildsByContainerAppsClient; +import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsBuildsClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsDiagnosticsClient; +import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsPatchesClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsRevisionReplicasClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsRevisionsClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsSourceControlsClient; @@ -45,6 +48,7 @@ import com.azure.resourcemanager.appcontainers.fluent.DaprComponentsClient; import com.azure.resourcemanager.appcontainers.fluent.DaprSubscriptionsClient; import com.azure.resourcemanager.appcontainers.fluent.DotNetComponentsClient; +import com.azure.resourcemanager.appcontainers.fluent.FunctionsExtensionsClient; import com.azure.resourcemanager.appcontainers.fluent.JavaComponentsClient; import com.azure.resourcemanager.appcontainers.fluent.JobsClient; import com.azure.resourcemanager.appcontainers.fluent.JobsExecutionsClient; @@ -366,6 +370,48 @@ public ContainerAppsRevisionReplicasClient getContainerAppsRevisionReplicas() { return this.containerAppsRevisionReplicas; } + /** + * The ContainerAppsBuildsByContainerAppsClient object to access its operations. + */ + private final ContainerAppsBuildsByContainerAppsClient containerAppsBuildsByContainerApps; + + /** + * Gets the ContainerAppsBuildsByContainerAppsClient object to access its operations. + * + * @return the ContainerAppsBuildsByContainerAppsClient object. + */ + public ContainerAppsBuildsByContainerAppsClient getContainerAppsBuildsByContainerApps() { + return this.containerAppsBuildsByContainerApps; + } + + /** + * The ContainerAppsBuildsClient object to access its operations. + */ + private final ContainerAppsBuildsClient containerAppsBuilds; + + /** + * Gets the ContainerAppsBuildsClient object to access its operations. + * + * @return the ContainerAppsBuildsClient object. + */ + public ContainerAppsBuildsClient getContainerAppsBuilds() { + return this.containerAppsBuilds; + } + + /** + * The ContainerAppsPatchesClient object to access its operations. + */ + private final ContainerAppsPatchesClient containerAppsPatches; + + /** + * Gets the ContainerAppsPatchesClient object to access its operations. + * + * @return the ContainerAppsPatchesClient object. + */ + public ContainerAppsPatchesClient getContainerAppsPatches() { + return this.containerAppsPatches; + } + /** * The ContainerAppsDiagnosticsClient object to access its operations. */ @@ -422,6 +468,20 @@ public JobsClient getJobs() { return this.jobs; } + /** + * The DotNetComponentsClient object to access its operations. + */ + private final DotNetComponentsClient dotNetComponents; + + /** + * Gets the DotNetComponentsClient object to access its operations. + * + * @return the DotNetComponentsClient object. + */ + public DotNetComponentsClient getDotNetComponents() { + return this.dotNetComponents; + } + /** * The OperationsClient object to access its operations. */ @@ -436,6 +496,20 @@ public OperationsClient getOperations() { return this.operations; } + /** + * The JavaComponentsClient object to access its operations. + */ + private final JavaComponentsClient javaComponents; + + /** + * Gets the JavaComponentsClient object to access its operations. + * + * @return the JavaComponentsClient object. + */ + public JavaComponentsClient getJavaComponents() { + return this.javaComponents; + } + /** * The JobsExecutionsClient object to access its operations. */ @@ -619,31 +693,17 @@ public ManagedEnvironmentUsagesClient getManagedEnvironmentUsages() { } /** - * The JavaComponentsClient object to access its operations. - */ - private final JavaComponentsClient javaComponents; - - /** - * Gets the JavaComponentsClient object to access its operations. - * - * @return the JavaComponentsClient object. - */ - public JavaComponentsClient getJavaComponents() { - return this.javaComponents; - } - - /** - * The DotNetComponentsClient object to access its operations. + * The FunctionsExtensionsClient object to access its operations. */ - private final DotNetComponentsClient dotNetComponents; + private final FunctionsExtensionsClient functionsExtensions; /** - * Gets the DotNetComponentsClient object to access its operations. + * Gets the FunctionsExtensionsClient object to access its operations. * - * @return the DotNetComponentsClient object. + * @return the FunctionsExtensionsClient object. */ - public DotNetComponentsClient getDotNetComponents() { - return this.dotNetComponents; + public FunctionsExtensionsClient getFunctionsExtensions() { + return this.functionsExtensions; } /** @@ -663,7 +723,7 @@ public DotNetComponentsClient getDotNetComponents() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-11-02-preview"; + this.apiVersion = "2024-02-02-preview"; this.appResiliencies = new AppResilienciesClientImpl(this); this.containerAppsAuthConfigs = new ContainerAppsAuthConfigsClientImpl(this); this.availableWorkloadProfiles = new AvailableWorkloadProfilesClientImpl(this); @@ -679,11 +739,16 @@ public DotNetComponentsClient getDotNetComponents() { this.containerApps = new ContainerAppsClientImpl(this); this.containerAppsRevisions = new ContainerAppsRevisionsClientImpl(this); this.containerAppsRevisionReplicas = new ContainerAppsRevisionReplicasClientImpl(this); + this.containerAppsBuildsByContainerApps = new ContainerAppsBuildsByContainerAppsClientImpl(this); + this.containerAppsBuilds = new ContainerAppsBuildsClientImpl(this); + this.containerAppsPatches = new ContainerAppsPatchesClientImpl(this); this.containerAppsDiagnostics = new ContainerAppsDiagnosticsClientImpl(this); this.managedEnvironmentDiagnostics = new ManagedEnvironmentDiagnosticsClientImpl(this); this.managedEnvironmentsDiagnostics = new ManagedEnvironmentsDiagnosticsClientImpl(this); this.jobs = new JobsClientImpl(this); + this.dotNetComponents = new DotNetComponentsClientImpl(this); this.operations = new OperationsClientImpl(this); + this.javaComponents = new JavaComponentsClientImpl(this); this.jobsExecutions = new JobsExecutionsClientImpl(this); this.resourceProviders = new ResourceProvidersClientImpl(this); this.managedEnvironments = new ManagedEnvironmentsClientImpl(this); @@ -697,8 +762,7 @@ public DotNetComponentsClient getDotNetComponents() { this.containerAppsSourceControls = new ContainerAppsSourceControlsClientImpl(this); this.usages = new UsagesClientImpl(this); this.managedEnvironmentUsages = new ManagedEnvironmentUsagesClientImpl(this); - this.javaComponents = new JavaComponentsClientImpl(this); - this.dotNetComponents = new DotNetComponentsClientImpl(this); + this.functionsExtensions = new FunctionsExtensionsClientImpl(this); } /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildResourceImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildResourceImpl.java new file mode 100644 index 000000000000..0140fcd8e536 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildResourceImpl.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner; +import com.azure.resourcemanager.appcontainers.models.BuildProvisioningState; +import com.azure.resourcemanager.appcontainers.models.BuildStatus; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildConfiguration; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildResource; +import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; + +public final class ContainerAppsBuildResourceImpl implements ContainerAppsBuildResource { + private ContainerAppsBuildResourceInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + ContainerAppsBuildResourceImpl(ContainerAppsBuildResourceInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public BuildProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public BuildStatus buildStatus() { + return this.innerModel().buildStatus(); + } + + public ContainerRegistryWithCustomImage destinationContainerRegistry() { + return this.innerModel().destinationContainerRegistry(); + } + + public ContainerAppsBuildConfiguration configuration() { + return this.innerModel().configuration(); + } + + public String logStreamEndpoint() { + return this.innerModel().logStreamEndpoint(); + } + + public ContainerAppsBuildResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsByContainerAppsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsByContainerAppsClientImpl.java new file mode 100644 index 000000000000..23ac3a84b9f5 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsByContainerAppsClientImpl.java @@ -0,0 +1,290 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsBuildsByContainerAppsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildCollection; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ContainerAppsBuildsByContainerAppsClient. + */ +public final class ContainerAppsBuildsByContainerAppsClientImpl implements ContainerAppsBuildsByContainerAppsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ContainerAppsBuildsByContainerAppsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of ContainerAppsBuildsByContainerAppsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ContainerAppsBuildsByContainerAppsClientImpl(ContainerAppsApiClientImpl client) { + this.service = RestProxy.create(ContainerAppsBuildsByContainerAppsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientContainerAppsBuildsByContainerApps to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface ContainerAppsBuildsByContainerAppsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List Container Apps Build resources by Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Container Apps Build Resource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String containerAppName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, containerAppName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Container Apps Build resources by Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Container Apps Build Resource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String containerAppName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List Container Apps Build resources by Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Container Apps Build Resource list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String containerAppName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, containerAppName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List Container Apps Build resources by Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Container Apps Build Resource list operation as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String containerAppName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, containerAppName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List Container Apps Build resources by Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Container Apps Build Resource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String containerAppName) { + return new PagedIterable<>(listAsync(resourceGroupName, containerAppName)); + } + + /** + * List Container Apps Build resources by Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Container Apps Build Resource list operation as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String containerAppName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, containerAppName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Container Apps Build Resource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Container Apps Build Resource list operation along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsByContainerAppsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsByContainerAppsImpl.java new file mode 100644 index 000000000000..f5ff5268f874 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsByContainerAppsImpl.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.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsBuildsByContainerAppsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildResource; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildsByContainerApps; + +public final class ContainerAppsBuildsByContainerAppsImpl implements ContainerAppsBuildsByContainerApps { + private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsBuildsByContainerAppsImpl.class); + + private final ContainerAppsBuildsByContainerAppsClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public ContainerAppsBuildsByContainerAppsImpl(ContainerAppsBuildsByContainerAppsClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String containerAppName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, containerAppName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ContainerAppsBuildResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String containerAppName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, containerAppName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ContainerAppsBuildResourceImpl(inner1, this.manager())); + } + + private ContainerAppsBuildsByContainerAppsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsClientImpl.java new file mode 100644 index 000000000000..0a9b6a1c7932 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsClientImpl.java @@ -0,0 +1,441 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsBuildsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ContainerAppsBuildsClient. + */ +public final class ContainerAppsBuildsClientImpl implements ContainerAppsBuildsClient { + /** + * The proxy service used to perform REST calls. + */ + private final ContainerAppsBuildsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of ContainerAppsBuildsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ContainerAppsBuildsClientImpl(ContainerAppsApiClientImpl client) { + this.service = RestProxy.create(ContainerAppsBuildsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientContainerAppsBuilds to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface ContainerAppsBuildsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds/{buildName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, @PathParam("buildName") String buildName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/builds/{buildName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, @PathParam("buildName") String buildName, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Container Apps Build resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String containerAppName, String buildName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + if (buildName == null) { + return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, containerAppName, buildName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Container Apps Build resource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String containerAppName, String buildName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + if (buildName == null) { + return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, buildName, accept, context); + } + + /** + * Get a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Container Apps Build resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String containerAppName, + String buildName) { + return getWithResponseAsync(resourceGroupName, containerAppName, buildName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Container Apps Build resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String containerAppName, + String buildName, Context context) { + return getWithResponseAsync(resourceGroupName, containerAppName, buildName, context).block(); + } + + /** + * Get a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Container Apps Build resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerAppsBuildResourceInner get(String resourceGroupName, String containerAppName, String buildName) { + return getWithResponse(resourceGroupName, containerAppName, buildName, Context.NONE).getValue(); + } + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String containerAppName, + String buildName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + if (buildName == null) { + return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, containerAppName, buildName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String containerAppName, + String buildName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + if (buildName == null) { + return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, buildName, accept, context); + } + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String containerAppName, + String buildName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, containerAppName, buildName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String containerAppName, + String buildName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, containerAppName, buildName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String containerAppName, + String buildName) { + return this.beginDeleteAsync(resourceGroupName, containerAppName, buildName).getSyncPoller(); + } + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String containerAppName, + String buildName, Context context) { + return this.beginDeleteAsync(resourceGroupName, containerAppName, buildName, context).getSyncPoller(); + } + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String containerAppName, String buildName) { + return beginDeleteAsync(resourceGroupName, containerAppName, buildName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String containerAppName, String buildName, + Context context) { + return beginDeleteAsync(resourceGroupName, containerAppName, buildName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String containerAppName, String buildName) { + deleteAsync(resourceGroupName, containerAppName, buildName).block(); + } + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String containerAppName, String buildName, Context context) { + deleteAsync(resourceGroupName, containerAppName, buildName, context).block(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsImpl.java new file mode 100644 index 000000000000..2e9fdac76510 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsBuildsImpl.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsBuildsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildResource; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsBuilds; + +public final class ContainerAppsBuildsImpl implements ContainerAppsBuilds { + private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsBuildsImpl.class); + + private final ContainerAppsBuildsClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public ContainerAppsBuildsImpl(ContainerAppsBuildsClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String containerAppName, + String buildName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, containerAppName, buildName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ContainerAppsBuildResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ContainerAppsBuildResource get(String resourceGroupName, String containerAppName, String buildName) { + ContainerAppsBuildResourceInner inner + = this.serviceClient().get(resourceGroupName, containerAppName, buildName); + if (inner != null) { + return new ContainerAppsBuildResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String containerAppName, String buildName) { + this.serviceClient().delete(resourceGroupName, containerAppName, buildName); + } + + public void delete(String resourceGroupName, String containerAppName, String buildName, Context context) { + this.serviceClient().delete(resourceGroupName, containerAppName, buildName, context); + } + + private ContainerAppsBuildsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchResourceImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchResourceImpl.java new file mode 100644 index 000000000000..da5d66fd22e1 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchResourceImpl.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.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsPatchResourceInner; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsPatchResource; +import com.azure.resourcemanager.appcontainers.models.PatchProperties; + +public final class ContainerAppsPatchResourceImpl implements ContainerAppsPatchResource { + private ContainerAppsPatchResourceInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + ContainerAppsPatchResourceImpl(ContainerAppsPatchResourceInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public PatchProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ContainerAppsPatchResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchesClientImpl.java new file mode 100644 index 000000000000..f0651329280e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchesClientImpl.java @@ -0,0 +1,1206 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsPatchesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsPatchResourceInner; +import com.azure.resourcemanager.appcontainers.models.PatchCollection; +import com.azure.resourcemanager.appcontainers.models.PatchSkipConfig; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ContainerAppsPatchesClient. + */ +public final class ContainerAppsPatchesClientImpl implements ContainerAppsPatchesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ContainerAppsPatchesService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of ContainerAppsPatchesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ContainerAppsPatchesClientImpl(ContainerAppsApiClientImpl client) { + this.service = RestProxy.create(ContainerAppsPatchesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientContainerAppsPatches to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface ContainerAppsPatchesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByContainerApp(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, @QueryParam("$filter") String filter, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, @PathParam("patchName") String patchName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, @PathParam("patchName") String patchName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName}/skipConfig") + @ExpectedResponses({ 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> skipConfigure(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, @PathParam("patchName") String patchName, + @BodyParam("application/json") PatchSkipConfig patchSkipConfig, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/patches/{patchName}/apply") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> apply(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, @PathParam("patchName") String patchName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByContainerAppNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List Container Apps Patch resources by ContainerApp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param filter The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq + * 'Succeeded'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App patch collection along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByContainerAppSinglePageAsync(String resourceGroupName, String containerAppName, String filter) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByContainerApp(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, containerAppName, filter, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List Container Apps Patch resources by ContainerApp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param filter The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq + * 'Succeeded'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App patch collection along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByContainerAppSinglePageAsync( + String resourceGroupName, String containerAppName, String filter, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByContainerApp(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, filter, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List Container Apps Patch resources by ContainerApp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param filter The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq + * 'Succeeded'. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App patch collection as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByContainerAppAsync(String resourceGroupName, + String containerAppName, String filter) { + return new PagedFlux<>(() -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName, filter), + nextLink -> listByContainerAppNextSinglePageAsync(nextLink)); + } + + /** + * List Container Apps Patch resources by ContainerApp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App patch collection as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByContainerAppAsync(String resourceGroupName, + String containerAppName) { + final String filter = null; + return new PagedFlux<>(() -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName, filter), + nextLink -> listByContainerAppNextSinglePageAsync(nextLink)); + } + + /** + * List Container Apps Patch resources by ContainerApp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param filter The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq + * 'Succeeded'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App patch collection as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByContainerAppAsync(String resourceGroupName, + String containerAppName, String filter, Context context) { + return new PagedFlux<>( + () -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName, filter, context), + nextLink -> listByContainerAppNextSinglePageAsync(nextLink, context)); + } + + /** + * List Container Apps Patch resources by ContainerApp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App patch collection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByContainerApp(String resourceGroupName, + String containerAppName) { + final String filter = null; + return new PagedIterable<>(listByContainerAppAsync(resourceGroupName, containerAppName, filter)); + } + + /** + * List Container Apps Patch resources by ContainerApp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param filter The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq + * 'Succeeded'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App patch collection as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByContainerApp(String resourceGroupName, + String containerAppName, String filter, Context context) { + return new PagedIterable<>(listByContainerAppAsync(resourceGroupName, containerAppName, filter, context)); + } + + /** + * Get details for specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details for specific Container Apps Patch by patch name along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String containerAppName, String patchName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + if (patchName == null) { + return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, containerAppName, patchName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get details for specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details for specific Container Apps Patch by patch name along with {@link Response} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String containerAppName, String patchName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + if (patchName == null) { + return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, patchName, accept, context); + } + + /** + * Get details for specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details for specific Container Apps Patch by patch name on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String containerAppName, + String patchName) { + return getWithResponseAsync(resourceGroupName, containerAppName, patchName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get details for specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details for specific Container Apps Patch by patch name along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String containerAppName, + String patchName, Context context) { + return getWithResponseAsync(resourceGroupName, containerAppName, patchName, context).block(); + } + + /** + * Get details for specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details for specific Container Apps Patch by patch name. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerAppsPatchResourceInner get(String resourceGroupName, String containerAppName, String patchName) { + return getWithResponse(resourceGroupName, containerAppName, patchName, Context.NONE).getValue(); + } + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String containerAppName, + String patchName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + if (patchName == null) { + return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, containerAppName, patchName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String containerAppName, + String patchName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + if (patchName == null) { + return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, patchName, accept, context); + } + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String containerAppName, + String patchName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, containerAppName, patchName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String containerAppName, + String patchName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, containerAppName, patchName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String containerAppName, + String patchName) { + return this.beginDeleteAsync(resourceGroupName, containerAppName, patchName).getSyncPoller(); + } + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String containerAppName, + String patchName, Context context) { + return this.beginDeleteAsync(resourceGroupName, containerAppName, patchName, context).getSyncPoller(); + } + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String containerAppName, String patchName) { + return beginDeleteAsync(resourceGroupName, containerAppName, patchName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String containerAppName, String patchName, + Context context) { + return beginDeleteAsync(resourceGroupName, containerAppName, patchName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String containerAppName, String patchName) { + deleteAsync(resourceGroupName, containerAppName, patchName).block(); + } + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String containerAppName, String patchName, Context context) { + deleteAsync(resourceGroupName, containerAppName, patchName, context).block(); + } + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> skipConfigureWithResponseAsync(String resourceGroupName, + String containerAppName, String patchName, PatchSkipConfig patchSkipConfig) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + if (patchName == null) { + return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null.")); + } + if (patchSkipConfig == null) { + return Mono + .error(new IllegalArgumentException("Parameter patchSkipConfig is required and cannot be null.")); + } else { + patchSkipConfig.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.skipConfigure(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, containerAppName, patchName, patchSkipConfig, + accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> skipConfigureWithResponseAsync(String resourceGroupName, + String containerAppName, String patchName, PatchSkipConfig patchSkipConfig, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + if (patchName == null) { + return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null.")); + } + if (patchSkipConfig == null) { + return Mono + .error(new IllegalArgumentException("Parameter patchSkipConfig is required and cannot be null.")); + } else { + patchSkipConfig.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.skipConfigure(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, containerAppName, patchName, patchSkipConfig, accept, + context); + } + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginSkipConfigureAsync(String resourceGroupName, + String containerAppName, String patchName, PatchSkipConfig patchSkipConfig) { + Mono>> mono + = skipConfigureWithResponseAsync(resourceGroupName, containerAppName, patchName, patchSkipConfig); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginSkipConfigureAsync(String resourceGroupName, + String containerAppName, String patchName, PatchSkipConfig patchSkipConfig, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = skipConfigureWithResponseAsync(resourceGroupName, containerAppName, patchName, patchSkipConfig, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginSkipConfigure(String resourceGroupName, String containerAppName, + String patchName, PatchSkipConfig patchSkipConfig) { + return this.beginSkipConfigureAsync(resourceGroupName, containerAppName, patchName, patchSkipConfig) + .getSyncPoller(); + } + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginSkipConfigure(String resourceGroupName, String containerAppName, + String patchName, PatchSkipConfig patchSkipConfig, Context context) { + return this.beginSkipConfigureAsync(resourceGroupName, containerAppName, patchName, patchSkipConfig, context) + .getSyncPoller(); + } + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono skipConfigureAsync(String resourceGroupName, String containerAppName, String patchName, + PatchSkipConfig patchSkipConfig) { + return beginSkipConfigureAsync(resourceGroupName, containerAppName, patchName, patchSkipConfig).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono skipConfigureAsync(String resourceGroupName, String containerAppName, String patchName, + PatchSkipConfig patchSkipConfig, Context context) { + return beginSkipConfigureAsync(resourceGroupName, containerAppName, patchName, patchSkipConfig, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void skipConfigure(String resourceGroupName, String containerAppName, String patchName, + PatchSkipConfig patchSkipConfig) { + skipConfigureAsync(resourceGroupName, containerAppName, patchName, patchSkipConfig).block(); + } + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void skipConfigure(String resourceGroupName, String containerAppName, String patchName, + PatchSkipConfig patchSkipConfig, Context context) { + skipConfigureAsync(resourceGroupName, containerAppName, patchName, patchSkipConfig, context).block(); + } + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Patch along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> applyWithResponseAsync(String resourceGroupName, String containerAppName, + String patchName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + if (patchName == null) { + return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.apply(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, containerAppName, patchName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Patch along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> applyWithResponseAsync(String resourceGroupName, String containerAppName, + String patchName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + if (patchName == null) { + return Mono.error(new IllegalArgumentException("Parameter patchName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.apply(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, patchName, accept, context); + } + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of container App Patch. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ContainerAppsPatchResourceInner> + beginApplyAsync(String resourceGroupName, String containerAppName, String patchName) { + Mono>> mono = applyWithResponseAsync(resourceGroupName, containerAppName, patchName); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ContainerAppsPatchResourceInner.class, ContainerAppsPatchResourceInner.class, + this.client.getContext()); + } + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of container App Patch. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ContainerAppsPatchResourceInner> + beginApplyAsync(String resourceGroupName, String containerAppName, String patchName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = applyWithResponseAsync(resourceGroupName, containerAppName, patchName, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ContainerAppsPatchResourceInner.class, ContainerAppsPatchResourceInner.class, + context); + } + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of container App Patch. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ContainerAppsPatchResourceInner> + beginApply(String resourceGroupName, String containerAppName, String patchName) { + return this.beginApplyAsync(resourceGroupName, containerAppName, patchName).getSyncPoller(); + } + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of container App Patch. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ContainerAppsPatchResourceInner> + beginApply(String resourceGroupName, String containerAppName, String patchName, Context context) { + return this.beginApplyAsync(resourceGroupName, containerAppName, patchName, context).getSyncPoller(); + } + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Patch on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono applyAsync(String resourceGroupName, String containerAppName, + String patchName) { + return beginApplyAsync(resourceGroupName, containerAppName, patchName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Patch on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono applyAsync(String resourceGroupName, String containerAppName, + String patchName, Context context) { + return beginApplyAsync(resourceGroupName, containerAppName, patchName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Patch. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerAppsPatchResourceInner apply(String resourceGroupName, String containerAppName, String patchName) { + return applyAsync(resourceGroupName, containerAppName, patchName).block(); + } + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Patch. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerAppsPatchResourceInner apply(String resourceGroupName, String containerAppName, String patchName, + Context context) { + return applyAsync(resourceGroupName, containerAppName, patchName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App patch collection along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> + listByContainerAppNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByContainerAppNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App patch collection along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByContainerAppNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByContainerAppNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchesImpl.java new file mode 100644 index 000000000000..42c28f166299 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsPatchesImpl.java @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsPatchesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsPatchResourceInner; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsPatchResource; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsPatches; +import com.azure.resourcemanager.appcontainers.models.PatchSkipConfig; + +public final class ContainerAppsPatchesImpl implements ContainerAppsPatches { + private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsPatchesImpl.class); + + private final ContainerAppsPatchesClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public ContainerAppsPatchesImpl(ContainerAppsPatchesClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listByContainerApp(String resourceGroupName, + String containerAppName) { + PagedIterable inner + = this.serviceClient().listByContainerApp(resourceGroupName, containerAppName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ContainerAppsPatchResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByContainerApp(String resourceGroupName, + String containerAppName, String filter, Context context) { + PagedIterable inner + = this.serviceClient().listByContainerApp(resourceGroupName, containerAppName, filter, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new ContainerAppsPatchResourceImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String containerAppName, + String patchName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, containerAppName, patchName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new ContainerAppsPatchResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ContainerAppsPatchResource get(String resourceGroupName, String containerAppName, String patchName) { + ContainerAppsPatchResourceInner inner + = this.serviceClient().get(resourceGroupName, containerAppName, patchName); + if (inner != null) { + return new ContainerAppsPatchResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String containerAppName, String patchName) { + this.serviceClient().delete(resourceGroupName, containerAppName, patchName); + } + + public void delete(String resourceGroupName, String containerAppName, String patchName, Context context) { + this.serviceClient().delete(resourceGroupName, containerAppName, patchName, context); + } + + public void skipConfigure(String resourceGroupName, String containerAppName, String patchName, + PatchSkipConfig patchSkipConfig) { + this.serviceClient().skipConfigure(resourceGroupName, containerAppName, patchName, patchSkipConfig); + } + + public void skipConfigure(String resourceGroupName, String containerAppName, String patchName, + PatchSkipConfig patchSkipConfig, Context context) { + this.serviceClient().skipConfigure(resourceGroupName, containerAppName, patchName, patchSkipConfig, context); + } + + public ContainerAppsPatchResource apply(String resourceGroupName, String containerAppName, String patchName) { + ContainerAppsPatchResourceInner inner + = this.serviceClient().apply(resourceGroupName, containerAppName, patchName); + if (inner != null) { + return new ContainerAppsPatchResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public ContainerAppsPatchResource apply(String resourceGroupName, String containerAppName, String patchName, + Context context) { + ContainerAppsPatchResourceInner inner + = this.serviceClient().apply(resourceGroupName, containerAppName, patchName, context); + if (inner != null) { + return new ContainerAppsPatchResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + private ContainerAppsPatchesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsClientImpl.java new file mode 100644 index 000000000000..5843c01b5c77 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsClientImpl.java @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.appcontainers.fluent.FunctionsExtensionsClient; +import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in FunctionsExtensionsClient. + */ +public final class FunctionsExtensionsClientImpl implements FunctionsExtensionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final FunctionsExtensionsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of FunctionsExtensionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + FunctionsExtensionsClientImpl(ContainerAppsApiClientImpl client) { + this.service = RestProxy.create(FunctionsExtensionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientFunctionsExtensions to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface FunctionsExtensionsService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/providers/Microsoft.App/functions/{functionAppName}/invoke") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> invokeFunctionsHost(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, @PathParam("revisionName") String revisionName, + @PathParam("functionAppName") String functionAppName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> invokeFunctionsHostWithResponseAsync(String resourceGroupName, + String containerAppName, String revisionName, String functionAppName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + if (revisionName == null) { + return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null.")); + } + if (functionAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter functionAppName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.invokeFunctionsHost(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, containerAppName, revisionName, functionAppName, + this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> invokeFunctionsHostWithResponseAsync(String resourceGroupName, + String containerAppName, String revisionName, String functionAppName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + if (revisionName == null) { + return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null.")); + } + if (functionAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter functionAppName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.invokeFunctionsHost(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, revisionName, functionAppName, this.client.getApiVersion(), accept, + context); + } + + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono invokeFunctionsHostAsync(String resourceGroupName, String containerAppName, + String revisionName, String functionAppName) { + return invokeFunctionsHostWithResponseAsync(resourceGroupName, containerAppName, revisionName, functionAppName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response invokeFunctionsHostWithResponse(String resourceGroupName, String containerAppName, + String revisionName, String functionAppName, Context context) { + return invokeFunctionsHostWithResponseAsync(resourceGroupName, containerAppName, revisionName, functionAppName, + context).block(); + } + + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public String invokeFunctionsHost(String resourceGroupName, String containerAppName, String revisionName, + String functionAppName) { + return invokeFunctionsHostWithResponse(resourceGroupName, containerAppName, revisionName, functionAppName, + Context.NONE).getValue(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsImpl.java new file mode 100644 index 000000000000..005636921513 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsImpl.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.FunctionsExtensionsClient; +import com.azure.resourcemanager.appcontainers.models.FunctionsExtensions; + +public final class FunctionsExtensionsImpl implements FunctionsExtensions { + private static final ClientLogger LOGGER = new ClientLogger(FunctionsExtensionsImpl.class); + + private final FunctionsExtensionsClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public FunctionsExtensionsImpl(FunctionsExtensionsClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response invokeFunctionsHostWithResponse(String resourceGroupName, String containerAppName, + String revisionName, String functionAppName, Context context) { + return this.serviceClient().invokeFunctionsHostWithResponse(resourceGroupName, containerAppName, revisionName, + functionAppName, context); + } + + public String invokeFunctionsHost(String resourceGroupName, String containerAppName, String revisionName, + String functionAppName) { + return this.serviceClient().invokeFunctionsHost(resourceGroupName, containerAppName, revisionName, + functionAppName); + } + + private FunctionsExtensionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentImpl.java index 66398fe94215..b39c89781934 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentImpl.java @@ -8,12 +8,7 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner; import com.azure.resourcemanager.appcontainers.models.JavaComponent; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentProvisioningState; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; -import java.util.Collections; -import java.util.List; +import com.azure.resourcemanager.appcontainers.models.JavaComponentProperties; public final class JavaComponentImpl implements JavaComponent, JavaComponent.Definition, JavaComponent.Update { private JavaComponentInner innerObject; @@ -32,34 +27,12 @@ public String type() { return this.innerModel().type(); } - public SystemData systemData() { - return this.innerModel().systemData(); - } - - public JavaComponentType componentType() { - return this.innerModel().componentType(); - } - - public JavaComponentProvisioningState provisioningState() { - return this.innerModel().provisioningState(); - } - - public List configurations() { - List inner = this.innerModel().configurations(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } + public JavaComponentProperties properties() { + return this.innerModel().properties(); } - public List serviceBinds() { - List inner = this.innerModel().serviceBinds(); - if (inner != null) { - return Collections.unmodifiableList(inner); - } else { - return Collections.emptyList(); - } + public SystemData systemData() { + return this.innerModel().systemData(); } public String resourceGroupName() { @@ -141,18 +114,8 @@ public JavaComponent refresh(Context context) { return this; } - public JavaComponentImpl withComponentType(JavaComponentType componentType) { - this.innerModel().withComponentType(componentType); - return this; - } - - public JavaComponentImpl withConfigurations(List configurations) { - this.innerModel().withConfigurations(configurations); - return this; - } - - public JavaComponentImpl withServiceBinds(List serviceBinds) { - this.innerModel().withServiceBinds(serviceBinds); + public JavaComponentImpl withProperties(JavaComponentProperties properties) { + this.innerModel().withProperties(properties); return this; } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionImpl.java index a763cde3740e..48488c9bbf21 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionImpl.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.appcontainers.implementation; import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner; +import com.azure.resourcemanager.appcontainers.models.ExecutionStatus; import com.azure.resourcemanager.appcontainers.models.JobExecution; import com.azure.resourcemanager.appcontainers.models.JobExecutionRunningState; import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; @@ -49,6 +50,10 @@ public JobExecutionTemplate template() { return this.innerModel().template(); } + public ExecutionStatus detailedStatus() { + return this.innerModel().detailedStatus(); + } + public JobExecutionInner innerModel() { return this.innerObject; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java index 9a5213f6b0bf..89e178c659a6 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 @@ -18,6 +18,7 @@ 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.ManagedEnvironmentPropertiesPeerTrafficConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; import com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; @@ -146,6 +147,10 @@ public ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication() { return this.innerModel().peerAuthentication(); } + public ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration() { + return this.innerModel().peerTrafficConfiguration(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -330,4 +335,10 @@ public ManagedEnvironmentImpl withInfrastructureResourceGroup(String infrastruct this.innerModel().withPeerAuthentication(peerAuthentication); return this; } + + public ManagedEnvironmentImpl + withPeerTrafficConfiguration(ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration) { + this.innerModel().withPeerTrafficConfiguration(peerTrafficConfiguration); + return this; + } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/package-info.java index 4afb39fb5652..d5c81f00f20c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/package-info.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/package-info.java @@ -4,6 +4,8 @@ /** * Package containing the implementations for ContainerAppsApiClient. - * null. + * Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the + * function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions + * extension resource. */ package com.azure.resourcemanager.appcontainers.implementation; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java index 541432d9b2af..6b7ffcaae6b3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java @@ -19,6 +19,13 @@ public class BaseContainer { @JsonProperty(value = "image") private String image; + /* + * The type of the image. Set to CloudBuild to let the system manages the image, where user will not be able to + * update image through image field. Set to ContainerImage for user provided image. + */ + @JsonProperty(value = "imageType") + private ImageType imageType; + /* * Custom container name. */ @@ -81,6 +88,28 @@ public BaseContainer withImage(String image) { return this; } + /** + * Get the imageType property: The type of the image. Set to CloudBuild to let the system manages the image, where + * user will not be able to update image through image field. Set to ContainerImage for user provided image. + * + * @return the imageType value. + */ + public ImageType imageType() { + return this.imageType; + } + + /** + * Set the imageType property: The type of the image. Set to CloudBuild to let the system manages the image, where + * user will not be able to update image through image field. Set to ContainerImage for user provided image. + * + * @param imageType the imageType value to set. + * @return the BaseContainer object itself. + */ + public BaseContainer withImageType(ImageType imageType) { + this.imageType = imageType; + return this; + } + /** * Get the name property: Custom container name. * 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 82755893d112..6dfc985960d6 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 @@ -45,6 +45,12 @@ public final class Configuration { @JsonProperty(value = "dapr") private Dapr dapr; + /* + * App runtime configuration for the Container App. + */ + @JsonProperty(value = "runtime") + private Runtime runtime; + /* * Optional. Max inactive revisions a Container App can have. */ @@ -173,6 +179,26 @@ public Configuration withDapr(Dapr dapr) { return this; } + /** + * Get the runtime property: App runtime configuration for the Container App. + * + * @return the runtime value. + */ + public Runtime runtime() { + return this.runtime; + } + + /** + * Set the runtime property: App runtime configuration for the Container App. + * + * @param runtime the runtime value to set. + * @return the Configuration object itself. + */ + public Configuration withRuntime(Runtime runtime) { + this.runtime = runtime; + return this; + } + /** * Get the maxInactiveRevisions property: Optional. Max inactive revisions a Container App can have. * @@ -231,6 +257,9 @@ public void validate() { if (dapr() != null) { dapr().validate(); } + if (runtime() != null) { + runtime().validate(); + } if (service() != null) { service().validate(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java index b1f4d676514c..d358415039ae 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java @@ -54,6 +54,15 @@ public Container withImage(String image) { return this; } + /** + * {@inheritDoc} + */ + @Override + public Container withImageType(ImageType imageType) { + super.withImageType(imageType); + return this; + } + /** * {@inheritDoc} */ 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 45488a9f26c9..66b389c0a112 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java @@ -75,6 +75,15 @@ public interface ContainerApp { */ String managedBy(); + /** + * Gets the kind property: Metadata used to render different experiences for resources of the same type; e.g. + * WorkflowApp is a kind of Microsoft.App/ContainerApps type. If supported, the resource provider must validate and + * persist this value. + * + * @return the kind value. + */ + Kind kind(); + /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -110,6 +119,13 @@ public interface ContainerApp { */ String workloadProfileName(); + /** + * Gets the patchingConfiguration property: Container App auto patch configuration. + * + * @return the patchingConfiguration value. + */ + ContainerAppPropertiesPatchingConfiguration patchingConfiguration(); + /** * Gets the latestRevisionName property: Name of the latest revision of the Container App. * @@ -250,8 +266,9 @@ interface WithResourceGroup { * to be created, but also allows for any other optional properties to be specified. */ interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithExtendedLocation, - DefinitionStages.WithIdentity, DefinitionStages.WithManagedBy, DefinitionStages.WithManagedEnvironmentId, - DefinitionStages.WithEnvironmentId, DefinitionStages.WithWorkloadProfileName, + DefinitionStages.WithIdentity, DefinitionStages.WithManagedBy, DefinitionStages.WithKind, + DefinitionStages.WithManagedEnvironmentId, DefinitionStages.WithEnvironmentId, + DefinitionStages.WithWorkloadProfileName, DefinitionStages.WithPatchingConfiguration, DefinitionStages.WithConfiguration, DefinitionStages.WithTemplate { /** * Executes the create request. @@ -328,6 +345,23 @@ interface WithManagedBy { WithCreate withManagedBy(String managedBy); } + /** + * The stage of the ContainerApp definition allowing to specify kind. + */ + interface WithKind { + /** + * Specifies the kind property: Metadata used to render different experiences for resources of the same + * type; e.g. WorkflowApp is a kind of Microsoft.App/ContainerApps type. If supported, the resource provider + * must validate and persist this value.. + * + * @param kind Metadata used to render different experiences for resources of the same type; e.g. + * WorkflowApp is a kind of Microsoft.App/ContainerApps type. If supported, the resource provider must + * validate and persist this value. + * @return the next definition stage. + */ + WithCreate withKind(Kind kind); + } + /** * The stage of the ContainerApp definition allowing to specify managedEnvironmentId. */ @@ -367,6 +401,19 @@ interface WithWorkloadProfileName { WithCreate withWorkloadProfileName(String workloadProfileName); } + /** + * The stage of the ContainerApp definition allowing to specify patchingConfiguration. + */ + interface WithPatchingConfiguration { + /** + * Specifies the patchingConfiguration property: Container App auto patch configuration.. + * + * @param patchingConfiguration Container App auto patch configuration. + * @return the next definition stage. + */ + WithCreate withPatchingConfiguration(ContainerAppPropertiesPatchingConfiguration patchingConfiguration); + } + /** * The stage of the ContainerApp definition allowing to specify configuration. */ @@ -405,8 +452,8 @@ interface WithTemplate { * The template for ContainerApp update. */ interface Update extends UpdateStages.WithTags, UpdateStages.WithExtendedLocation, UpdateStages.WithIdentity, - UpdateStages.WithManagedBy, UpdateStages.WithWorkloadProfileName, UpdateStages.WithConfiguration, - UpdateStages.WithTemplate { + UpdateStages.WithManagedBy, UpdateStages.WithWorkloadProfileName, UpdateStages.WithPatchingConfiguration, + UpdateStages.WithConfiguration, UpdateStages.WithTemplate { /** * Executes the update request. * @@ -499,6 +546,19 @@ interface WithWorkloadProfileName { Update withWorkloadProfileName(String workloadProfileName); } + /** + * The stage of the ContainerApp update allowing to specify patchingConfiguration. + */ + interface WithPatchingConfiguration { + /** + * Specifies the patchingConfiguration property: Container App auto patch configuration.. + * + * @param patchingConfiguration Container App auto patch configuration. + * @return the next definition stage. + */ + Update withPatchingConfiguration(ContainerAppPropertiesPatchingConfiguration patchingConfiguration); + } + /** * The stage of the ContainerApp update allowing to specify configuration. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppPropertiesPatchingConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppPropertiesPatchingConfiguration.java new file mode 100644 index 000000000000..a2bf4c1fedd4 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppPropertiesPatchingConfiguration.java @@ -0,0 +1,60 @@ +// Copyright (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; + +/** + * Container App auto patch configuration. + */ +@Fluent +public final class ContainerAppPropertiesPatchingConfiguration { + /* + * Patching mode for the container app. Null or default in this field will be interpreted as Automatic by RP. + * Automatic mode will automatically apply available patches. Manual mode will require the user to manually apply + * patches. Disabled mode will stop patch detection and auto patching. + */ + @JsonProperty(value = "patchingMode") + private PatchingMode patchingMode; + + /** + * Creates an instance of ContainerAppPropertiesPatchingConfiguration class. + */ + public ContainerAppPropertiesPatchingConfiguration() { + } + + /** + * Get the patchingMode property: Patching mode for the container app. Null or default in this field will be + * interpreted as Automatic by RP. Automatic mode will automatically apply available patches. Manual mode will + * require the user to manually apply patches. Disabled mode will stop patch detection and auto patching. + * + * @return the patchingMode value. + */ + public PatchingMode patchingMode() { + return this.patchingMode; + } + + /** + * Set the patchingMode property: Patching mode for the container app. Null or default in this field will be + * interpreted as Automatic by RP. Automatic mode will automatically apply available patches. Manual mode will + * require the user to manually apply patches. Disabled mode will stop patch detection and auto patching. + * + * @param patchingMode the patchingMode value to set. + * @return the ContainerAppPropertiesPatchingConfiguration object itself. + */ + public ContainerAppPropertiesPatchingConfiguration withPatchingMode(PatchingMode patchingMode) { + this.patchingMode = patchingMode; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildCollection.java new file mode 100644 index 000000000000..74460cedbbdb --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildCollection.java @@ -0,0 +1,91 @@ +// Copyright (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.ContainerAppsBuildResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a Container Apps Build Resource list operation. + */ +@Fluent +public final class ContainerAppsBuildCollection { + /* + * The Container Apps Build Resource items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of ContainerAppsBuildCollection class. + */ + public ContainerAppsBuildCollection() { + } + + /** + * Get the value property: The Container Apps Build Resource items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The Container Apps Build Resource items on this page. + * + * @param value the value value to set. + * @return the ContainerAppsBuildCollection object itself. + */ + public ContainerAppsBuildCollection withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the ContainerAppsBuildCollection object itself. + */ + public ContainerAppsBuildCollection withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model ContainerAppsBuildCollection")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsBuildCollection.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildConfiguration.java new file mode 100644 index 000000000000..21f1164f6dde --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildConfiguration.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Configuration of the build. + */ +@Immutable +public final class ContainerAppsBuildConfiguration { + /* + * Base OS used to build and run the app. + */ + @JsonProperty(value = "baseOs", access = JsonProperty.Access.WRITE_ONLY) + private String baseOs; + + /* + * Platform to be used to build and run the app. + */ + @JsonProperty(value = "platform", access = JsonProperty.Access.WRITE_ONLY) + private String platform; + + /* + * Platform version to be used to build and run the app. + */ + @JsonProperty(value = "platformVersion", access = JsonProperty.Access.WRITE_ONLY) + private String platformVersion; + + /* + * List of environment variables to be passed to the build, secrets should not be used in environment variable. + */ + @JsonProperty(value = "environmentVariables", access = JsonProperty.Access.WRITE_ONLY) + private List environmentVariables; + + /* + * List of steps to perform before the build. + */ + @JsonProperty(value = "preBuildSteps", access = JsonProperty.Access.WRITE_ONLY) + private List preBuildSteps; + + /** + * Creates an instance of ContainerAppsBuildConfiguration class. + */ + public ContainerAppsBuildConfiguration() { + } + + /** + * Get the baseOs property: Base OS used to build and run the app. + * + * @return the baseOs value. + */ + public String baseOs() { + return this.baseOs; + } + + /** + * Get the platform property: Platform to be used to build and run the app. + * + * @return the platform value. + */ + public String platform() { + return this.platform; + } + + /** + * Get the platformVersion property: Platform version to be used to build and run the app. + * + * @return the platformVersion value. + */ + public String platformVersion() { + return this.platformVersion; + } + + /** + * Get the environmentVariables property: List of environment variables to be passed to the build, secrets should + * not be used in environment variable. + * + * @return the environmentVariables value. + */ + public List environmentVariables() { + return this.environmentVariables; + } + + /** + * Get the preBuildSteps property: List of steps to perform before the build. + * + * @return the preBuildSteps value. + */ + public List preBuildSteps() { + return this.preBuildSteps; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (environmentVariables() != null) { + environmentVariables().forEach(e -> e.validate()); + } + if (preBuildSteps() != null) { + preBuildSteps().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildResource.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildResource.java new file mode 100644 index 000000000000..e0a93c5e4895 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildResource.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner; + +/** + * An immutable client-side representation of ContainerAppsBuildResource. + */ +public interface ContainerAppsBuildResource { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: Build provisioning state. + * + * @return the provisioningState value. + */ + BuildProvisioningState provisioningState(); + + /** + * Gets the buildStatus property: Status of the build once it has been provisioned. + * + * @return the buildStatus value. + */ + BuildStatus buildStatus(); + + /** + * Gets the destinationContainerRegistry property: Container registry that the final image will be uploaded to. + * + * @return the destinationContainerRegistry value. + */ + ContainerRegistryWithCustomImage destinationContainerRegistry(); + + /** + * Gets the configuration property: Configuration of the build. + * + * @return the configuration value. + */ + ContainerAppsBuildConfiguration configuration(); + + /** + * Gets the logStreamEndpoint property: Endpoint from which the build logs can be streamed. + * + * @return the logStreamEndpoint value. + */ + String logStreamEndpoint(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner object. + * + * @return the inner object. + */ + ContainerAppsBuildResourceInner innerModel(); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuilds.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuilds.java new file mode 100644 index 000000000000..293579325fa1 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuilds.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ContainerAppsBuilds. + */ +public interface ContainerAppsBuilds { + /** + * Get a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Container Apps Build resource along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String containerAppName, + String buildName, Context context); + + /** + * Get a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Container Apps Build resource. + */ + ContainerAppsBuildResource get(String resourceGroupName, String containerAppName, String buildName); + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String containerAppName, String buildName); + + /** + * Delete a Container Apps Build resource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String containerAppName, String buildName, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildsByContainerApps.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildsByContainerApps.java new file mode 100644 index 000000000000..bb61f0cf9013 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsBuildsByContainerApps.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of ContainerAppsBuildsByContainerApps. + */ +public interface ContainerAppsBuildsByContainerApps { + /** + * List Container Apps Build resources by Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Container Apps Build Resource list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String containerAppName); + + /** + * List Container Apps Build resources by Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Build is associated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a Container Apps Build Resource list operation as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String containerAppName, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsPatchResource.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsPatchResource.java new file mode 100644 index 000000000000..0a032a7e86e3 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsPatchResource.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsPatchResourceInner; + +/** + * An immutable client-side representation of ContainerAppsPatchResource. + */ +public interface ContainerAppsPatchResource { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: Properties that describes current states of the patch resource. + * + * @return the properties value. + */ + PatchProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsPatchResourceInner object. + * + * @return the inner object. + */ + ContainerAppsPatchResourceInner innerModel(); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsPatches.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsPatches.java new file mode 100644 index 000000000000..04509a19a50e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsPatches.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of ContainerAppsPatches. + */ +public interface ContainerAppsPatches { + /** + * List Container Apps Patch resources by ContainerApp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App patch collection as paginated response with {@link PagedIterable}. + */ + PagedIterable listByContainerApp(String resourceGroupName, String containerAppName); + + /** + * List Container Apps Patch resources by ContainerApp. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param filter The filter to apply on the operation. For example, $filter=properties/patchApplyStatus eq + * 'Succeeded'. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App patch collection as paginated response with {@link PagedIterable}. + */ + PagedIterable listByContainerApp(String resourceGroupName, String containerAppName, + String filter, Context context); + + /** + * Get details for specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details for specific Container Apps Patch by patch name along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String containerAppName, + String patchName, Context context); + + /** + * Get details for specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return details for specific Container Apps Patch by patch name. + */ + ContainerAppsPatchResource get(String resourceGroupName, String containerAppName, String patchName); + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String containerAppName, String patchName); + + /** + * Delete specific Container Apps Patch by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String containerAppName, String patchName, Context context); + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void skipConfigure(String resourceGroupName, String containerAppName, String patchName, + PatchSkipConfig patchSkipConfig); + + /** + * Configure the Container Apps Patch skip option by patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param patchSkipConfig Configure patcher to skip a patch or not. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void skipConfigure(String resourceGroupName, String containerAppName, String patchName, + PatchSkipConfig patchSkipConfig, Context context); + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Patch. + */ + ContainerAppsPatchResource apply(String resourceGroupName, String containerAppName, String patchName); + + /** + * Apply a Container Apps Patch resource with patch name. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App the Patch is associated. + * @param patchName The name of the patch. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Patch. + */ + ContainerAppsPatchResource apply(String resourceGroupName, String containerAppName, String patchName, + Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerExecutionStatus.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerExecutionStatus.java new file mode 100644 index 000000000000..3318c713cb9b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerExecutionStatus.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; + +/** + * Container Apps Job execution container status. Contains status code and reason. + */ +@Fluent +public final class ContainerExecutionStatus { + /* + * Container Name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Exit code + */ + @JsonProperty(value = "code") + private Integer code; + + /* + * Additional information for the container status + */ + @JsonProperty(value = "additionalInformation") + private String additionalInformation; + + /* + * Status of the container + */ + @JsonProperty(value = "status") + private String status; + + /** + * Creates an instance of ContainerExecutionStatus class. + */ + public ContainerExecutionStatus() { + } + + /** + * Get the name property: Container Name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Container Name. + * + * @param name the name value to set. + * @return the ContainerExecutionStatus object itself. + */ + public ContainerExecutionStatus withName(String name) { + this.name = name; + return this; + } + + /** + * Get the code property: Exit code. + * + * @return the code value. + */ + public Integer code() { + return this.code; + } + + /** + * Set the code property: Exit code. + * + * @param code the code value to set. + * @return the ContainerExecutionStatus object itself. + */ + public ContainerExecutionStatus withCode(Integer code) { + this.code = code; + return this; + } + + /** + * Get the additionalInformation property: Additional information for the container status. + * + * @return the additionalInformation value. + */ + public String additionalInformation() { + return this.additionalInformation; + } + + /** + * Set the additionalInformation property: Additional information for the container status. + * + * @param additionalInformation the additionalInformation value to set. + * @return the ContainerExecutionStatus object itself. + */ + public ContainerExecutionStatus withAdditionalInformation(String additionalInformation) { + this.additionalInformation = additionalInformation; + return this; + } + + /** + * Get the status property: Status of the container. + * + * @return the status value. + */ + public String status() { + return this.status; + } + + /** + * Set the status property: Status of the container. + * + * @param status the status value to set. + * @return the ContainerExecutionStatus object itself. + */ + public ContainerExecutionStatus withStatus(String status) { + this.status = status; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomScaleRule.java index c5b307384859..3db5106da4be 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomScaleRule.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomScaleRule.java @@ -35,6 +35,13 @@ public final class CustomScaleRule { @JsonProperty(value = "auth") private List auth; + /* + * The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for + * system-assigned identity. + */ + @JsonProperty(value = "identity") + private String identity; + /** * Creates an instance of CustomScaleRule class. */ @@ -103,6 +110,28 @@ public CustomScaleRule withAuth(List auth) { return this; } + /** + * Get the identity property: The resource ID of a user-assigned managed identity that is assigned to the Container + * App, or 'system' for system-assigned identity. + * + * @return the identity value. + */ + public String identity() { + return this.identity; + } + + /** + * Set the identity property: The resource ID of a user-assigned managed identity that is assigned to the Container + * App, or 'system' for system-assigned identity. + * + * @param identity the identity value to set. + * @return the CustomScaleRule object itself. + */ + public CustomScaleRule withIdentity(String identity) { + this.identity = identity; + return this; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DetectionStatus.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DetectionStatus.java new file mode 100644 index 000000000000..08c070715a4d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DetectionStatus.java @@ -0,0 +1,58 @@ +// Copyright (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; + +/** + * The status of the patch detection. + */ +public final class DetectionStatus extends ExpandableStringEnum { + /** + * Static value Succeeded for DetectionStatus. + */ + public static final DetectionStatus SUCCEEDED = fromString("Succeeded"); + + /** + * Static value RegistryLoginFailed for DetectionStatus. + */ + public static final DetectionStatus REGISTRY_LOGIN_FAILED = fromString("RegistryLoginFailed"); + + /** + * Static value Failed for DetectionStatus. + */ + public static final DetectionStatus FAILED = fromString("Failed"); + + /** + * Creates a new instance of DetectionStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DetectionStatus() { + } + + /** + * Creates or finds a DetectionStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding DetectionStatus. + */ + @JsonCreator + public static DetectionStatus fromString(String name) { + return fromString(name, DetectionStatus.class); + } + + /** + * Gets known DetectionStatus values. + * + * @return known DetectionStatus values. + */ + public static Collection values() { + return values(DetectionStatus.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentType.java index 9d1346962f4f..29768af80222 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentType.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentType.java @@ -17,11 +17,6 @@ public final class DotNetComponentType extends ExpandableStringEnum replicas; + + /** + * Creates an instance of ExecutionStatus class. + */ + public ExecutionStatus() { + } + + /** + * Get the replicas property: Replicas in the execution. + * + * @return the replicas value. + */ + public List replicas() { + return this.replicas; + } + + /** + * Set the replicas property: Replicas in the execution. + * + * @param replicas the replicas value to set. + * @return the ExecutionStatus object itself. + */ + public ExecutionStatus withReplicas(List replicas) { + this.replicas = replicas; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (replicas() != null) { + replicas().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/FunctionsExtensions.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/FunctionsExtensions.java new file mode 100644 index 000000000000..3a5584b9d59a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/FunctionsExtensions.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.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of FunctionsExtensions. + */ +public interface FunctionsExtensions { + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + Response invokeFunctionsHostWithResponse(String resourceGroupName, String containerAppName, + String revisionName, String functionAppName, Context context); + + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + String invokeFunctionsHost(String resourceGroupName, String containerAppName, String revisionName, + String functionAppName); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java index 0ecbbf8ea5f2..6c8cc9fced4d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java @@ -28,6 +28,13 @@ public final class HttpScaleRule { @JsonProperty(value = "auth") private List auth; + /* + * The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for + * system-assigned identity. + */ + @JsonProperty(value = "identity") + private String identity; + /** * Creates an instance of HttpScaleRule class. */ @@ -74,6 +81,28 @@ public HttpScaleRule withAuth(List auth) { return this; } + /** + * Get the identity property: The resource ID of a user-assigned managed identity that is assigned to the Container + * App, or 'system' for system-assigned identity. + * + * @return the identity value. + */ + public String identity() { + return this.identity; + } + + /** + * Set the identity property: The resource ID of a user-assigned managed identity that is assigned to the Container + * App, or 'system' for system-assigned identity. + * + * @param identity the identity value to set. + * @return the HttpScaleRule object itself. + */ + public HttpScaleRule withIdentity(String identity) { + this.identity = identity; + return this; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ImageType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ImageType.java new file mode 100644 index 000000000000..a93ae5d42aa5 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ImageType.java @@ -0,0 +1,54 @@ +// Copyright (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; + +/** + * The type of the image. Set to CloudBuild to let the system manages the image, where user will not be able to update + * image through image field. Set to ContainerImage for user provided image. + */ +public final class ImageType extends ExpandableStringEnum { + /** + * Static value CloudBuild for ImageType. + */ + public static final ImageType CLOUD_BUILD = fromString("CloudBuild"); + + /** + * Static value ContainerImage for ImageType. + */ + public static final ImageType CONTAINER_IMAGE = fromString("ContainerImage"); + + /** + * Creates a new instance of ImageType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public ImageType() { + } + + /** + * Creates or finds a ImageType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ImageType. + */ + @JsonCreator + public static ImageType fromString(String name) { + return fromString(name, ImageType.class); + } + + /** + * Gets known ImageType values. + * + * @return known ImageType values. + */ + public static Collection values() { + return values(ImageType.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/InitContainer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/InitContainer.java index dc57c485c5b8..b166483e7b57 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/InitContainer.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/InitContainer.java @@ -27,6 +27,15 @@ public InitContainer withImage(String image) { return this; } + /** + * {@inheritDoc} + */ + @Override + public InitContainer withImageType(ImageType imageType) { + super.withImageType(imageType); + return this; + } + /** * {@inheritDoc} */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponent.java index bf42b2379e15..0faa35c4e557 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponent.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponent.java @@ -7,7 +7,6 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner; -import java.util.List; /** * An immutable client-side representation of JavaComponent. @@ -35,39 +34,18 @@ public interface JavaComponent { String type(); /** - * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. - */ - SystemData systemData(); - - /** - * Gets the componentType property: Type of the Java Component. + * Gets the properties property: Java Component resource specific properties. * - * @return the componentType value. + * @return the properties value. */ - JavaComponentType componentType(); + JavaComponentProperties properties(); /** - * Gets the provisioningState property: Provisioning state of the Java Component. - * - * @return the provisioningState value. - */ - JavaComponentProvisioningState provisioningState(); - - /** - * Gets the configurations property: List of Java Components configuration properties. - * - * @return the configurations value. - */ - List configurations(); - - /** - * Gets the serviceBinds property: List of Java Components that are bound to the Java component. + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * - * @return the serviceBinds value. + * @return the systemData value. */ - List serviceBinds(); + SystemData systemData(); /** * Gets the name of the resource group. @@ -118,8 +96,7 @@ interface WithParentResource { * The stage of the JavaComponent definition which contains all the minimum required properties for the resource * to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithComponentType, DefinitionStages.WithConfigurations, - DefinitionStages.WithServiceBinds { + interface WithCreate extends DefinitionStages.WithProperties { /** * Executes the create request. * @@ -137,42 +114,16 @@ interface WithCreate extends DefinitionStages.WithComponentType, DefinitionStage } /** - * The stage of the JavaComponent definition allowing to specify componentType. - */ - interface WithComponentType { - /** - * Specifies the componentType property: Type of the Java Component.. - * - * @param componentType Type of the Java Component. - * @return the next definition stage. - */ - WithCreate withComponentType(JavaComponentType componentType); - } - - /** - * The stage of the JavaComponent definition allowing to specify configurations. + * The stage of the JavaComponent definition allowing to specify properties. */ - interface WithConfigurations { + interface WithProperties { /** - * Specifies the configurations property: List of Java Components configuration properties. + * Specifies the properties property: Java Component resource specific properties. * - * @param configurations List of Java Components configuration properties. + * @param properties Java Component resource specific properties. * @return the next definition stage. */ - WithCreate withConfigurations(List configurations); - } - - /** - * The stage of the JavaComponent definition allowing to specify serviceBinds. - */ - interface WithServiceBinds { - /** - * Specifies the serviceBinds property: List of Java Components that are bound to the Java component. - * - * @param serviceBinds List of Java Components that are bound to the Java component. - * @return the next definition stage. - */ - WithCreate withServiceBinds(List serviceBinds); + WithCreate withProperties(JavaComponentProperties properties); } } @@ -186,8 +137,7 @@ interface WithServiceBinds { /** * The template for JavaComponent update. */ - interface Update - extends UpdateStages.WithComponentType, UpdateStages.WithConfigurations, UpdateStages.WithServiceBinds { + interface Update extends UpdateStages.WithProperties { /** * Executes the update request. * @@ -209,42 +159,16 @@ interface Update */ interface UpdateStages { /** - * The stage of the JavaComponent update allowing to specify componentType. - */ - interface WithComponentType { - /** - * Specifies the componentType property: Type of the Java Component.. - * - * @param componentType Type of the Java Component. - * @return the next definition stage. - */ - Update withComponentType(JavaComponentType componentType); - } - - /** - * The stage of the JavaComponent update allowing to specify configurations. - */ - interface WithConfigurations { - /** - * Specifies the configurations property: List of Java Components configuration properties. - * - * @param configurations List of Java Components configuration properties. - * @return the next definition stage. - */ - Update withConfigurations(List configurations); - } - - /** - * The stage of the JavaComponent update allowing to specify serviceBinds. + * The stage of the JavaComponent update allowing to specify properties. */ - interface WithServiceBinds { + interface WithProperties { /** - * Specifies the serviceBinds property: List of Java Components that are bound to the Java component. + * Specifies the properties property: Java Component resource specific properties. * - * @param serviceBinds List of Java Components that are bound to the Java component. + * @param properties Java Component resource specific properties. * @return the next definition stage. */ - Update withServiceBinds(List serviceBinds); + Update withProperties(JavaComponentProperties properties); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentIngress.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentIngress.java new file mode 100644 index 000000000000..3605627361d1 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentIngress.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Container App Ingress configuration. + */ +@Immutable +public final class JavaComponentIngress { + /* + * Hostname of the Java Component endpoint + */ + @JsonProperty(value = "fqdn", access = JsonProperty.Access.WRITE_ONLY) + private String fqdn; + + /** + * Creates an instance of JavaComponentIngress class. + */ + public JavaComponentIngress() { + } + + /** + * Get the fqdn property: Hostname of the Java Component endpoint. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.fqdn; + } + + /** + * 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/fluent/models/JavaComponentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentProperties.java similarity index 71% rename from sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JavaComponentProperties.java rename to sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentProperties.java index 7b0b5c56ad9e..4da14d4fd0c7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JavaComponentProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentProperties.java @@ -2,27 +2,31 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -package com.azure.resourcemanager.appcontainers.fluent.models; +package com.azure.resourcemanager.appcontainers.models; import com.azure.core.annotation.Fluent; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentProvisioningState; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; import java.util.List; /** - * Java Component resource specific properties. + * Java Component common properties. */ +@JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.PROPERTY, + property = "componentType", + defaultImpl = JavaComponentProperties.class) +@JsonTypeName("JavaComponentProperties") +@JsonSubTypes({ + @JsonSubTypes.Type(name = "SpringBootAdmin", value = SpringBootAdminComponent.class), + @JsonSubTypes.Type(name = "Nacos", value = NacosComponent.class), + @JsonSubTypes.Type(name = "SpringCloudEureka", value = SpringCloudEurekaComponent.class), + @JsonSubTypes.Type(name = "SpringCloudConfig", value = SpringCloudConfigComponent.class) }) @Fluent -public final class JavaComponentProperties { - /* - * Type of the Java Component. - */ - @JsonProperty(value = "componentType") - private JavaComponentType componentType; - +public class JavaComponentProperties { /* * Provisioning state of the Java Component. */ @@ -47,26 +51,6 @@ public final class JavaComponentProperties { public JavaComponentProperties() { } - /** - * Get the componentType property: Type of the Java Component. - * - * @return the componentType value. - */ - public JavaComponentType componentType() { - return this.componentType; - } - - /** - * Set the componentType property: Type of the Java Component. - * - * @param componentType the componentType value to set. - * @return the JavaComponentProperties object itself. - */ - public JavaComponentProperties withComponentType(JavaComponentType componentType) { - this.componentType = componentType; - return this; - } - /** * Get the provisioningState property: Provisioning state of the Java Component. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentType.java index 60c54e06369d..d9b56599c589 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentType.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentType.java @@ -27,6 +27,11 @@ public final class JavaComponentType extends ExpandableStringEnum auth; + /* + * The resource ID of a user-assigned managed identity that is assigned to the job, or 'system' for system-assigned + * identity. + */ + @JsonProperty(value = "identity") + private String identity; + /** * Creates an instance of JobScaleRule class. */ @@ -126,6 +133,28 @@ public JobScaleRule withAuth(List auth) { return this; } + /** + * Get the identity property: The resource ID of a user-assigned managed identity that is assigned to the job, or + * 'system' for system-assigned identity. + * + * @return the identity value. + */ + public String identity() { + return this.identity; + } + + /** + * Set the identity property: The resource ID of a user-assigned managed identity that is assigned to the job, or + * 'system' for system-assigned identity. + * + * @param identity the identity value to set. + * @return the JobScaleRule object itself. + */ + public JobScaleRule withIdentity(String identity) { + this.identity = identity; + return this; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Kind.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Kind.java new file mode 100644 index 000000000000..4658255e44e8 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Kind.java @@ -0,0 +1,49 @@ +// Copyright (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; + +/** + * Metadata used to render different experiences for resources of the same type; e.g. WorkflowApp is a kind of + * Microsoft.App/ContainerApps type. If supported, the resource provider must validate and persist this value. + */ +public final class Kind extends ExpandableStringEnum { + /** + * Static value workflowapp for Kind. + */ + public static final Kind WORKFLOWAPP = fromString("workflowapp"); + + /** + * Creates a new instance of Kind value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Kind() { + } + + /** + * Creates or finds a Kind from its string representation. + * + * @param name a name to look for. + * @return the corresponding Kind. + */ + @JsonCreator + public static Kind fromString(String name) { + return fromString(name, Kind.class); + } + + /** + * Gets known Kind values. + * + * @return known Kind values. + */ + public static Collection values() { + return values(Kind.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Level.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Level.java new file mode 100644 index 000000000000..2ebdd69db318 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Level.java @@ -0,0 +1,73 @@ +// Copyright (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; + +/** + * The specified logger's log level. + */ +public final class Level extends ExpandableStringEnum { + /** + * Static value off for Level. + */ + public static final Level OFF = fromString("off"); + + /** + * Static value error for Level. + */ + public static final Level ERROR = fromString("error"); + + /** + * Static value info for Level. + */ + public static final Level INFO = fromString("info"); + + /** + * Static value debug for Level. + */ + public static final Level DEBUG = fromString("debug"); + + /** + * Static value trace for Level. + */ + public static final Level TRACE = fromString("trace"); + + /** + * Static value warn for Level. + */ + public static final Level WARN = fromString("warn"); + + /** + * Creates a new instance of Level value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public Level() { + } + + /** + * Creates or finds a Level from its string representation. + * + * @param name a name to look for. + * @return the corresponding Level. + */ + @JsonCreator + public static Level fromString(String name) { + return fromString(name, Level.class); + } + + /** + * Gets known Level values. + * + * @return known Level values. + */ + public static Collection values() { + return values(Level.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoggerSetting.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoggerSetting.java new file mode 100644 index 000000000000..f23b64922531 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoggerSetting.java @@ -0,0 +1,91 @@ +// Copyright (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; + +/** + * Logger settings for java workloads. + */ +@Fluent +public final class LoggerSetting { + /* + * Logger name. + */ + @JsonProperty(value = "logger", required = true) + private String logger; + + /* + * The specified logger's log level. + */ + @JsonProperty(value = "level", required = true) + private Level level; + + /** + * Creates an instance of LoggerSetting class. + */ + public LoggerSetting() { + } + + /** + * Get the logger property: Logger name. + * + * @return the logger value. + */ + public String logger() { + return this.logger; + } + + /** + * Set the logger property: Logger name. + * + * @param logger the logger value to set. + * @return the LoggerSetting object itself. + */ + public LoggerSetting withLogger(String logger) { + this.logger = logger; + return this; + } + + /** + * Get the level property: The specified logger's log level. + * + * @return the level value. + */ + public Level level() { + return this.level; + } + + /** + * Set the level property: The specified logger's log level. + * + * @param level the level value to set. + * @return the LoggerSetting object itself. + */ + public LoggerSetting withLevel(Level level) { + this.level = level; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (logger() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property logger in model LoggerSetting")); + } + if (level() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property level in model LoggerSetting")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(LoggerSetting.class); +} 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 1999293a6283..b036a108edd9 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 @@ -205,6 +205,13 @@ public interface ManagedEnvironment { */ ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication(); + /** + * Gets the peerTrafficConfiguration property: Peer traffic settings for the Managed Environment. + * + * @return the peerTrafficConfiguration value. + */ + ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration(); + /** * Gets the region of the resource. * @@ -288,14 +295,15 @@ interface WithResourceGroup { * The stage of the ManagedEnvironment definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithKind, - DefinitionStages.WithIdentity, DefinitionStages.WithDaprAIInstrumentationKey, - DefinitionStages.WithDaprAIConnectionString, DefinitionStages.WithVnetConfiguration, - DefinitionStages.WithAppLogsConfiguration, DefinitionStages.WithAppInsightsConfiguration, - DefinitionStages.WithOpenTelemetryConfiguration, DefinitionStages.WithZoneRedundant, - DefinitionStages.WithCustomDomainConfiguration, DefinitionStages.WithWorkloadProfiles, - DefinitionStages.WithKedaConfiguration, DefinitionStages.WithDaprConfiguration, - DefinitionStages.WithInfrastructureResourceGroup, DefinitionStages.WithPeerAuthentication { + interface WithCreate + extends DefinitionStages.WithTags, DefinitionStages.WithKind, DefinitionStages.WithIdentity, + DefinitionStages.WithDaprAIInstrumentationKey, DefinitionStages.WithDaprAIConnectionString, + DefinitionStages.WithVnetConfiguration, DefinitionStages.WithAppLogsConfiguration, + DefinitionStages.WithAppInsightsConfiguration, DefinitionStages.WithOpenTelemetryConfiguration, + DefinitionStages.WithZoneRedundant, DefinitionStages.WithCustomDomainConfiguration, + DefinitionStages.WithWorkloadProfiles, DefinitionStages.WithKedaConfiguration, + DefinitionStages.WithDaprConfiguration, DefinitionStages.WithInfrastructureResourceGroup, + DefinitionStages.WithPeerAuthentication, DefinitionStages.WithPeerTrafficConfiguration { /** * Executes the create request. * @@ -533,6 +541,20 @@ interface WithPeerAuthentication { */ WithCreate withPeerAuthentication(ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication); } + + /** + * The stage of the ManagedEnvironment definition allowing to specify peerTrafficConfiguration. + */ + interface WithPeerTrafficConfiguration { + /** + * Specifies the peerTrafficConfiguration property: Peer traffic settings for the Managed Environment. + * + * @param peerTrafficConfiguration Peer traffic settings for the Managed Environment. + * @return the next definition stage. + */ + WithCreate withPeerTrafficConfiguration( + ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration); + } } /** @@ -550,7 +572,8 @@ interface Update extends UpdateStages.WithTags, UpdateStages.WithKind, UpdateSta UpdateStages.WithVnetConfiguration, UpdateStages.WithAppLogsConfiguration, UpdateStages.WithAppInsightsConfiguration, UpdateStages.WithOpenTelemetryConfiguration, UpdateStages.WithCustomDomainConfiguration, UpdateStages.WithWorkloadProfiles, - UpdateStages.WithKedaConfiguration, UpdateStages.WithDaprConfiguration, UpdateStages.WithPeerAuthentication { + UpdateStages.WithKedaConfiguration, UpdateStages.WithDaprConfiguration, UpdateStages.WithPeerAuthentication, + UpdateStages.WithPeerTrafficConfiguration { /** * Executes the update request. * @@ -762,6 +785,20 @@ interface WithPeerAuthentication { */ Update withPeerAuthentication(ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication); } + + /** + * The stage of the ManagedEnvironment update allowing to specify peerTrafficConfiguration. + */ + interface WithPeerTrafficConfiguration { + /** + * Specifies the peerTrafficConfiguration property: Peer traffic settings for the Managed Environment. + * + * @param peerTrafficConfiguration Peer traffic settings for the Managed Environment. + * @return the next definition stage. + */ + Update withPeerTrafficConfiguration( + ManagedEnvironmentPropertiesPeerTrafficConfiguration peerTrafficConfiguration); + } } /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerTrafficConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerTrafficConfiguration.java new file mode 100644 index 000000000000..ebbb153ee410 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerTrafficConfiguration.java @@ -0,0 +1,58 @@ +// Copyright (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 traffic settings for the Managed Environment. + */ +@Fluent +public final class ManagedEnvironmentPropertiesPeerTrafficConfiguration { + /* + * Peer traffic encryption settings for the Managed Environment + */ + @JsonProperty(value = "encryption") + private ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption encryption; + + /** + * Creates an instance of ManagedEnvironmentPropertiesPeerTrafficConfiguration class. + */ + public ManagedEnvironmentPropertiesPeerTrafficConfiguration() { + } + + /** + * Get the encryption property: Peer traffic encryption settings for the Managed Environment. + * + * @return the encryption value. + */ + public ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption encryption() { + return this.encryption; + } + + /** + * Set the encryption property: Peer traffic encryption settings for the Managed Environment. + * + * @param encryption the encryption value to set. + * @return the ManagedEnvironmentPropertiesPeerTrafficConfiguration object itself. + */ + public ManagedEnvironmentPropertiesPeerTrafficConfiguration + withEncryption(ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption encryption) { + this.encryption = encryption; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (encryption() != null) { + encryption().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption.java new file mode 100644 index 000000000000..a70cffa94be1 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption.java @@ -0,0 +1,54 @@ +// Copyright (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 traffic encryption settings for the Managed Environment. + */ +@Fluent +public final class ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption { + /* + * Boolean indicating whether the peer traffic encryption is enabled + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /** + * Creates an instance of ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption class. + */ + public ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption() { + } + + /** + * Get the enabled property: Boolean indicating whether the peer traffic encryption is enabled. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Boolean indicating whether the peer traffic encryption is enabled. + * + * @param enabled the enabled value to set. + * @return the ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption object itself. + */ + public ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption 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/NacosComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/NacosComponent.java new file mode 100644 index 000000000000..62a08a6afeea --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/NacosComponent.java @@ -0,0 +1,82 @@ +// Copyright (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 com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** + * Nacos properties. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "componentType") +@JsonTypeName("Nacos") +@Fluent +public final class NacosComponent extends JavaComponentProperties { + /* + * Java Component Ingress configurations. + */ + @JsonProperty(value = "ingress") + private JavaComponentIngress ingress; + + /** + * Creates an instance of NacosComponent class. + */ + public NacosComponent() { + } + + /** + * Get the ingress property: Java Component Ingress configurations. + * + * @return the ingress value. + */ + public JavaComponentIngress ingress() { + return this.ingress; + } + + /** + * Set the ingress property: Java Component Ingress configurations. + * + * @param ingress the ingress value to set. + * @return the NacosComponent object itself. + */ + public NacosComponent withIngress(JavaComponentIngress ingress) { + this.ingress = ingress; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public NacosComponent withConfigurations(List configurations) { + super.withConfigurations(configurations); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public NacosComponent withServiceBinds(List serviceBinds) { + super.withServiceBinds(serviceBinds); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (ingress() != null) { + ingress().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchApplyStatus.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchApplyStatus.java new file mode 100644 index 000000000000..3c858a73ae3e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchApplyStatus.java @@ -0,0 +1,88 @@ +// Copyright (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; + +/** + * The status of the patch once it has been provisioned. + */ +public final class PatchApplyStatus extends ExpandableStringEnum { + /** + * Static value NotStarted for PatchApplyStatus. + */ + public static final PatchApplyStatus NOT_STARTED = fromString("NotStarted"); + + /** + * Static value RebaseInProgress for PatchApplyStatus. + */ + public static final PatchApplyStatus REBASE_IN_PROGRESS = fromString("RebaseInProgress"); + + /** + * Static value CreatingRevision for PatchApplyStatus. + */ + public static final PatchApplyStatus CREATING_REVISION = fromString("CreatingRevision"); + + /** + * Static value Succeeded for PatchApplyStatus. + */ + public static final PatchApplyStatus SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Canceled for PatchApplyStatus. + */ + public static final PatchApplyStatus CANCELED = fromString("Canceled"); + + /** + * Static value RebaseFailed for PatchApplyStatus. + */ + public static final PatchApplyStatus REBASE_FAILED = fromString("RebaseFailed"); + + /** + * Static value RevisionCreationFailed for PatchApplyStatus. + */ + public static final PatchApplyStatus REVISION_CREATION_FAILED = fromString("RevisionCreationFailed"); + + /** + * Static value ImagePushPullFailed for PatchApplyStatus. + */ + public static final PatchApplyStatus IMAGE_PUSH_PULL_FAILED = fromString("ImagePushPullFailed"); + + /** + * Static value ManuallySkipped for PatchApplyStatus. + */ + public static final PatchApplyStatus MANUALLY_SKIPPED = fromString("ManuallySkipped"); + + /** + * Creates a new instance of PatchApplyStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PatchApplyStatus() { + } + + /** + * Creates or finds a PatchApplyStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding PatchApplyStatus. + */ + @JsonCreator + public static PatchApplyStatus fromString(String name) { + return fromString(name, PatchApplyStatus.class); + } + + /** + * Gets known PatchApplyStatus values. + * + * @return known PatchApplyStatus values. + */ + public static Collection values() { + return values(PatchApplyStatus.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchCollection.java new file mode 100644 index 000000000000..1075fe3bf1d9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchCollection.java @@ -0,0 +1,91 @@ +// Copyright (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.ContainerAppsPatchResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Container App patch collection. + */ +@Fluent +public final class PatchCollection { + /* + * Collection of patch resources. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * the link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of PatchCollection class. + */ + public PatchCollection() { + } + + /** + * Get the value property: Collection of patch resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Collection of patch resources. + * + * @param value the value value to set. + * @return the PatchCollection object itself. + */ + public PatchCollection withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: the link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: the link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the PatchCollection object itself. + */ + public PatchCollection withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model PatchCollection")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(PatchCollection.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetails.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetails.java new file mode 100644 index 000000000000..9e7ba74ee217 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetails.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * The detailed info of patch operation performing when applying a patch. + */ +@Immutable +public final class PatchDetails { + /* + * The name of the target container for the patch. + */ + @JsonProperty(value = "targetContainerName", required = true, access = JsonProperty.Access.WRITE_ONLY) + private String targetContainerName; + + /* + * The name of the target image for the patch. + */ + @JsonProperty(value = "targetImage", required = true, access = JsonProperty.Access.WRITE_ONLY) + private String targetImage; + + /* + * The UTC timestamp that describes the latest detection was done. + */ + @JsonProperty(value = "lastDetectionTime", required = true, access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastDetectionTime; + + /* + * The status of the patch detection. + */ + @JsonProperty(value = "detectionStatus", required = true, access = JsonProperty.Access.WRITE_ONLY) + private DetectionStatus detectionStatus; + + /* + * The name of the new image created by the patch. + */ + @JsonProperty(value = "newImageName", access = JsonProperty.Access.WRITE_ONLY) + private String newImageName; + + /* + * New layer update details in the target image. + */ + @JsonProperty(value = "newLayer", access = JsonProperty.Access.WRITE_ONLY) + private PatchDetailsNewLayer newLayer; + + /* + * The old layer details in the target image. + */ + @JsonProperty(value = "oldLayer", access = JsonProperty.Access.WRITE_ONLY) + private PatchDetailsOldLayer oldLayer; + + /* + * The type for the patch. + */ + @JsonProperty(value = "patchType", access = JsonProperty.Access.WRITE_ONLY) + private PatchType patchType; + + /** + * Creates an instance of PatchDetails class. + */ + public PatchDetails() { + } + + /** + * Get the targetContainerName property: The name of the target container for the patch. + * + * @return the targetContainerName value. + */ + public String targetContainerName() { + return this.targetContainerName; + } + + /** + * Get the targetImage property: The name of the target image for the patch. + * + * @return the targetImage value. + */ + public String targetImage() { + return this.targetImage; + } + + /** + * Get the lastDetectionTime property: The UTC timestamp that describes the latest detection was done. + * + * @return the lastDetectionTime value. + */ + public OffsetDateTime lastDetectionTime() { + return this.lastDetectionTime; + } + + /** + * Get the detectionStatus property: The status of the patch detection. + * + * @return the detectionStatus value. + */ + public DetectionStatus detectionStatus() { + return this.detectionStatus; + } + + /** + * Get the newImageName property: The name of the new image created by the patch. + * + * @return the newImageName value. + */ + public String newImageName() { + return this.newImageName; + } + + /** + * Get the newLayer property: New layer update details in the target image. + * + * @return the newLayer value. + */ + public PatchDetailsNewLayer newLayer() { + return this.newLayer; + } + + /** + * Get the oldLayer property: The old layer details in the target image. + * + * @return the oldLayer value. + */ + public PatchDetailsOldLayer oldLayer() { + return this.oldLayer; + } + + /** + * Get the patchType property: The type for the patch. + * + * @return the patchType value. + */ + public PatchType patchType() { + return this.patchType; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (newLayer() != null) { + newLayer().validate(); + } + if (oldLayer() != null) { + oldLayer().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsNewLayer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsNewLayer.java new file mode 100644 index 000000000000..89b001dd8884 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsNewLayer.java @@ -0,0 +1,106 @@ +// Copyright (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; + +/** + * New layer update details in the target image. + */ +@Fluent +public final class PatchDetailsNewLayer { + /* + * The details of the new layer for the target image. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The framework and its version in the new run image for the target image. + */ + @JsonProperty(value = "frameworkAndVersion") + private String frameworkAndVersion; + + /* + * The OS name and its version in the new run image for the target image. + */ + @JsonProperty(value = "osAndVersion") + private String osAndVersion; + + /** + * Creates an instance of PatchDetailsNewLayer class. + */ + public PatchDetailsNewLayer() { + } + + /** + * Get the name property: The details of the new layer for the target image. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The details of the new layer for the target image. + * + * @param name the name value to set. + * @return the PatchDetailsNewLayer object itself. + */ + public PatchDetailsNewLayer withName(String name) { + this.name = name; + return this; + } + + /** + * Get the frameworkAndVersion property: The framework and its version in the new run image for the target image. + * + * @return the frameworkAndVersion value. + */ + public String frameworkAndVersion() { + return this.frameworkAndVersion; + } + + /** + * Set the frameworkAndVersion property: The framework and its version in the new run image for the target image. + * + * @param frameworkAndVersion the frameworkAndVersion value to set. + * @return the PatchDetailsNewLayer object itself. + */ + public PatchDetailsNewLayer withFrameworkAndVersion(String frameworkAndVersion) { + this.frameworkAndVersion = frameworkAndVersion; + return this; + } + + /** + * Get the osAndVersion property: The OS name and its version in the new run image for the target image. + * + * @return the osAndVersion value. + */ + public String osAndVersion() { + return this.osAndVersion; + } + + /** + * Set the osAndVersion property: The OS name and its version in the new run image for the target image. + * + * @param osAndVersion the osAndVersion value to set. + * @return the PatchDetailsNewLayer object itself. + */ + public PatchDetailsNewLayer withOsAndVersion(String osAndVersion) { + this.osAndVersion = osAndVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsOldLayer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsOldLayer.java new file mode 100644 index 000000000000..5164fd589246 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchDetailsOldLayer.java @@ -0,0 +1,106 @@ +// Copyright (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; + +/** + * The old layer details in the target image. + */ +@Fluent +public final class PatchDetailsOldLayer { + /* + * The details of the old layer for the target image. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The framework and its version in the old run image for the target image. + */ + @JsonProperty(value = "frameworkAndVersion") + private String frameworkAndVersion; + + /* + * The OS name and its version in the old run image for the target image. + */ + @JsonProperty(value = "osAndVersion") + private String osAndVersion; + + /** + * Creates an instance of PatchDetailsOldLayer class. + */ + public PatchDetailsOldLayer() { + } + + /** + * Get the name property: The details of the old layer for the target image. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The details of the old layer for the target image. + * + * @param name the name value to set. + * @return the PatchDetailsOldLayer object itself. + */ + public PatchDetailsOldLayer withName(String name) { + this.name = name; + return this; + } + + /** + * Get the frameworkAndVersion property: The framework and its version in the old run image for the target image. + * + * @return the frameworkAndVersion value. + */ + public String frameworkAndVersion() { + return this.frameworkAndVersion; + } + + /** + * Set the frameworkAndVersion property: The framework and its version in the old run image for the target image. + * + * @param frameworkAndVersion the frameworkAndVersion value to set. + * @return the PatchDetailsOldLayer object itself. + */ + public PatchDetailsOldLayer withFrameworkAndVersion(String frameworkAndVersion) { + this.frameworkAndVersion = frameworkAndVersion; + return this; + } + + /** + * Get the osAndVersion property: The OS name and its version in the old run image for the target image. + * + * @return the osAndVersion value. + */ + public String osAndVersion() { + return this.osAndVersion; + } + + /** + * Set the osAndVersion property: The OS name and its version in the old run image for the target image. + * + * @param osAndVersion the osAndVersion value to set. + * @return the PatchDetailsOldLayer object itself. + */ + public PatchDetailsOldLayer withOsAndVersion(String osAndVersion) { + this.osAndVersion = osAndVersion; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchProperties.java new file mode 100644 index 000000000000..bdb458782b34 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchProperties.java @@ -0,0 +1,171 @@ +// Copyright (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.time.OffsetDateTime; +import java.util.List; + +/** + * Top level properties that describes current states of the patch resource. + */ +@Fluent +public final class PatchProperties { + /* + * The Azure resource id of the target environment for the patch. + */ + @JsonProperty(value = "targetEnvironmentId") + private String targetEnvironmentId; + + /* + * The Azure resource id of the target container app for the patch. + */ + @JsonProperty(value = "targetContainerAppId") + private String targetContainerAppId; + + /* + * The Azure resource id of the target revision for the patch. + */ + @JsonProperty(value = "targetRevisionId") + private String targetRevisionId; + + /* + * The status of the patch operation. + */ + @JsonProperty(value = "patchApplyStatus", access = JsonProperty.Access.WRITE_ONLY) + private PatchApplyStatus patchApplyStatus; + + /* + * The UTC timestamp that describes when the patch object was created. + */ + @JsonProperty(value = "createdAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime createdAt; + + /* + * The UTC timestamp that describes when the patch object was last updated. + */ + @JsonProperty(value = "lastModifiedAt", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastModifiedAt; + + /* + * Detailed info describes the patch operation for the target container app. + */ + @JsonProperty(value = "patchDetails", access = JsonProperty.Access.WRITE_ONLY) + private List patchDetails; + + /** + * Creates an instance of PatchProperties class. + */ + public PatchProperties() { + } + + /** + * Get the targetEnvironmentId property: The Azure resource id of the target environment for the patch. + * + * @return the targetEnvironmentId value. + */ + public String targetEnvironmentId() { + return this.targetEnvironmentId; + } + + /** + * Set the targetEnvironmentId property: The Azure resource id of the target environment for the patch. + * + * @param targetEnvironmentId the targetEnvironmentId value to set. + * @return the PatchProperties object itself. + */ + public PatchProperties withTargetEnvironmentId(String targetEnvironmentId) { + this.targetEnvironmentId = targetEnvironmentId; + return this; + } + + /** + * Get the targetContainerAppId property: The Azure resource id of the target container app for the patch. + * + * @return the targetContainerAppId value. + */ + public String targetContainerAppId() { + return this.targetContainerAppId; + } + + /** + * Set the targetContainerAppId property: The Azure resource id of the target container app for the patch. + * + * @param targetContainerAppId the targetContainerAppId value to set. + * @return the PatchProperties object itself. + */ + public PatchProperties withTargetContainerAppId(String targetContainerAppId) { + this.targetContainerAppId = targetContainerAppId; + return this; + } + + /** + * Get the targetRevisionId property: The Azure resource id of the target revision for the patch. + * + * @return the targetRevisionId value. + */ + public String targetRevisionId() { + return this.targetRevisionId; + } + + /** + * Set the targetRevisionId property: The Azure resource id of the target revision for the patch. + * + * @param targetRevisionId the targetRevisionId value to set. + * @return the PatchProperties object itself. + */ + public PatchProperties withTargetRevisionId(String targetRevisionId) { + this.targetRevisionId = targetRevisionId; + return this; + } + + /** + * Get the patchApplyStatus property: The status of the patch operation. + * + * @return the patchApplyStatus value. + */ + public PatchApplyStatus patchApplyStatus() { + return this.patchApplyStatus; + } + + /** + * Get the createdAt property: The UTC timestamp that describes when the patch object was created. + * + * @return the createdAt value. + */ + public OffsetDateTime createdAt() { + return this.createdAt; + } + + /** + * Get the lastModifiedAt property: The UTC timestamp that describes when the patch object was last updated. + * + * @return the lastModifiedAt value. + */ + public OffsetDateTime lastModifiedAt() { + return this.lastModifiedAt; + } + + /** + * Get the patchDetails property: Detailed info describes the patch operation for the target container app. + * + * @return the patchDetails value. + */ + public List patchDetails() { + return this.patchDetails; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (patchDetails() != null) { + patchDetails().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchSkipConfig.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchSkipConfig.java new file mode 100644 index 000000000000..e90ee35e1771 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchSkipConfig.java @@ -0,0 +1,54 @@ +// Copyright (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; + +/** + * The configuration for patcher to skip a patch or not. + */ +@Fluent +public final class PatchSkipConfig { + /* + * The flag to indicate whether to skip the patch or not. + */ + @JsonProperty(value = "skip") + private Boolean skip; + + /** + * Creates an instance of PatchSkipConfig class. + */ + public PatchSkipConfig() { + } + + /** + * Get the skip property: The flag to indicate whether to skip the patch or not. + * + * @return the skip value. + */ + public Boolean skip() { + return this.skip; + } + + /** + * Set the skip property: The flag to indicate whether to skip the patch or not. + * + * @param skip the skip value to set. + * @return the PatchSkipConfig object itself. + */ + public PatchSkipConfig withSkip(Boolean skip) { + this.skip = skip; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchType.java new file mode 100644 index 000000000000..d5140a25703a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchType.java @@ -0,0 +1,63 @@ +// Copyright (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; + +/** + * The type for the patch. + */ +public final class PatchType extends ExpandableStringEnum { + /** + * Static value FrameworkSecurity for PatchType. + */ + public static final PatchType FRAMEWORK_SECURITY = fromString("FrameworkSecurity"); + + /** + * Static value OSSecurity for PatchType. + */ + public static final PatchType OSSECURITY = fromString("OSSecurity"); + + /** + * Static value FrameworkAndOSSecurity for PatchType. + */ + public static final PatchType FRAMEWORK_AND_OSSECURITY = fromString("FrameworkAndOSSecurity"); + + /** + * Static value Other for PatchType. + */ + public static final PatchType OTHER = fromString("Other"); + + /** + * Creates a new instance of PatchType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PatchType() { + } + + /** + * Creates or finds a PatchType from its string representation. + * + * @param name a name to look for. + * @return the corresponding PatchType. + */ + @JsonCreator + public static PatchType fromString(String name) { + return fromString(name, PatchType.class); + } + + /** + * Gets known PatchType values. + * + * @return known PatchType values. + */ + public static Collection values() { + return values(PatchType.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchingMode.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchingMode.java new file mode 100644 index 000000000000..45e2614585de --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PatchingMode.java @@ -0,0 +1,60 @@ +// Copyright (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; + +/** + * Patching mode for the container app. Null or default in this field will be interpreted as Automatic by RP. Automatic + * mode will automatically apply available patches. Manual mode will require the user to manually apply patches. + * Disabled mode will stop patch detection and auto patching. + */ +public final class PatchingMode extends ExpandableStringEnum { + /** + * Static value Automatic for PatchingMode. + */ + public static final PatchingMode AUTOMATIC = fromString("Automatic"); + + /** + * Static value Manual for PatchingMode. + */ + public static final PatchingMode MANUAL = fromString("Manual"); + + /** + * Static value Disabled for PatchingMode. + */ + public static final PatchingMode DISABLED = fromString("Disabled"); + + /** + * Creates a new instance of PatchingMode value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public PatchingMode() { + } + + /** + * Creates or finds a PatchingMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding PatchingMode. + */ + @JsonCreator + public static PatchingMode fromString(String name) { + return fromString(name, PatchingMode.class); + } + + /** + * Gets known PatchingMode values. + * + * @return known PatchingMode values. + */ + public static Collection values() { + return values(PatchingMode.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/QueueScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/QueueScaleRule.java index aef1fb3523f6..08622c4dd77f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/QueueScaleRule.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/QueueScaleRule.java @@ -31,6 +31,13 @@ public final class QueueScaleRule { @JsonProperty(value = "auth") private List auth; + /* + * The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for + * system-assigned identity. + */ + @JsonProperty(value = "identity") + private String identity; + /** * Creates an instance of QueueScaleRule class. */ @@ -97,6 +104,28 @@ public QueueScaleRule withAuth(List auth) { return this; } + /** + * Get the identity property: The resource ID of a user-assigned managed identity that is assigned to the Container + * App, or 'system' for system-assigned identity. + * + * @return the identity value. + */ + public String identity() { + return this.identity; + } + + /** + * Set the identity property: The resource ID of a user-assigned managed identity that is assigned to the Container + * App, or 'system' for system-assigned identity. + * + * @param identity the identity value to set. + * @return the QueueScaleRule object itself. + */ + public QueueScaleRule withIdentity(String identity) { + this.identity = identity; + return this; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaExecutionStatus.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaExecutionStatus.java new file mode 100644 index 000000000000..1451867b6140 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaExecutionStatus.java @@ -0,0 +1,84 @@ +// Copyright (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; + +/** + * Container Apps Job execution replica status. + */ +@Fluent +public final class ReplicaExecutionStatus { + /* + * Replica Name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Containers in the execution replica + */ + @JsonProperty(value = "containers") + private List containers; + + /** + * Creates an instance of ReplicaExecutionStatus class. + */ + public ReplicaExecutionStatus() { + } + + /** + * Get the name property: Replica Name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Replica Name. + * + * @param name the name value to set. + * @return the ReplicaExecutionStatus object itself. + */ + public ReplicaExecutionStatus withName(String name) { + this.name = name; + return this; + } + + /** + * Get the containers property: Containers in the execution replica. + * + * @return the containers value. + */ + public List containers() { + return this.containers; + } + + /** + * Set the containers property: Containers in the execution replica. + * + * @param containers the containers value to set. + * @return the ReplicaExecutionStatus object itself. + */ + public ReplicaExecutionStatus withContainers(List containers) { + this.containers = containers; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (containers() != null) { + containers().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Runtime.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Runtime.java new file mode 100644 index 000000000000..4db435c3aa6e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Runtime.java @@ -0,0 +1,86 @@ +// Copyright (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; + +/** + * Container App Runtime configuration. + */ +@Fluent +public final class Runtime { + /* + * Java app configuration + */ + @JsonProperty(value = "java") + private RuntimeJava java; + + /* + * .NET app configuration + */ + @JsonProperty(value = "dotnet") + private RuntimeDotnet dotnet; + + /** + * Creates an instance of Runtime class. + */ + public Runtime() { + } + + /** + * Get the java property: Java app configuration. + * + * @return the java value. + */ + public RuntimeJava java() { + return this.java; + } + + /** + * Set the java property: Java app configuration. + * + * @param java the java value to set. + * @return the Runtime object itself. + */ + public Runtime withJava(RuntimeJava java) { + this.java = java; + return this; + } + + /** + * Get the dotnet property: .NET app configuration. + * + * @return the dotnet value. + */ + public RuntimeDotnet dotnet() { + return this.dotnet; + } + + /** + * Set the dotnet property: .NET app configuration. + * + * @param dotnet the dotnet value to set. + * @return the Runtime object itself. + */ + public Runtime withDotnet(RuntimeDotnet dotnet) { + this.dotnet = dotnet; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (java() != null) { + java().validate(); + } + if (dotnet() != null) { + dotnet().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeDotnet.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeDotnet.java new file mode 100644 index 000000000000..c43f8333a4a0 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeDotnet.java @@ -0,0 +1,54 @@ +// Copyright (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; + +/** + * .NET app configuration. + */ +@Fluent +public final class RuntimeDotnet { + /* + * Auto configure the ASP.NET Core Data Protection feature + */ + @JsonProperty(value = "autoConfigureDataProtection") + private Boolean autoConfigureDataProtection; + + /** + * Creates an instance of RuntimeDotnet class. + */ + public RuntimeDotnet() { + } + + /** + * Get the autoConfigureDataProtection property: Auto configure the ASP.NET Core Data Protection feature. + * + * @return the autoConfigureDataProtection value. + */ + public Boolean autoConfigureDataProtection() { + return this.autoConfigureDataProtection; + } + + /** + * Set the autoConfigureDataProtection property: Auto configure the ASP.NET Core Data Protection feature. + * + * @param autoConfigureDataProtection the autoConfigureDataProtection value to set. + * @return the RuntimeDotnet object itself. + */ + public RuntimeDotnet withAutoConfigureDataProtection(Boolean autoConfigureDataProtection) { + this.autoConfigureDataProtection = autoConfigureDataProtection; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJava.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJava.java new file mode 100644 index 000000000000..ec54266dfc6d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJava.java @@ -0,0 +1,83 @@ +// Copyright (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; + +/** + * Java app configuration. + */ +@Fluent +public final class RuntimeJava { + /* + * Enable jmx core metrics for the java app + */ + @JsonProperty(value = "enableMetrics") + private Boolean enableMetrics; + + /* + * Diagnostic capabilities achieved by java agent + */ + @JsonProperty(value = "javaAgent") + private RuntimeJavaAgent javaAgent; + + /** + * Creates an instance of RuntimeJava class. + */ + public RuntimeJava() { + } + + /** + * Get the enableMetrics property: Enable jmx core metrics for the java app. + * + * @return the enableMetrics value. + */ + public Boolean enableMetrics() { + return this.enableMetrics; + } + + /** + * Set the enableMetrics property: Enable jmx core metrics for the java app. + * + * @param enableMetrics the enableMetrics value to set. + * @return the RuntimeJava object itself. + */ + public RuntimeJava withEnableMetrics(Boolean enableMetrics) { + this.enableMetrics = enableMetrics; + return this; + } + + /** + * Get the javaAgent property: Diagnostic capabilities achieved by java agent. + * + * @return the javaAgent value. + */ + public RuntimeJavaAgent javaAgent() { + return this.javaAgent; + } + + /** + * Set the javaAgent property: Diagnostic capabilities achieved by java agent. + * + * @param javaAgent the javaAgent value to set. + * @return the RuntimeJava object itself. + */ + public RuntimeJava withJavaAgent(RuntimeJavaAgent javaAgent) { + this.javaAgent = javaAgent; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (javaAgent() != null) { + javaAgent().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJavaAgent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJavaAgent.java new file mode 100644 index 000000000000..d5dec506899d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJavaAgent.java @@ -0,0 +1,83 @@ +// Copyright (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; + +/** + * Diagnostic capabilities achieved by java agent. + */ +@Fluent +public final class RuntimeJavaAgent { + /* + * Enable java agent injection for the java app. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * Capabilities on the java logging scenario. + */ + @JsonProperty(value = "logging") + private RuntimeJavaAgentLogging logging; + + /** + * Creates an instance of RuntimeJavaAgent class. + */ + public RuntimeJavaAgent() { + } + + /** + * Get the enabled property: Enable java agent injection for the java app. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Enable java agent injection for the java app. + * + * @param enabled the enabled value to set. + * @return the RuntimeJavaAgent object itself. + */ + public RuntimeJavaAgent withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the logging property: Capabilities on the java logging scenario. + * + * @return the logging value. + */ + public RuntimeJavaAgentLogging logging() { + return this.logging; + } + + /** + * Set the logging property: Capabilities on the java logging scenario. + * + * @param logging the logging value to set. + * @return the RuntimeJavaAgent object itself. + */ + public RuntimeJavaAgent withLogging(RuntimeJavaAgentLogging logging) { + this.logging = logging; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (logging() != null) { + logging().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJavaAgentLogging.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJavaAgentLogging.java new file mode 100644 index 000000000000..49946dbafa49 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJavaAgentLogging.java @@ -0,0 +1,58 @@ +// Copyright (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; + +/** + * Capabilities on the java logging scenario. + */ +@Fluent +public final class RuntimeJavaAgentLogging { + /* + * Settings of the logger for the java app. + */ + @JsonProperty(value = "loggerSettings") + private List loggerSettings; + + /** + * Creates an instance of RuntimeJavaAgentLogging class. + */ + public RuntimeJavaAgentLogging() { + } + + /** + * Get the loggerSettings property: Settings of the logger for the java app. + * + * @return the loggerSettings value. + */ + public List loggerSettings() { + return this.loggerSettings; + } + + /** + * Set the loggerSettings property: Settings of the logger for the java app. + * + * @param loggerSettings the loggerSettings value to set. + * @return the RuntimeJavaAgentLogging object itself. + */ + public RuntimeJavaAgentLogging withLoggerSettings(List loggerSettings) { + this.loggerSettings = loggerSettings; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (loggerSettings() != null) { + loggerSettings().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringBootAdminComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringBootAdminComponent.java new file mode 100644 index 000000000000..2765a3585f6e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringBootAdminComponent.java @@ -0,0 +1,82 @@ +// Copyright (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 com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** + * Spring Boot Admin properties. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "componentType") +@JsonTypeName("SpringBootAdmin") +@Fluent +public final class SpringBootAdminComponent extends JavaComponentProperties { + /* + * Java Component Ingress configurations. + */ + @JsonProperty(value = "ingress") + private JavaComponentIngress ingress; + + /** + * Creates an instance of SpringBootAdminComponent class. + */ + public SpringBootAdminComponent() { + } + + /** + * Get the ingress property: Java Component Ingress configurations. + * + * @return the ingress value. + */ + public JavaComponentIngress ingress() { + return this.ingress; + } + + /** + * Set the ingress property: Java Component Ingress configurations. + * + * @param ingress the ingress value to set. + * @return the SpringBootAdminComponent object itself. + */ + public SpringBootAdminComponent withIngress(JavaComponentIngress ingress) { + this.ingress = ingress; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpringBootAdminComponent withConfigurations(List configurations) { + super.withConfigurations(configurations); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpringBootAdminComponent withServiceBinds(List serviceBinds) { + super.withServiceBinds(serviceBinds); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (ingress() != null) { + ingress().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudConfigComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudConfigComponent.java new file mode 100644 index 000000000000..4b6c3dde0706 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudConfigComponent.java @@ -0,0 +1,52 @@ +// Copyright (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.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** + * Spring Cloud Config properties. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "componentType") +@JsonTypeName("SpringCloudConfig") +@Fluent +public final class SpringCloudConfigComponent extends JavaComponentProperties { + /** + * Creates an instance of SpringCloudConfigComponent class. + */ + public SpringCloudConfigComponent() { + } + + /** + * {@inheritDoc} + */ + @Override + public SpringCloudConfigComponent withConfigurations(List configurations) { + super.withConfigurations(configurations); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpringCloudConfigComponent withServiceBinds(List serviceBinds) { + super.withServiceBinds(serviceBinds); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudEurekaComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudEurekaComponent.java new file mode 100644 index 000000000000..9be8dcdd5141 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SpringCloudEurekaComponent.java @@ -0,0 +1,82 @@ +// Copyright (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 com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.annotation.JsonTypeName; +import java.util.List; + +/** + * Spring Cloud Eureka properties. + */ +@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "componentType") +@JsonTypeName("SpringCloudEureka") +@Fluent +public final class SpringCloudEurekaComponent extends JavaComponentProperties { + /* + * Java Component Ingress configurations. + */ + @JsonProperty(value = "ingress") + private JavaComponentIngress ingress; + + /** + * Creates an instance of SpringCloudEurekaComponent class. + */ + public SpringCloudEurekaComponent() { + } + + /** + * Get the ingress property: Java Component Ingress configurations. + * + * @return the ingress value. + */ + public JavaComponentIngress ingress() { + return this.ingress; + } + + /** + * Set the ingress property: Java Component Ingress configurations. + * + * @param ingress the ingress value to set. + * @return the SpringCloudEurekaComponent object itself. + */ + public SpringCloudEurekaComponent withIngress(JavaComponentIngress ingress) { + this.ingress = ingress; + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpringCloudEurekaComponent withConfigurations(List configurations) { + super.withConfigurations(configurations); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public SpringCloudEurekaComponent withServiceBinds(List serviceBinds) { + super.withServiceBinds(serviceBinds); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + if (ingress() != null) { + ingress().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpScaleRule.java index d8b26124d95c..6f0229e9a409 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpScaleRule.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpScaleRule.java @@ -28,6 +28,13 @@ public final class TcpScaleRule { @JsonProperty(value = "auth") private List auth; + /* + * The resource ID of a user-assigned managed identity that is assigned to the Container App, or 'system' for + * system-assigned identity. + */ + @JsonProperty(value = "identity") + private String identity; + /** * Creates an instance of TcpScaleRule class. */ @@ -74,6 +81,28 @@ public TcpScaleRule withAuth(List auth) { return this; } + /** + * Get the identity property: The resource ID of a user-assigned managed identity that is assigned to the Container + * App, or 'system' for system-assigned identity. + * + * @return the identity value. + */ + public String identity() { + return this.identity; + } + + /** + * Set the identity property: The resource ID of a user-assigned managed identity that is assigned to the Container + * App, or 'system' for system-assigned identity. + * + * @param identity the identity value to set. + * @return the TcpScaleRule object itself. + */ + public TcpScaleRule withIdentity(String identity) { + this.identity = identity; + return this; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/package-info.java index a5d836af42d9..c0b9d82b3bd0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/package-info.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/package-info.java @@ -4,6 +4,8 @@ /** * Package containing the data models for ContainerAppsApiClient. - * null. + * Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the + * function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions + * extension resource. */ package com.azure.resourcemanager.appcontainers.models; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/package-info.java index 82dc538e0b9f..5e8cbf3c1591 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/package-info.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/package-info.java @@ -4,6 +4,8 @@ /** * Package containing the classes for ContainerAppsApiClient. - * null. + * Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the + * function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions + * extension resource. */ package com.azure.resourcemanager.appcontainers; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/proxy-config.json b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/proxy-config.json index 8de18d9e34b1..9dcdff3e3632 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/proxy-config.json +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/proxy-config.json @@ -1 +1 @@ -[ [ "com.azure.resourcemanager.appcontainers.implementation.AppResilienciesClientImpl$AppResilienciesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsAuthConfigsClientImpl$ContainerAppsAuthConfigsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.AvailableWorkloadProfilesClientImpl$AvailableWorkloadProfilesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BillingMetersClientImpl$BillingMetersService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BuildersClientImpl$BuildersService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BuildsByBuilderResourcesClientImpl$BuildsByBuilderResourcesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BuildsClientImpl$BuildsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BuildAuthTokensClientImpl$BuildAuthTokensService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsClientImpl$ConnectedEnvironmentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsCertificatesClientImpl$ConnectedEnvironmentsCertificatesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsDaprComponentsClientImpl$ConnectedEnvironmentsDaprComponentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsStoragesClientImpl$ConnectedEnvironmentsStoragesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsClientImpl$ContainerAppsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionsClientImpl$ContainerAppsRevisionsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionReplicasClientImpl$ContainerAppsRevisionReplicasService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsDiagnosticsClientImpl$ContainerAppsDiagnosticsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentDiagnosticsClientImpl$ManagedEnvironmentDiagnosticsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsDiagnosticsClientImpl$ManagedEnvironmentsDiagnosticsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.JobsClientImpl$JobsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.JobsExecutionsClientImpl$JobsExecutionsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ResourceProvidersClientImpl$ResourceProvidersService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsClientImpl$ManagedEnvironmentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.CertificatesClientImpl$CertificatesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedCertificatesClientImpl$ManagedCertificatesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.NamespacesClientImpl$NamespacesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.DaprComponentResiliencyPoliciesClientImpl$DaprComponentResiliencyPoliciesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.DaprComponentsClientImpl$DaprComponentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.DaprSubscriptionsClientImpl$DaprSubscriptionsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsStoragesClientImpl$ManagedEnvironmentsStoragesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsSourceControlsClientImpl$ContainerAppsSourceControlsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.UsagesClientImpl$UsagesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentUsagesClientImpl$ManagedEnvironmentUsagesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.JavaComponentsClientImpl$JavaComponentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.DotNetComponentsClientImpl$DotNetComponentsService" ] ] \ No newline at end of file +[ [ "com.azure.resourcemanager.appcontainers.implementation.AppResilienciesClientImpl$AppResilienciesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsAuthConfigsClientImpl$ContainerAppsAuthConfigsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.AvailableWorkloadProfilesClientImpl$AvailableWorkloadProfilesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BillingMetersClientImpl$BillingMetersService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BuildersClientImpl$BuildersService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BuildsByBuilderResourcesClientImpl$BuildsByBuilderResourcesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BuildsClientImpl$BuildsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BuildAuthTokensClientImpl$BuildAuthTokensService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsClientImpl$ConnectedEnvironmentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsCertificatesClientImpl$ConnectedEnvironmentsCertificatesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsDaprComponentsClientImpl$ConnectedEnvironmentsDaprComponentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsStoragesClientImpl$ConnectedEnvironmentsStoragesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsClientImpl$ContainerAppsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionsClientImpl$ContainerAppsRevisionsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionReplicasClientImpl$ContainerAppsRevisionReplicasService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsBuildsByContainerAppsClientImpl$ContainerAppsBuildsByContainerAppsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsBuildsClientImpl$ContainerAppsBuildsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsPatchesClientImpl$ContainerAppsPatchesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsDiagnosticsClientImpl$ContainerAppsDiagnosticsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentDiagnosticsClientImpl$ManagedEnvironmentDiagnosticsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsDiagnosticsClientImpl$ManagedEnvironmentsDiagnosticsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.JobsClientImpl$JobsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.DotNetComponentsClientImpl$DotNetComponentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.JavaComponentsClientImpl$JavaComponentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.JobsExecutionsClientImpl$JobsExecutionsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ResourceProvidersClientImpl$ResourceProvidersService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsClientImpl$ManagedEnvironmentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.CertificatesClientImpl$CertificatesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedCertificatesClientImpl$ManagedCertificatesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.NamespacesClientImpl$NamespacesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.DaprComponentResiliencyPoliciesClientImpl$DaprComponentResiliencyPoliciesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.DaprComponentsClientImpl$DaprComponentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.DaprSubscriptionsClientImpl$DaprSubscriptionsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsStoragesClientImpl$ManagedEnvironmentsStoragesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsSourceControlsClientImpl$ContainerAppsSourceControlsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.UsagesClientImpl$UsagesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentUsagesClientImpl$ManagedEnvironmentUsagesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.FunctionsExtensionsClientImpl$FunctionsExtensionsService" ] ] \ No newline at end of file diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/reflect-config.json b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/reflect-config.json index daaeffa7283a..6e2182e7919f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/reflect-config.json +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/reflect-config.json @@ -533,6 +533,11 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ContainerAppPropertiesPatchingConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.models.Configuration", "allDeclaredConstructors" : true, @@ -583,6 +588,36 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Runtime", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.RuntimeJava", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgent", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgentLogging", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.LoggerSetting", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.RuntimeDotnet", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.models.Service", "allDeclaredConstructors" : true, @@ -763,6 +798,61 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsBuildProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ContainerAppsBuildConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PatchCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppsPatchResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PatchProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PatchDetails", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PatchDetailsNewLayer", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PatchDetailsOldLayer", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PatchSkipConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner", "allDeclaredConstructors" : true, @@ -918,6 +1008,16 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.fluent.models.JobInner", "allDeclaredConstructors" : true, @@ -963,6 +1063,31 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentsCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.models.AvailableOperations", "allDeclaredConstructors" : true, @@ -978,6 +1103,31 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentsCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.models.JobsCollection", "allDeclaredConstructors" : true, @@ -1023,6 +1173,21 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ExecutionStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ReplicaExecutionStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ContainerExecutionStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.fluent.models.JobSecretsCollectionInner", "allDeclaredConstructors" : true, @@ -1214,52 +1379,27 @@ "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentsCollection", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentProperties", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind", - "allDeclaredConstructors" : true, - "allDeclaredFields" : true, - "allDeclaredMethods" : true -}, { - "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentsCollection", + "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentIngress", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner", + "name" : "com.azure.resourcemanager.appcontainers.models.SpringBootAdminComponent", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentProperties", + "name" : "com.azure.resourcemanager.appcontainers.models.NacosComponent", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty", + "name" : "com.azure.resourcemanager.appcontainers.models.SpringCloudEurekaComponent", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind", + "name" : "com.azure.resourcemanager.appcontainers.models.SpringCloudConfigComponent", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true @@ -1318,11 +1458,21 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Kind", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.models.ContainerAppProvisioningState", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PatchingMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode", "allDeclaredConstructors" : true, @@ -1368,6 +1518,16 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Level", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ImageType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.models.Scheme", "allDeclaredConstructors" : true, @@ -1408,6 +1568,21 @@ "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PatchApplyStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DetectionStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PatchType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true }, { "name" : "com.azure.resourcemanager.appcontainers.models.EnvironmentProvisioningState", "allDeclaredConstructors" : true, @@ -1424,37 +1599,37 @@ "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.models.JobExecutionRunningState", + "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentType", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.models.ManagedCertificateDomainControlValidation", + "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentProvisioningState", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.models.SourceControlOperationState", + "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentType", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentType", + "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentProvisioningState", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentProvisioningState", + "name" : "com.azure.resourcemanager.appcontainers.models.JobExecutionRunningState", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentType", + "name" : "com.azure.resourcemanager.appcontainers.models.ManagedCertificateDomainControlValidation", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true }, { - "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentProvisioningState", + "name" : "com.azure.resourcemanager.appcontainers.models.SourceControlOperationState", "allDeclaredConstructors" : true, "allDeclaredFields" : true, "allDeclaredMethods" : true diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyCreateOrUpdateSamples.java index f2dcd1e3fd98..11732fdd87f2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyCreateOrUpdateSamples.java @@ -19,7 +19,7 @@ public final class AppResiliencyCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_CreateOrUpdate + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_CreateOrUpdate * .json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyDeleteSamples.java index ff432a623f64..b1603ef98beb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyDeleteSamples.java @@ -10,7 +10,7 @@ public final class AppResiliencyDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_Delete.json */ /** * Sample code: Delete App Resiliency. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyGetSamples.java index a0a5bd608f42..6bbf4d5fbb80 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyGetSamples.java @@ -10,7 +10,7 @@ public final class AppResiliencyGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_Get.json */ /** * Sample code: Get App Resiliency. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyListSamples.java index dd4f9d77ee94..3c54e4b22bb0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyListSamples.java @@ -10,7 +10,7 @@ public final class AppResiliencyListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_List.json */ /** * Sample code: List App Resiliency. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyUpdateSamples.java index e0d26b251899..44a49d80582b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyUpdateSamples.java @@ -13,7 +13,7 @@ public final class AppResiliencyUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AppResiliency_Patch.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_Patch.json */ /** * Sample code: Update App Resiliency. 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 628041decb5c..c36bfc958c02 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.java @@ -9,7 +9,7 @@ */ public final class AvailableWorkloadProfilesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * AvailableWorkloadProfiles_Get.json */ /** 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 506e65cca4d1..a16e5dc0011f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.java @@ -10,7 +10,7 @@ public final class BillingMetersGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/BillingMeters_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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/BuildAuthTokenListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildAuthTokenListSamples.java index c364ecfe64ff..bda7b21c35ae 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildAuthTokenListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildAuthTokenListSamples.java @@ -10,7 +10,7 @@ public final class BuildAuthTokenListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_ListAuthToken.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_ListAuthToken.json */ /** * Sample code: Get Build Auth Token. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateSamples.java index 227168e3fe8f..b94a065b33cc 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateSamples.java @@ -18,7 +18,7 @@ public final class BuildersCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_CreateOrUpdate.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_CreateOrUpdate.json */ /** * Sample code: Builders_CreateOrUpdate_0. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersDeleteSamples.java index 00990722478d..cebc42f463e9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersDeleteSamples.java @@ -10,7 +10,7 @@ public final class BuildersDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_Delete.json */ /** * Sample code: Builders_Delete_0. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupSamples.java index 9d1b5ef1a93b..155344fdce08 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class BuildersGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_Get.json */ /** * Sample code: Builders_Get_0. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupSamples.java index 96827840fea8..0d1b5a048c25 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class BuildersListByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_ListByResourceGroup + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_ListByResourceGroup * .json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListSamples.java index cd9a5c76be8a..cb33157e5d10 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListSamples.java @@ -10,7 +10,7 @@ public final class BuildersListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_ListBySubscription. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_ListBySubscription. * json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersUpdateSamples.java index db6b95d59959..434aa6d749a2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersUpdateSamples.java @@ -14,7 +14,7 @@ public final class BuildersUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builders_Update.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_Update.json */ /** * Sample code: Builders_Update_0. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsByBuilderResourceListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsByBuilderResourceListSamples.java index 0234c29a09b2..d910e0ef6a90 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsByBuilderResourceListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsByBuilderResourceListSamples.java @@ -10,7 +10,7 @@ public final class BuildsByBuilderResourceListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_ListByBuilderResource + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_ListByBuilderResource * .json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsCreateOrUpdateSamples.java index 1b1cf25bd03d..dac35dfc5783 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsCreateOrUpdateSamples.java @@ -17,7 +17,7 @@ public final class BuildsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_CreateOrUpdate.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_CreateOrUpdate.json */ /** * Sample code: Builds_CreateOrUpdate_WithConfig. @@ -48,7 +48,7 @@ public final class BuildsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * Builds_CreateOrUpdate_NoConfig.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsDeleteSamples.java index 85b1819a1ed1..5cecebbd7498 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsDeleteSamples.java @@ -10,7 +10,7 @@ public final class BuildsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_Delete.json */ /** * Sample code: Builds_Delete_0. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsGetSamples.java index 274c47086205..a6e9edaa8f30 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsGetSamples.java @@ -10,7 +10,7 @@ public final class BuildsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Builds_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_Get.json */ /** * Sample code: Builds_Get_0. 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 0679d0bd5325..df24ceb3de0d 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 @@ -14,7 +14,7 @@ */ public final class CertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * Certificate_CreateOrUpdate_FromKeyVault.json */ /** @@ -35,7 +35,7 @@ public static void createOrUpdateCertificateUsingManagedIdentity( /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Certificate_CreateOrUpdate. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificate_CreateOrUpdate. * json */ /** 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 51fd5931b8c7..9b640db24190 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java @@ -10,7 +10,7 @@ public final class CertificatesDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Certificate_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 89b21554efc5..cec4a1171d47 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java @@ -10,7 +10,7 @@ public final class CertificatesGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Certificate_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 ed4587d1ba6a..20193ded522d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java @@ -9,7 +9,7 @@ */ public final class CertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * Certificates_ListByManagedEnvironment.json */ /** 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 293cf822faea..1a0d7ee405c9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java @@ -14,7 +14,7 @@ public final class CertificatesUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Certificates_Patch.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 a6e0e0999cd0..407d75b5687d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsCertificate_CreateOrUpdate.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java index 8ba3c58c59a4..b0ca09c05182 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsCertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsCertificate_Delete.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java index 55e10d25a725..4cb0333bb32f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsCertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsCertificate_Get.json */ /** 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 8c1d0632f8c6..f3a813215daa 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java index 3204b307a089..2f5d69594ca6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class ConnectedEnvironmentsCertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsCertificates_Patch.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java index c5609981289c..a91b3bce17d8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java @@ -11,7 +11,7 @@ */ public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsCertificates_CheckNameAvailability.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java index 132aecd42e86..d4ee034a23b7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ */ public final class ConnectedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironments_CreateOrUpdate.json */ /** 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 c80b32b2c3d5..2d8a5133673e 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 @@ -15,7 +15,7 @@ */ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json */ /** 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 0d09c50557ed..9ede8991dd6e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsDaprComponents_Delete.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java index 46f5e23495ee..058c0da33e62 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsDaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsDaprComponents_Get.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java index ab17db519628..215e2390cd5f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsDaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsDaprComponents_List.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java index c28a23c8bcc3..cabb8147975a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsDaprComponents_ListSecrets.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java index 8b303c72d1cb..66683fb3cab1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java @@ -10,7 +10,7 @@ public final class ConnectedEnvironmentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironments_Delete + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironments_Delete * .json */ /** 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 4e2b5a153c38..ea8aa9241080 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ConnectedEnvironmentsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironments_Get. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironments_Get. * json */ /** 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 46055391c269..5b73ee3002b1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironments_ListByResourceGroup.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java index 0249dc9cd9c1..efbbbb3269fc 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironments_ListBySubscription.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java index efdbcb1dd3b7..479f734b1431 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java @@ -13,7 +13,7 @@ */ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsStorages_CreateOrUpdate.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java index 1fa1aae1cd26..d4b77dff688a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsStorages_Delete.json */ /** 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 6766bd976d04..a274e727698d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsStorages_Get.json */ /** 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 ae861ce3634f..171e1dbceb49 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java @@ -9,7 +9,7 @@ */ public final class ConnectedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ConnectedEnvironmentsStorages_List.json */ /** 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 c7b698b3a9f2..a82fe9610eb2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java @@ -10,7 +10,7 @@ public final class ConnectedEnvironmentsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ConnectedEnvironments_Patch. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironments_Patch. * json */ /** 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 ba742e7bcea3..f4c38f613bf6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java @@ -18,7 +18,7 @@ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AuthConfigs_CreateOrUpdate. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AuthConfigs_CreateOrUpdate. * json */ /** 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 2c949bcda365..73ae627ac861 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsAuthConfigsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AuthConfigs_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 4ef9610059c3..a46b014a842d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsAuthConfigsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AuthConfigs_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 6735d790759c..86a6c5f06a60 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsAuthConfigsListByContainerAppSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/AuthConfigs_ListByContainer. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AuthConfigs_ListByContainer. * json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsByContainerAppListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsByContainerAppListSamples.java new file mode 100644 index 000000000000..5fde9493962b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsByContainerAppListSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for ContainerAppsBuildsByContainerApp List. + */ +public final class ContainerAppsBuildsByContainerAppListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerAppsBuilds_ListByContainerApp.json + */ + /** + * Sample code: ContainerAppsBuilds_ListByContainerApp_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void containerAppsBuildsListByContainerApp0( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsBuildsByContainerApps().list("rg", "testCapp", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsDeleteSamples.java new file mode 100644 index 000000000000..f1b392ce5e15 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for ContainerAppsBuilds Delete. + */ +public final class ContainerAppsBuildsDeleteSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsBuilds_Delete. + * json + */ + /** + * Sample code: ContainerAppsBuilds_Delete_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + containerAppsBuildsDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsBuilds().delete("rg", "testCapp", "testBuild", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsGetSamples.java new file mode 100644 index 000000000000..c7ba97441185 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsBuildsGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for ContainerAppsBuilds Get. + */ +public final class ContainerAppsBuildsGetSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsBuilds_Get.json + */ + /** + * Sample code: ContainerAppsBuilds_Get_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + containerAppsBuildsGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsBuilds().getWithResponse("rg", "testCapp", "testBuild", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java index 5472e0cc9b7e..133ba16f58e4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java @@ -5,6 +5,7 @@ package com.azure.resourcemanager.appcontainers.generated; import com.azure.resourcemanager.appcontainers.models.Action; +import com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode; import com.azure.resourcemanager.appcontainers.models.Affinity; import com.azure.resourcemanager.appcontainers.models.AppProtocol; import com.azure.resourcemanager.appcontainers.models.BindingType; @@ -14,6 +15,7 @@ import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; +import com.azure.resourcemanager.appcontainers.models.ContainerAppPropertiesPatchingConfiguration; import com.azure.resourcemanager.appcontainers.models.ContainerResources; import com.azure.resourcemanager.appcontainers.models.CorsPolicy; import com.azure.resourcemanager.appcontainers.models.CustomDomain; @@ -21,6 +23,7 @@ import com.azure.resourcemanager.appcontainers.models.Dapr; import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; +import com.azure.resourcemanager.appcontainers.models.ImageType; import com.azure.resourcemanager.appcontainers.models.Ingress; import com.azure.resourcemanager.appcontainers.models.IngressClientCertificateMode; import com.azure.resourcemanager.appcontainers.models.IngressPortMapping; @@ -28,7 +31,16 @@ import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; import com.azure.resourcemanager.appcontainers.models.InitContainer; import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; +import com.azure.resourcemanager.appcontainers.models.Kind; +import com.azure.resourcemanager.appcontainers.models.Level; import com.azure.resourcemanager.appcontainers.models.LogLevel; +import com.azure.resourcemanager.appcontainers.models.LoggerSetting; +import com.azure.resourcemanager.appcontainers.models.PatchingMode; +import com.azure.resourcemanager.appcontainers.models.Runtime; +import com.azure.resourcemanager.appcontainers.models.RuntimeDotnet; +import com.azure.resourcemanager.appcontainers.models.RuntimeJava; +import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgent; +import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgentLogging; import com.azure.resourcemanager.appcontainers.models.Scale; import com.azure.resourcemanager.appcontainers.models.ScaleRule; import com.azure.resourcemanager.appcontainers.models.Service; @@ -49,7 +61,93 @@ */ public final class ContainerAppsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerApps_SourceToCloudApp_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update SourceToCloud App. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + createOrUpdateSourceToCloudApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().define("testcontainerApp0").withRegion("East US").withExistingResourceGroup("rg") + .withEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") + .withWorkloadProfileName("My-GP-01") + .withPatchingConfiguration(new ContainerAppPropertiesPatchingConfiguration() + .withPatchingMode(PatchingMode.AUTOMATIC)) + .withConfiguration( + new Configuration() + .withIngress(new Ingress().withExternal(true).withTargetPort(3000) + .withTraffic(Arrays + .asList(new TrafficWeight().withRevisionName("testcontainerApp0-ab1234").withWeight(100) + .withLabel("production"))) + .withCustomDomains(Arrays.asList(new CustomDomain() + .withName("www.my-name.com").withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), + new CustomDomain().withName("www.my-other-name.com").withBindingType( + BindingType.SNI_ENABLED).withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions(Arrays + .asList(new IpSecurityRestrictionRule().withName("Allow work IP A subnet") + .withDescription("Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/32").withAction(Action.ALLOW), + new IpSecurityRestrictionRule() + .withName("Allow work IP B subnet").withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/8").withAction(Action.ALLOW))) + .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY)) + .withClientCertificateMode(IngressClientCertificateMode.ACCEPT).withCorsPolicy(new CorsPolicy() + .withAllowedOrigins(Arrays.asList("https://a.test.com", "https://b.test.com")) + .withAllowedMethods(Arrays.asList("GET", "POST")).withAllowedHeaders( + Arrays.asList("HEADER1", "HEADER2")) + .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")).withMaxAge(1234) + .withAllowCredentials(true)) + .withAdditionalPortMappings( + Arrays.asList(new IngressPortMapping().withExternal(true).withTargetPort(1234), + new IngressPortMapping().withExternal(false).withTargetPort(2345) + .withExposedPort(3456)))) + .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000) + .withHttpReadBufferSize(30).withHttpMaxRequestSize(10).withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withMaxInactiveRevisions(10).withService(new Service().withType("redis"))) + .withTemplate(new Template() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") + .withName("testinitcontainerApp0").withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers(Arrays.asList( + new Container().withImage("").withImageType(ImageType.CLOUD_BUILD).withName("testcontainerApp0") + .withVolumeMounts(Arrays.asList( + new VolumeMount().withVolumeName("azurefile").withMountPath("/mnt/path1") + .withSubPath("subPath1"), + new VolumeMount().withVolumeName("nfsazurefile").withMountPath("/mnt/path2") + .withSubPath("subPath2"))) + .withProbes(Arrays.asList(new ContainerAppProbe() + .withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() + .withName("Custom-Header").withValue("Awesome"))) + .withPath("/health").withPort(8080)) + .withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) + .withScale(new Scale().withMinReplicas(1).withMaxReplicas(5) + .withRules(Arrays.asList(new ScaleRule().withName("httpscalingrule").withCustom( + new CustomScaleRule().withType("http").withMetadata(mapOf("concurrentRequests", "50")))))) + .withVolumes(Arrays.asList( + new Volume().withName("azurefile").withStorageType(StorageType.AZURE_FILE) + .withStorageName("storage"), + new Volume().withName("nfsazurefile").withStorageType(StorageType.NFS_AZURE_FILE) + .withStorageName("nfsStorage"))) + .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService") + .withName("redisService").withClientType("dotnet") + .withCustomizedKeys(mapOf("DesiredKey", "fakeTokenPlaceholder"))))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ContainerApps_CreateOrUpdate_ConnectedEnvironment.json */ /** @@ -91,11 +189,15 @@ public static void createOrUpdateAppOnAConnectedEnvironment( .withAdditionalPortMappings( Arrays.asList(new IngressPortMapping().withExternal(true).withTargetPort(1234), new IngressPortMapping().withExternal(false).withTargetPort(2345).withExposedPort(3456)))) - .withDapr( - new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000) - .withHttpReadBufferSize(30).withHttpMaxRequestSize(10).withLogLevel( - LogLevel.DEBUG) - .withEnableApiLogging(true)) + .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000) + .withHttpReadBufferSize(30).withHttpMaxRequestSize(10).withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withRuntime(new Runtime() + .withJava(new RuntimeJava().withEnableMetrics(true) + .withJavaAgent(new RuntimeJavaAgent().withEnabled(true) + .withLogging(new RuntimeJavaAgentLogging().withLoggerSettings(Arrays.asList( + new LoggerSetting().withLogger("org.springframework.boot").withLevel(Level.DEBUG)))))) + .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) .withMaxInactiveRevisions(10)) .withTemplate(new Template() .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") @@ -119,7 +221,7 @@ public static void createOrUpdateAppOnAConnectedEnvironment( /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_CreateOrUpdate + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_CreateOrUpdate * .json */ /** @@ -163,42 +265,59 @@ public static void createOrUpdateAppOnAConnectedEnvironment( .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000) .withHttpReadBufferSize(30).withHttpMaxRequestSize(10).withLogLevel(LogLevel.DEBUG) .withEnableApiLogging(true)) + .withRuntime(new Runtime().withJava(new RuntimeJava().withEnableMetrics(true) + .withJavaAgent(new RuntimeJavaAgent().withEnabled(true) + .withLogging(new RuntimeJavaAgentLogging().withLoggerSettings(Arrays.asList(new LoggerSetting() + .withLogger("org.springframework.boot").withLevel(Level.DEBUG)))))) + .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) .withMaxInactiveRevisions(10).withService(new Service().withType("redis"))) - .withTemplate(new Template() - .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") - .withName("testinitcontainerApp0").withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers( - Arrays.asList(new Container().withImage("repo/testcontainerApp0:v1").withName("testcontainerApp0") - .withVolumeMounts(Arrays.asList( - new VolumeMount().withVolumeName("azurefile").withMountPath("/mnt/path1") - .withSubPath("subPath1"), - new VolumeMount().withVolumeName("nfsazurefile").withMountPath("/mnt/path2") - .withSubPath("subPath2"))) - .withProbes(Arrays.asList(new ContainerAppProbe() - .withHttpGet(new ContainerAppProbeHttpGet() - .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header").withValue("Awesome"))) - .withPath("/health").withPort(8080)) - .withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) - .withScale(new Scale().withMinReplicas(1).withMaxReplicas(5) - .withRules(Arrays.asList(new ScaleRule().withName("httpscalingrule").withCustom( - new CustomScaleRule().withType("http").withMetadata(mapOf("concurrentRequests", "50")))))) - .withVolumes(Arrays.asList( - new Volume().withName("azurefile").withStorageType(StorageType.AZURE_FILE) - .withStorageName("storage"), - new Volume().withName("nfsazurefile").withStorageType(StorageType.NFS_AZURE_FILE) - .withStorageName("nfsStorage"))) - .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService") - .withName("redisService").withClientType("dotnet") - .withCustomizedKeys(mapOf("DesiredKey", "fakeTokenPlaceholder"))))) + .withTemplate( + new Template() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") + .withName("testinitcontainerApp0").withCommand(Arrays.asList("/bin/sh")).withArgs(Arrays.asList( + "-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers( + Arrays + .asList( + new Container().withImage("repo/testcontainerApp0:v1").withName("testcontainerApp0") + .withVolumeMounts( + Arrays.asList( + new VolumeMount().withVolumeName("azurefile").withMountPath( + "/mnt/path1").withSubPath("subPath1"), + new VolumeMount().withVolumeName("nfsazurefile").withMountPath( + "/mnt/path2").withSubPath( + "subPath2"))) + .withProbes(Arrays.asList(new ContainerAppProbe() + .withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() + .withName("Custom-Header").withValue("Awesome"))) + .withPath("/health").withPort(8080)) + .withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) + .withScale(new Scale().withMinReplicas(1).withMaxReplicas(5).withRules(Arrays.asList(new ScaleRule() + .withName("httpscalingrule") + .withCustom( + new CustomScaleRule().withType("http").withMetadata(mapOf("concurrentRequests", "50"))), + new ScaleRule().withName("servicebus").withCustom(new CustomScaleRule() + .withType("azure-servicebus") + .withMetadata( + mapOf("messageCount", "5", "namespace", "mynamespace", "queueName", "myqueue")) + .withIdentity( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity"))))) + .withVolumes(Arrays.asList( + new Volume().withName("azurefile").withStorageType(StorageType.AZURE_FILE) + .withStorageName("storage"), + new Volume().withName("nfsazurefile").withStorageType(StorageType.NFS_AZURE_FILE) + .withStorageName("nfsStorage"))) + .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService") + .withName("redisService").withClientType("dotnet") + .withCustomizedKeys(mapOf("DesiredKey", "fakeTokenPlaceholder"))))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ContainerApps_TcpApp_CreateOrUpdate.json */ /** @@ -235,7 +354,33 @@ public static void createOrUpdateTcpApp(com.azure.resourcemanager.appcontainers. } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerApps_Kind_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update App Kind. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateAppKind(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().define("testcontainerAppKind").withRegion("East Us").withExistingResourceGroup("rg") + .withManagedBy( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.Web/sites/testcontainerAppKind") + .withKind(Kind.WORKFLOWAPP) + .withManagedEnvironmentId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/testmanagedenv3") + .withConfiguration(new Configuration().withActiveRevisionsMode(ActiveRevisionsMode.SINGLE) + .withIngress(new Ingress().withExternal(true).withTargetPort(80).withAllowInsecure(true))) + .withTemplate(new Template() + .withContainers(Arrays + .asList(new Container().withImage("default/logicapps-base:latest").withName("logicapps-container") + .withResources(new ContainerResources().withCpu(1.0D).withMemory("2.0Gi")))) + .withScale(new Scale().withMinReplicas(1).withMaxReplicas(30))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ContainerApps_ManagedBy_CreateOrUpdate.json */ /** 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 47048d97bd88..7e39013ac3d9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 a0d8c8dc108f..d5b24ab628e0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsDiagnosticsGetDetectorSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerAppsDiagnostics_Get + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsDiagnostics_Get * .json */ /** 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 aa1614e9b831..21d96bf63e85 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsDiagnosticsGetRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 a6264f1afb5f..b38f0f2e0974 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsDiagnosticsGetRootSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 6bda0b6f50de..adb5562735f2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java @@ -9,7 +9,7 @@ */ public final class ContainerAppsDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ContainerAppsDiagnostics_List.json */ /** 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 3a04c7903251..d8efb9f78d2f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsDiagnosticsListRevisionsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 7c041c9d923c..90dfacb4c9d1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsGetAuthTokenSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_GetAuthToken. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_GetAuthToken. * json */ /** 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 ff0cf63b25b6..9ecec432a052 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 44027ab39d2b..47549ac241be 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ContainerAppsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ContainerApps_ListByResourceGroup.json */ /** 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 174e04e654e2..6715084264da 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java @@ -9,7 +9,7 @@ */ public final class ContainerAppsListCustomHostnameAnalysisSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ContainerApps_ListCustomHostNameAnalysis.json */ /** 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 8610a6fd759e..4ebb60d86d04 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java @@ -9,7 +9,7 @@ */ public final class ContainerAppsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ContainerApps_ListBySubscription.json */ /** 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 ef9b743107ff..489af3ae4e75 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsListSecretsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_ListSecrets. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_ListSecrets. * json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesApplySamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesApplySamples.java new file mode 100644 index 000000000000..4d2607482b63 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesApplySamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for ContainerAppsPatches Apply. + */ +public final class ContainerAppsPatchesApplySamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsPatches_Apply. + * json + */ + /** + * Sample code: ContainerAppsPatches_Apply_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + containerAppsPatchesApply0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsPatches().apply("rg", "test-app", "testPatch-25fe4b", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesDeleteSamples.java new file mode 100644 index 000000000000..1cc9f7b88edc --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for ContainerAppsPatches Delete. + */ +public final class ContainerAppsPatchesDeleteSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsPatches_Delete. + * json + */ + /** + * Sample code: ContainerAppsPatches_Delete_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + containerAppsPatchesDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsPatches().delete("rg", "test-app", "testPatch-25fe4b", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesGetSamples.java new file mode 100644 index 000000000000..294ef0825ffa --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesGetSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for ContainerAppsPatches Get. + */ +public final class ContainerAppsPatchesGetSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsPatches_Get. + * json + */ + /** + * Sample code: ContainerAppsPatches_Get_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + containerAppsPatchesGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsPatches().getWithResponse("rg", "test-app", "testPatch-25fe4b", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesListByContainerAppSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesListByContainerAppSamples.java new file mode 100644 index 000000000000..0537533b6ee7 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesListByContainerAppSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for ContainerAppsPatches ListByContainerApp. + */ +public final class ContainerAppsPatchesListByContainerAppSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerAppsPatches_ListByContainerApp.json + */ + /** + * Sample code: ContainerAppsPatches_ListByContainerApp_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void containerAppsPatchesListByContainerApp0( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsPatches().listByContainerApp("rg", "test-app", null, com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesSkipConfigureSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesSkipConfigureSamples.java new file mode 100644 index 000000000000..2cbc1b4f881a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsPatchesSkipConfigureSamples.java @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.resourcemanager.appcontainers.models.PatchSkipConfig; + +/** + * Samples for ContainerAppsPatches SkipConfigure. + */ +public final class ContainerAppsPatchesSkipConfigureSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerAppsPatches_Skip_Configure.json + */ + /** + * Sample code: ContainerAppsPatches_Skip_Configure_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + containerAppsPatchesSkipConfigure0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsPatches().skipConfigure("rg", "test-app", "testPatch-25fe4b", + new PatchSkipConfig().withSkip(true), com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java index 4a723e1189c1..f3335387ac87 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 @@ -10,7 +10,7 @@ public final class ContainerAppsRevisionReplicasGetReplicaSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Replicas_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 05dc2154609e..c4a1de84efd6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsRevisionReplicasListReplicasSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Replicas_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 718323d35fcb..514e2b114c1a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsRevisionsActivateRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_Activate.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 02575b8d6abf..fe6a223be31a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsRevisionsDeactivateRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_Deactivate.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 9d602a61b191..407c19f74eaa 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsRevisionsGetRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 310c3fb98a89..a5deaf31f3a5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsRevisionsListRevisionsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 548cd13d8829..01846b3dc910 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsRevisionsRestartRevisionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Revisions_Restart.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 a95df9fdde09..f2cca315323e 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 @@ -15,7 +15,7 @@ */ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * SourceControls_CreateOrUpdate.json */ /** 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 58c3fd76c7fe..a2441410da98 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsSourceControlsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/SourceControls_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 4a72f7738a85..7f07963ec218 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsSourceControlsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/SourceControls_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 568c72b952ba..864c40e24cfe 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java @@ -9,7 +9,7 @@ */ public final class ContainerAppsSourceControlsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * SourceControls_ListByContainer.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStartSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStartSamples.java index fc183d69d664..e44bc17702c5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStartSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStartSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsStartSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Start.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Start.json */ /** * Sample code: Start Container App. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStopSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStopSamples.java index fcde0beb24fb..9d6b7102215c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStopSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStopSamples.java @@ -10,7 +10,7 @@ public final class ContainerAppsStopSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Stop.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Stop.json */ /** * Sample code: Stop Container App. 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 0adee1573e3a..c479b291837b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java @@ -22,7 +22,14 @@ import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; import com.azure.resourcemanager.appcontainers.models.InitContainer; import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; +import com.azure.resourcemanager.appcontainers.models.Level; import com.azure.resourcemanager.appcontainers.models.LogLevel; +import com.azure.resourcemanager.appcontainers.models.LoggerSetting; +import com.azure.resourcemanager.appcontainers.models.Runtime; +import com.azure.resourcemanager.appcontainers.models.RuntimeDotnet; +import com.azure.resourcemanager.appcontainers.models.RuntimeJava; +import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgent; +import com.azure.resourcemanager.appcontainers.models.RuntimeJavaAgentLogging; import com.azure.resourcemanager.appcontainers.models.Scale; import com.azure.resourcemanager.appcontainers.models.ScaleRule; import com.azure.resourcemanager.appcontainers.models.Service; @@ -40,7 +47,7 @@ public final class ContainerAppsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ContainerApps_Patch.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Patch.json */ /** * Sample code: Patch Container App. @@ -73,6 +80,12 @@ public static void patchContainerApp(com.azure.resourcemanager.appcontainers.Con .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000) .withHttpReadBufferSize(30).withHttpMaxRequestSize(10).withLogLevel(LogLevel.DEBUG) .withEnableApiLogging(true)) + .withRuntime(new Runtime() + .withJava(new RuntimeJava().withEnableMetrics(true) + .withJavaAgent(new RuntimeJavaAgent().withEnabled(true) + .withLogging(new RuntimeJavaAgentLogging().withLoggerSettings(Arrays.asList( + new LoggerSetting().withLogger("org.springframework.boot").withLevel(Level.DEBUG)))))) + .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) .withMaxInactiveRevisions(10).withService(new Service().withType("redis"))) .withTemplate( new Template() diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateSamples.java index b9fee2733760..375eb99754b3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateSamples.java @@ -15,7 +15,7 @@ */ public final class DaprComponentResiliencyPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprComponentResiliencyPolicy_CreateOrUpdate_OutboundOnly.json */ /** @@ -39,7 +39,7 @@ public static void createOrUpdateDaprComponentResiliencyPolicyWithOutboundPolicy } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprComponentResiliencyPolicy_CreateOrUpdate_AllOptions.json */ /** @@ -71,7 +71,7 @@ public static void createOrUpdateDaprComponentResiliencyPolicyWithAllOptions( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprComponentResiliencyPolicy_CreateOrUpdate_SparseOptions.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteSamples.java index 5028bc277fa7..956905e7eefe 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class DaprComponentResiliencyPoliciesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprComponentResiliencyPolicies_Delete.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetSamples.java index b61495084f83..029a17634c83 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetSamples.java @@ -9,7 +9,7 @@ */ public final class DaprComponentResiliencyPoliciesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprComponentResiliencyPolicies_Get.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListSamples.java index 3958c1b87824..e24ac1bec18b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListSamples.java @@ -9,7 +9,7 @@ */ public final class DaprComponentResiliencyPoliciesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprComponentResiliencyPolicies_List.json */ /** 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 a5f7ec35e4ac..e08b66e5f242 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 @@ -16,7 +16,7 @@ */ public final class DaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprComponents_CreateOrUpdate_Secrets.json */ /** @@ -44,7 +44,7 @@ public static void createOrUpdateDaprComponentWithSecrets( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprComponents_CreateOrUpdate_SecretStoreComponent.json */ /** 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 0ca2552786b8..1a3439ae36e6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java @@ -10,7 +10,7 @@ public final class DaprComponentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponents_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 4d7160ec58e3..afdcf654f578 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java @@ -9,7 +9,7 @@ */ public final class DaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprComponents_Get_SecretStoreComponent.json */ /** @@ -25,7 +25,7 @@ public static void getDaprComponentWithSecretStoreComponent( /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponents_Get_Secrets. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_Get_Secrets. * json */ /** 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 485c421cb488..411a3af7a8a1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java @@ -10,7 +10,7 @@ public final class DaprComponentsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponents_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 f20d1b9d59d6..032f01cfd5e8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java @@ -10,7 +10,7 @@ public final class DaprComponentsListSecretsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprComponents_ListSecrets. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_ListSecrets. * json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateSamples.java index 9c85aa97a89e..74e20abfa299 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateSamples.java @@ -16,7 +16,7 @@ */ public final class DaprSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprSubscriptions_CreateOrUpdate_RouteRulesAndMetadata.json */ /** @@ -38,7 +38,7 @@ public static void createOrUpdateDaprSubscriptionWithRouteRulesAndMetadata( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprSubscriptions_CreateOrUpdate_DefaultRoute.json */ /** @@ -54,7 +54,7 @@ public static void createOrUpdateDaprSubscriptionWithDefaultRouteOnly( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprSubscriptions_CreateOrUpdate_BulkSubscribeAndScopes.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteSamples.java index 140aede4ee32..0ec945ff91a3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteSamples.java @@ -10,7 +10,7 @@ public final class DaprSubscriptionsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprSubscriptions_Delete. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_Delete. * json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetSamples.java index e6c044b425c3..812f907a1ee7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetSamples.java @@ -9,7 +9,7 @@ */ public final class DaprSubscriptionsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprSubscriptions_Get_DefaultRoute.json */ /** @@ -24,7 +24,7 @@ public static void getDaprSubscriptionWithBulkSubscribeConfigurationAndScopes( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprSubscriptions_Get_BulkSubscribeAndScopes.json */ /** @@ -39,7 +39,7 @@ public static void getDaprSubscriptionWithDefaultRouteOnly( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DaprSubscriptions_Get_RouteRulesAndMetadata.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListSamples.java index c94c7a32d307..ef535f82329e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListSamples.java @@ -10,7 +10,7 @@ public final class DaprSubscriptionsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DaprSubscriptions_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_List.json */ /** * Sample code: List Dapr subscriptions. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateSamples.java index e89663f1e975..dd04a51fd285 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ */ public final class DotNetComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DotNetComponents_CreateOrUpdate.json */ /** @@ -33,7 +33,7 @@ public final class DotNetComponentsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DotNetComponents_CreateOrUpdate_ServiceBind.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsDeleteSamples.java index 9725b60a6de9..5a3f9e2293fa 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsDeleteSamples.java @@ -10,7 +10,7 @@ public final class DotNetComponentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Delete.json */ /** * Sample code: Delete .NET Component. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetSamples.java index 1fbd1fab504c..998df10fd6bb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetSamples.java @@ -9,7 +9,7 @@ */ public final class DotNetComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DotNetComponents_Get_ServiceBind.json */ /** @@ -25,7 +25,7 @@ public final class DotNetComponentsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Get.json */ /** * Sample code: Get .NET Component. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListSamples.java index 9ec1b69c8d0c..d5995ea5ec32 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListSamples.java @@ -10,7 +10,7 @@ public final class DotNetComponentsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_List.json */ /** * Sample code: List .NET Components. @@ -22,7 +22,7 @@ public static void listNETComponents(com.azure.resourcemanager.appcontainers.Con } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DotNetComponents_List_ServiceBind.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsUpdateSamples.java index a2bc69652dd2..ca1c2638a93b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsUpdateSamples.java @@ -15,7 +15,7 @@ */ public final class DotNetComponentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * DotNetComponents_Patch_ServiceBind.json */ /** @@ -38,7 +38,7 @@ public final class DotNetComponentsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/DotNetComponents_Patch.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Patch.json */ /** * Sample code: Patch .NET Component. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/FunctionsExtensionInvokeFunctionsHostSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/FunctionsExtensionInvokeFunctionsHostSamples.java new file mode 100644 index 000000000000..655a2fa8836a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/FunctionsExtensionInvokeFunctionsHostSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for FunctionsExtension InvokeFunctionsHost. + */ +public final class FunctionsExtensionInvokeFunctionsHostSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/FunctionsExtension_Post.json + */ + /** + * Sample code: Invoke Functions host using Functions Extension API. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void invokeFunctionsHostUsingFunctionsExtensionAPI( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.functionsExtensions().invokeFunctionsHostWithResponse("rg", "testcontainerApp0", + "testcontainerApp0-pjxhsye", "testcontainerApp0", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateSamples.java index 2f881bdca227..f7ee8df34a95 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateSamples.java @@ -6,7 +6,7 @@ import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; +import com.azure.resourcemanager.appcontainers.models.SpringBootAdminComponent; import java.util.Arrays; /** @@ -14,7 +14,7 @@ */ public final class JavaComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * JavaComponents_CreateOrUpdate_ServiceBind.json */ /** @@ -25,19 +25,19 @@ public final class JavaComponentsCreateOrUpdateSamples { public static void createOrUpdateJavaComponentWithServiceBinds( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.javaComponents().define("myjavacomponent").withExistingManagedEnvironment("examplerg", "myenvironment") - .withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) - .withConfigurations(Arrays.asList( - new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") - .withValue("true"), - new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") - .withValue("10000ms"))) - .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("yellowcat").withServiceId( - "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat"))) + .withProperties(new SpringBootAdminComponent() + .withConfigurations(Arrays.asList( + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") + .withValue("true"), + new JavaComponentConfigurationProperty() + .withPropertyName("spring.boot.admin.monitor.status-interval").withValue("10000ms"))) + .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("yellowcat").withServiceId( + "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat")))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * JavaComponents_CreateOrUpdate.json */ /** @@ -48,12 +48,11 @@ public static void createOrUpdateJavaComponentWithServiceBinds( public static void createOrUpdateJavaComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.javaComponents().define("myjavacomponent").withExistingManagedEnvironment("examplerg", "myenvironment") - .withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) - .withConfigurations(Arrays.asList( + .withProperties(new SpringBootAdminComponent().withConfigurations(Arrays.asList( new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") .withValue("true"), new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") - .withValue("10000ms"))) + .withValue("10000ms")))) .create(); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsDeleteSamples.java index 5b5824e89d4a..6450217f5b2d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsDeleteSamples.java @@ -10,7 +10,7 @@ public final class JavaComponentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Delete.json */ /** * Sample code: Delete Java Component. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetSamples.java index 85ff835b9743..f86e4c3ae6f8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetSamples.java @@ -10,7 +10,7 @@ public final class JavaComponentsGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Get.json */ /** * Sample code: Get Java Component. @@ -23,7 +23,7 @@ public static void getJavaComponent(com.azure.resourcemanager.appcontainers.Cont } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * JavaComponents_Get_ServiceBind.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListSamples.java index 6f3508a78f3c..37ee9f807aab 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListSamples.java @@ -10,7 +10,7 @@ public final class JavaComponentsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_List.json */ /** * Sample code: List Java Components. @@ -22,7 +22,7 @@ public static void listJavaComponents(com.azure.resourcemanager.appcontainers.Co } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * JavaComponents_List_ServiceBind.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsUpdateSamples.java index 7164653c6720..1da2c2db5080 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsUpdateSamples.java @@ -7,7 +7,7 @@ import com.azure.resourcemanager.appcontainers.models.JavaComponent; import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; +import com.azure.resourcemanager.appcontainers.models.SpringBootAdminComponent; import java.util.Arrays; /** @@ -16,7 +16,7 @@ public final class JavaComponentsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/JavaComponents_Patch.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Patch.json */ /** * Sample code: Patch Java Component. @@ -27,17 +27,17 @@ public static void patchJavaComponent(com.azure.resourcemanager.appcontainers.Co JavaComponent resource = manager.javaComponents() .getWithResponse("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) - .withConfigurations(Arrays.asList( + resource.update() + .withProperties(new SpringBootAdminComponent().withConfigurations(Arrays.asList( new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") .withValue("true"), new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") - .withValue("10000ms"))) + .withValue("10000ms")))) .apply(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * JavaComponents_Patch_ServiceBind.json */ /** @@ -50,14 +50,14 @@ public static void patchJavaComponent(com.azure.resourcemanager.appcontainers.Co JavaComponent resource = manager.javaComponents() .getWithResponse("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE) .getValue(); - resource.update().withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) + resource.update().withProperties(new SpringBootAdminComponent() .withConfigurations(Arrays.asList( new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") .withValue("true"), new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") .withValue("10000ms"))) .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("yellowcat").withServiceId( - "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat"))) + "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat")))) .apply(); } } 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 844b38874169..91ca5837f2b0 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 @@ -20,18 +20,23 @@ import com.azure.resourcemanager.appcontainers.models.JobScale; import com.azure.resourcemanager.appcontainers.models.JobScaleRule; import com.azure.resourcemanager.appcontainers.models.JobTemplate; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; import com.azure.resourcemanager.appcontainers.models.TriggerType; import com.azure.resourcemanager.appcontainers.models.Type; +import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; import com.azure.resourcemanager.appcontainers.models.VolumeMount; import java.io.IOException; import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; /** * Samples for Jobs CreateOrUpdate. */ public final class JobsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * Job_CreateorUpdate_ConnectedEnvironment.json */ /** @@ -67,7 +72,7 @@ public static void createOrUpdateContainerAppsJobOnAConnectedEnvironment( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * Job_CreateorUpdate_EventTrigger.json */ /** @@ -78,16 +83,23 @@ public static void createOrUpdateContainerAppsJobOnAConnectedEnvironment( public static void createOrUpdateContainerAppsJobWithEventDrivenTrigger( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) throws IOException { manager.jobs().define("testcontainerAppsJob0").withRegion("East US").withExistingResourceGroup("rg") + .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity", + new UserAssignedIdentity()))) .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.EVENT).withReplicaTimeout(10) - .withReplicaRetryLimit(10).withEventTriggerConfig( - new JobConfigurationEventTriggerConfig().withReplicaCompletionCount(1).withParallelism(4) - .withScale(new JobScale().withPollingInterval(40).withMinExecutions(1).withMaxExecutions(5) - .withRules(Arrays.asList(new JobScaleRule().withName("servicebuscalingrule") - .withType("azure-servicebus") - .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter().deserialize( - "{\"topicName\":\"my-topic\"}", Object.class, SerializerEncoding.JSON))))))) + .withReplicaRetryLimit(10) + .withEventTriggerConfig(new JobConfigurationEventTriggerConfig().withReplicaCompletionCount(1) + .withParallelism(4) + .withScale(new JobScale().withPollingInterval(40).withMinExecutions(1).withMaxExecutions(5) + .withRules(Arrays.asList(new JobScaleRule().withName("servicebuscalingrule") + .withType("azure-servicebus") + .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter() + .deserialize("{\"topicName\":\"my-topic\"}", Object.class, SerializerEncoding.JSON)) + .withIdentity( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourcegroups/rg/providers/Microsoft.ManagedIdentity/userAssignedIdentities/myidentity")))))) .withTemplate(new JobTemplate() .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") .withName("testinitcontainerAppsJob0").withCommand(Arrays.asList("/bin/sh")) @@ -100,7 +112,7 @@ public static void createOrUpdateContainerAppsJobWithEventDrivenTrigger( /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_CreateorUpdate.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_CreateorUpdate.json */ /** * Sample code: Create or Update Container Apps Job. @@ -136,4 +148,16 @@ public static void createOrUpdateContainerAppsJobWithEventDrivenTrigger( .withInitialDelaySeconds(5).withPeriodSeconds(3).withType(Type.LIVENESS)))))) .create(); } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } } 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 6db91f788162..adbc35d15d39 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 @@ -10,7 +10,7 @@ public final class JobsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Delete.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 f10bd3a921c8..d608b6272ac6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListSamples.java @@ -10,7 +10,7 @@ public final class JobsExecutionsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Executions_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 b0ff6f85a8cd..88d2cd99f834 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 @@ -10,7 +10,7 @@ public final class JobsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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/JobsGetDetectorSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorSamples.java index 1fe953f78b70..65f1e6c3572f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorSamples.java @@ -10,7 +10,7 @@ public final class JobsGetDetectorSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_GetDetector.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_GetDetector.json */ /** * Sample code: Get diagnostic data for a Container App Job. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListByResourceGroupSamples.java index be43a18ec985..f3acaca0fca4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class JobsListByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Jobs_ListByResourceGroup. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Jobs_ListByResourceGroup. * json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsSamples.java index f15907dd2ff9..1e6c6e1ad05a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsSamples.java @@ -10,7 +10,7 @@ public final class JobsListDetectorsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_ListDetectors.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_ListDetectors.json */ /** * Sample code: Get the list of available diagnostic data for a Container App Job. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSamples.java index adad6deaae4b..38f404904c35 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSamples.java @@ -10,7 +10,7 @@ public final class JobsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Jobs_ListBySubscription.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 c4af65414134..eb374d2565e7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSecretsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSecretsSamples.java @@ -10,7 +10,7 @@ public final class JobsListSecretsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_ListSecrets.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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/JobsProxyGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsProxyGetSamples.java index a93625f93ef0..7689e17cb912 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsProxyGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsProxyGetSamples.java @@ -10,7 +10,7 @@ public final class JobsProxyGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_ProxyGet.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_ProxyGet.json */ /** * Sample code: Get Container App Job by name. 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 58cfd9bc200b..7eb3ce57b300 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 @@ -15,7 +15,7 @@ public final class JobsStartSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Start.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 1afbf7e09fda..6e30a009efb6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionSamples.java @@ -10,7 +10,7 @@ public final class JobsStopExecutionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Stop_Execution.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 cb8f119105be..c5f1536f64b7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsSamples.java @@ -10,7 +10,7 @@ public final class JobsStopMultipleExecutionsSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Stop_Multiple.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Stop_Multiple.json */ /** * Sample code: Terminate Multiple Container Apps Job. 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 504050178133..5df4e0970387 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 @@ -25,7 +25,7 @@ public final class JobsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Patch.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 fde470aa26cb..f882f117bc9b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesCreateOrUpdateSamples.java @@ -12,7 +12,7 @@ */ public final class ManagedCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedCertificate_CreateOrUpdate.json */ /** 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 0208a9f10167..8b8e43d5d96f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteSamples.java @@ -10,7 +10,7 @@ public final class ManagedCertificatesDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedCertificate_Delete. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedCertificate_Delete. * json */ /** 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 aa76bca21eaf..f4b3b720cec9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesGetSamples.java @@ -10,7 +10,7 @@ public final class ManagedCertificatesGetSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedCertificate_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 a0acb8ae2b9d..023edcf36856 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedCertificates_ListByManagedEnvironment.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java index 2c4059828efa..ea61d5155a30 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java @@ -14,7 +14,7 @@ public final class ManagedCertificatesUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedCertificates_Patch. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedCertificates_Patch. * json */ /** 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 a8284ec063a8..16f3d636e98c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironmentDiagnostics_Get.json */ /** 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 b1e0cd1a7357..d937a8063ec3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironmentDiagnostics_List.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListSamples.java index 3f0fd1850183..2ea15dbc55ef 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentUsagesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironmentUsages_List.json */ /** 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 de579eae42f2..51602a017309 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 @@ -13,6 +13,8 @@ import com.azure.resourcemanager.appcontainers.models.LogAnalyticsConfiguration; import com.azure.resourcemanager.appcontainers.models.LogsConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfiguration; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; import com.azure.resourcemanager.appcontainers.models.MetricsConfiguration; @@ -32,7 +34,7 @@ */ public final class ManagedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json */ /** @@ -65,7 +67,7 @@ public static void createEnvironmentWithCustomInfrastructureResourceGroup( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironments_CreateOrUpdate.json */ /** @@ -116,6 +118,8 @@ public static void createEnvironments(com.azure.resourcemanager.appcontainers.Co new WorkloadProfile().withName("My-consumption-01").withWorkloadProfileType("Consumption"))) .withPeerAuthentication( new ManagedEnvironmentPropertiesPeerAuthentication().withMtls(new Mtls().withEnabled(true))) + .withPeerTrafficConfiguration(new ManagedEnvironmentPropertiesPeerTrafficConfiguration() + .withEncryption(new ManagedEnvironmentPropertiesPeerTrafficConfigurationEncryption().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 457641d21825..792fcd02ba1b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java @@ -10,7 +10,7 @@ public final class ManagedEnvironmentsDeleteSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_Delete. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_Delete. * json */ /** 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 b60a91d55c76..c91edbd63f5c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java @@ -10,7 +10,7 @@ public final class ManagedEnvironmentsDiagnosticsGetRootSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 7241d5d183be..926cc10aa15a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentsGetAuthTokenSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironments_GetAuthToken.json */ /** 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 042e57fb442c..d39689f40a3e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetByResourceGroupSamples.java @@ -10,7 +10,7 @@ public final class ManagedEnvironmentsGetByResourceGroupSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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 0d2ddc69d749..636c6994929b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironments_ListByResourceGroup.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java index 8d741e4aa717..7f5bbc059a51 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironments_ListBySubscription.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java index 6ceae8d251fc..5d4406b86ef5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironments_ListWorkloadProfileStates.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java index 26b1d0f897f7..852fb6975f71 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ */ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironmentsStorages_CreateOrUpdate_NfsAzureFile.json */ /** @@ -32,7 +32,7 @@ public static void createOrUpdateEnvironmentsStorageForNFSAzureFile( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironmentsStorages_CreateOrUpdate.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java index 03400192ca15..34061a166d57 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironmentsStorages_Delete.json */ /** 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 210f199df9fd..f9d1d3faefd6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironmentsStorages_Get.json */ /** @@ -24,7 +24,7 @@ public final class ManagedEnvironmentsStoragesGetSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironmentsStorages_Get_NfsAzureFile.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java index af95ae5d86fd..cbd1ab3dcc84 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java @@ -9,7 +9,7 @@ */ public final class ManagedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ManagedEnvironmentsStorages_List.json */ /** 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 965bdf450755..e9a594ae0cde 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java @@ -14,7 +14,7 @@ public final class ManagedEnvironmentsUpdateSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ManagedEnvironments_Patch. + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_Patch. * json */ /** 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 f721c1e7e9da..1b99e5ba28ab 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java @@ -11,7 +11,7 @@ */ public final class NamespacesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * Certificates_CheckNameAvailability.json */ /** @@ -28,7 +28,7 @@ public final class NamespacesCheckNameAvailabilitySamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * ContainerApps_CheckNameAvailability.json */ /** 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 ba1100264a9b..39f9f093e58c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java @@ -10,7 +10,7 @@ public final class OperationsListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Operations_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-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/ResourceProviderGetCustomDomainVerificationIdSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderGetCustomDomainVerificationIdSamples.java index d9fcf15a6a33..9eb28ff02b83 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderGetCustomDomainVerificationIdSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderGetCustomDomainVerificationIdSamples.java @@ -9,7 +9,7 @@ */ public final class ResourceProviderGetCustomDomainVerificationIdSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/ + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ * Subscriptions_GetCustomDomainVerificationId.json */ /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderJobExecutionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderJobExecutionSamples.java index 8c74bfa78cc4..4d6c01ac8ef3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderJobExecutionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderJobExecutionSamples.java @@ -10,7 +10,7 @@ public final class ResourceProviderJobExecutionSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Job_Execution_Get.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Execution_Get.json */ /** * Sample code: Get a single Job Execution. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/UsagesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/UsagesListSamples.java index 149d43f6e59e..0d9044862a1b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/UsagesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/UsagesListSamples.java @@ -10,7 +10,7 @@ public final class UsagesListSamples { /* * x-ms-original-file: - * specification/app/resource-manager/Microsoft.App/preview/2023-11-02-preview/examples/Usages_List.json + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Usages_List.json */ /** * Sample code: List usages. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.java deleted file mode 100644 index 4a32859e2cf6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AllowedAudiencesValidation; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AllowedAudiencesValidationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AllowedAudiencesValidation model - = BinaryData.fromString("{\"allowedAudiences\":[\"igdtopbob\",\"og\",\"m\",\"w\"]}") - .toObject(AllowedAudiencesValidation.class); - Assertions.assertEquals("igdtopbob", model.allowedAudiences().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllowedAudiencesValidation model - = new AllowedAudiencesValidation().withAllowedAudiences(Arrays.asList("igdtopbob", "og", "m", "w")); - model = BinaryData.fromObject(model).toObject(AllowedAudiencesValidation.class); - Assertions.assertEquals("igdtopbob", 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 89f4d08ea369..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedPrincipalsTests.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.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\":[\"ajionpimexgstxg\",\"po\",\"gmaajrm\"],\"identities\":[\"wzrlovmclwhij\",\"oejctbzaqsqsy\"]}") - .toObject(AllowedPrincipals.class); - Assertions.assertEquals("ajionpimexgstxg", model.groups().get(0)); - Assertions.assertEquals("wzrlovmclwhij", model.identities().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllowedPrincipals model = new AllowedPrincipals().withGroups(Arrays.asList("ajionpimexgstxg", "po", "gmaajrm")) - .withIdentities(Arrays.asList("wzrlovmclwhij", "oejctbzaqsqsy")); - model = BinaryData.fromObject(model).toObject(AllowedPrincipals.class); - Assertions.assertEquals("ajionpimexgstxg", model.groups().get(0)); - Assertions.assertEquals("wzrlovmclwhij", model.identities().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppInsightsConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppInsightsConfigurationTests.java deleted file mode 100644 index 496c1ba15075..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppInsightsConfigurationTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AppInsightsConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class AppInsightsConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AppInsightsConfiguration model = BinaryData.fromString("{\"connectionString\":\"vgsgzwywakoihkn\"}") - .toObject(AppInsightsConfiguration.class); - Assertions.assertEquals("vgsgzwywakoihkn", model.connectionString()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AppInsightsConfiguration model = new AppInsightsConfiguration().withConnectionString("vgsgzwywakoihkn"); - model = BinaryData.fromObject(model).toObject(AppInsightsConfiguration.class); - Assertions.assertEquals("vgsgzwywakoihkn", model.connectionString()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppResilienciesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppResilienciesDeleteWithResponseMockTests.java deleted file mode 100644 index f694ba25e641..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppResilienciesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.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 AppResilienciesDeleteWithResponseMockTests { - @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.appResiliencies().deleteWithResponse("fulopmjnlexwhcb", "pibkephuu", "erctatoyin", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java deleted file mode 100644 index 7a96afa744ab..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import org.junit.jupiter.api.Assertions; - -public final class AuthPlatformTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AuthPlatform model - = BinaryData.fromString("{\"enabled\":true,\"runtimeVersion\":\"jaoyfhrtx\"}").toObject(AuthPlatform.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("jaoyfhrtx", model.runtimeVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AuthPlatform model = new AuthPlatform().withEnabled(true).withRuntimeVersion("jaoyfhrtx"); - model = BinaryData.fromObject(model).toObject(AuthPlatform.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("jaoyfhrtx", 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 140b8f8ffc45..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableOperationsTests.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.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\":\"rtltla\",\"isDataAction\":true,\"display\":{\"provider\":\"katbhjm\",\"resource\":\"nbsoqeqalarv\",\"operation\":\"gunbtgfebwlnbm\",\"description\":\"reeudzqavb\"},\"origin\":\"qmjxlyyzglgouwtl\"},{\"name\":\"jyuojqtobaxkjeyt\",\"isDataAction\":false,\"display\":{\"provider\":\"jkwrusnkq\",\"resource\":\"syrq\",\"operation\":\"jqhden\",\"description\":\"ulkpakd\"},\"origin\":\"fmjnnawtqa\"},{\"name\":\"xuckpggqoweyir\",\"isDataAction\":false,\"display\":{\"provider\":\"ngwflqqmpizruwn\",\"resource\":\"xpxiwfcngjs\",\"operation\":\"sii\",\"description\":\"mkzjvkviir\"},\"origin\":\"fgrwsdpgratzvz\"}],\"nextLink\":\"lbyvictctbrxkjzw\"}") - .toObject(AvailableOperations.class); - Assertions.assertEquals("rtltla", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("katbhjm", model.value().get(0).display().provider()); - Assertions.assertEquals("nbsoqeqalarv", model.value().get(0).display().resource()); - Assertions.assertEquals("gunbtgfebwlnbm", model.value().get(0).display().operation()); - Assertions.assertEquals("reeudzqavb", model.value().get(0).display().description()); - Assertions.assertEquals("qmjxlyyzglgouwtl", model.value().get(0).origin()); - Assertions.assertEquals("lbyvictctbrxkjzw", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableOperations model = new AvailableOperations() - .withValue(Arrays.asList( - new OperationDetailInner().withName("rtltla").withIsDataAction(true) - .withDisplay(new OperationDisplay().withProvider("katbhjm").withResource("nbsoqeqalarv") - .withOperation("gunbtgfebwlnbm").withDescription("reeudzqavb")) - .withOrigin("qmjxlyyzglgouwtl"), - new OperationDetailInner().withName("jyuojqtobaxkjeyt").withIsDataAction(false) - .withDisplay(new OperationDisplay().withProvider("jkwrusnkq").withResource("syrq") - .withOperation("jqhden").withDescription("ulkpakd")) - .withOrigin("fmjnnawtqa"), - new OperationDetailInner().withName("xuckpggqoweyir").withIsDataAction(false) - .withDisplay(new OperationDisplay().withProvider("ngwflqqmpizruwn").withResource("xpxiwfcngjs") - .withOperation("sii").withDescription("mkzjvkviir")) - .withOrigin("fgrwsdpgratzvz"))) - .withNextLink("lbyvictctbrxkjzw"); - model = BinaryData.fromObject(model).toObject(AvailableOperations.class); - Assertions.assertEquals("rtltla", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("katbhjm", model.value().get(0).display().provider()); - Assertions.assertEquals("nbsoqeqalarv", model.value().get(0).display().resource()); - Assertions.assertEquals("gunbtgfebwlnbm", model.value().get(0).display().operation()); - Assertions.assertEquals("reeudzqavb", model.value().get(0).display().description()); - Assertions.assertEquals("qmjxlyyzglgouwtl", model.value().get(0).origin()); - Assertions.assertEquals("lbyvictctbrxkjzw", 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 917ad9d8d6ce..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfileInnerTests.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.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\":\"yocf\",\"properties\":{\"category\":\"s\",\"applicability\":\"Custom\",\"cores\":376493890,\"memoryGiB\":666664165,\"gpus\":30564685,\"displayName\":\"uxh\"},\"id\":\"udxorrqn\",\"name\":\"poczvyifqrvkdvjs\",\"type\":\"lrmv\"}") - .toObject(AvailableWorkloadProfileInner.class); - Assertions.assertEquals("yocf", model.location()); - Assertions.assertEquals("s", model.properties().category()); - Assertions.assertEquals(Applicability.CUSTOM, model.properties().applicability()); - Assertions.assertEquals(376493890, model.properties().cores()); - Assertions.assertEquals(666664165, model.properties().memoryGiB()); - Assertions.assertEquals(30564685, model.properties().gpus()); - Assertions.assertEquals("uxh", model.properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableWorkloadProfileInner model = new AvailableWorkloadProfileInner().withLocation("yocf").withProperties( - new AvailableWorkloadProfileProperties().withCategory("s").withApplicability(Applicability.CUSTOM) - .withCores(376493890).withMemoryGiB(666664165).withGpus(30564685).withDisplayName("uxh")); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfileInner.class); - Assertions.assertEquals("yocf", model.location()); - Assertions.assertEquals("s", model.properties().category()); - Assertions.assertEquals(Applicability.CUSTOM, model.properties().applicability()); - Assertions.assertEquals(376493890, model.properties().cores()); - Assertions.assertEquals(666664165, model.properties().memoryGiB()); - Assertions.assertEquals(30564685, model.properties().gpus()); - Assertions.assertEquals("uxh", 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 615d01b41854..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilePropertiesTests.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.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\":\"f\",\"applicability\":\"LocationDefault\",\"cores\":1825333220,\"memoryGiB\":500448783,\"gpus\":608072417,\"displayName\":\"xxbczwtr\"}") - .toObject(AvailableWorkloadProfileProperties.class); - Assertions.assertEquals("f", model.category()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.applicability()); - Assertions.assertEquals(1825333220, model.cores()); - Assertions.assertEquals(500448783, model.memoryGiB()); - Assertions.assertEquals(608072417, model.gpus()); - Assertions.assertEquals("xxbczwtr", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableWorkloadProfileProperties model = new AvailableWorkloadProfileProperties().withCategory("f") - .withApplicability(Applicability.LOCATION_DEFAULT).withCores(1825333220).withMemoryGiB(500448783) - .withGpus(608072417).withDisplayName("xxbczwtr"); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfileProperties.class); - Assertions.assertEquals("f", model.category()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.applicability()); - Assertions.assertEquals(1825333220, model.cores()); - Assertions.assertEquals(500448783, model.memoryGiB()); - Assertions.assertEquals(608072417, model.gpus()); - Assertions.assertEquals("xxbczwtr", 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 fa4a65a0e272..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesCollectionTests.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.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\":\"dmoh\",\"properties\":{\"category\":\"qvudwxdndnvowgu\",\"applicability\":\"LocationDefault\",\"cores\":247911704,\"memoryGiB\":175400299,\"gpus\":2105007169,\"displayName\":\"hslazjdyggdtj\"},\"id\":\"hbkuofqwey\",\"name\":\"hmenevfyexfwhybc\",\"type\":\"bvyvdcsity\"},{\"location\":\"aamdect\",\"properties\":{\"category\":\"iqscjeypv\",\"applicability\":\"Custom\",\"cores\":902064602,\"memoryGiB\":177141497,\"gpus\":61185346,\"displayName\":\"refovgmkqsleyyvx\"},\"id\":\"jpkcattpng\",\"name\":\"cr\",\"type\":\"czsqpjhvm\"},{\"location\":\"jvnysounqe\",\"properties\":{\"category\":\"oaeupfhyhltrpmo\",\"applicability\":\"Custom\",\"cores\":1490971149,\"memoryGiB\":557848148,\"gpus\":860799201,\"displayName\":\"thfuiuaodsfcpkvx\"},\"id\":\"puozmyzydag\",\"name\":\"uaxbezyiuokkt\",\"type\":\"hrdxwzywqsmbs\"}],\"nextLink\":\"exim\"}") - .toObject(AvailableWorkloadProfilesCollection.class); - Assertions.assertEquals("dmoh", model.value().get(0).location()); - Assertions.assertEquals("qvudwxdndnvowgu", model.value().get(0).properties().category()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.value().get(0).properties().applicability()); - Assertions.assertEquals(247911704, model.value().get(0).properties().cores()); - Assertions.assertEquals(175400299, model.value().get(0).properties().memoryGiB()); - Assertions.assertEquals(2105007169, model.value().get(0).properties().gpus()); - Assertions.assertEquals("hslazjdyggdtj", 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("dmoh") - .withProperties(new AvailableWorkloadProfileProperties().withCategory("qvudwxdndnvowgu") - .withApplicability(Applicability.LOCATION_DEFAULT).withCores(247911704).withMemoryGiB(175400299) - .withGpus(2105007169).withDisplayName("hslazjdyggdtj")), - new AvailableWorkloadProfileInner().withLocation("aamdect") - .withProperties(new AvailableWorkloadProfileProperties().withCategory("iqscjeypv") - .withApplicability(Applicability.CUSTOM).withCores(902064602).withMemoryGiB(177141497) - .withGpus(61185346).withDisplayName("refovgmkqsleyyvx")), - new AvailableWorkloadProfileInner().withLocation("jvnysounqe") - .withProperties(new AvailableWorkloadProfileProperties().withCategory("oaeupfhyhltrpmo") - .withApplicability(Applicability.CUSTOM).withCores(1490971149).withMemoryGiB(557848148) - .withGpus(860799201).withDisplayName("thfuiuaodsfcpkvx")))); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfilesCollection.class); - Assertions.assertEquals("dmoh", model.value().get(0).location()); - Assertions.assertEquals("qvudwxdndnvowgu", model.value().get(0).properties().category()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.value().get(0).properties().applicability()); - Assertions.assertEquals(247911704, model.value().get(0).properties().cores()); - Assertions.assertEquals(175400299, model.value().get(0).properties().memoryGiB()); - Assertions.assertEquals(2105007169, model.value().get(0).properties().gpus()); - Assertions.assertEquals("hslazjdyggdtj", 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 d709a86c0493..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetMockTests.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.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\":\"uflgbhgauacdixm\",\"properties\":{\"category\":\"rs\",\"applicability\":\"Custom\",\"cores\":1835241804,\"memoryGiB\":1032355307,\"gpus\":1636214642,\"displayName\":\"zoeo\"},\"id\":\"vjhvefgwbm\",\"name\":\"jchnta\",\"type\":\"faymxbulpz\"}]}"; - - 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("hl", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("uflgbhgauacdixm", response.iterator().next().location()); - Assertions.assertEquals("rs", response.iterator().next().properties().category()); - Assertions.assertEquals(Applicability.CUSTOM, response.iterator().next().properties().applicability()); - Assertions.assertEquals(1835241804, response.iterator().next().properties().cores()); - Assertions.assertEquals(1032355307, response.iterator().next().properties().memoryGiB()); - Assertions.assertEquals(1636214642, response.iterator().next().properties().gpus()); - Assertions.assertEquals("zoeo", 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 cb1420efd497..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryLoginTests.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.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\":[\"isdkfthwxmnteiw\",\"opvkmijcm\"],\"disableWWWAuthenticate\":false}") - .toObject(AzureActiveDirectoryLogin.class); - Assertions.assertEquals("isdkfthwxmnteiw", model.loginParameters().get(0)); - Assertions.assertEquals(false, model.disableWwwAuthenticate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureActiveDirectoryLogin model = new AzureActiveDirectoryLogin() - .withLoginParameters(Arrays.asList("isdkfthwxmnteiw", "opvkmijcm")).withDisableWwwAuthenticate(false); - model = BinaryData.fromObject(model).toObject(AzureActiveDirectoryLogin.class); - Assertions.assertEquals("isdkfthwxmnteiw", model.loginParameters().get(0)); - Assertions.assertEquals(false, model.disableWwwAuthenticate()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.java deleted file mode 100644 index 070a4441d95d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebAppsRegistration; -import org.junit.jupiter.api.Assertions; - -public final class AzureStaticWebAppsRegistrationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureStaticWebAppsRegistration model - = BinaryData.fromString("{\"clientId\":\"wgndrvynhzgpp\"}").toObject(AzureStaticWebAppsRegistration.class); - Assertions.assertEquals("wgndrvynhzgpp", model.clientId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureStaticWebAppsRegistration model = new AzureStaticWebAppsRegistration().withClientId("wgndrvynhzgpp"); - model = BinaryData.fromObject(model).toObject(AzureStaticWebAppsRegistration.class); - Assertions.assertEquals("wgndrvynhzgpp", 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 796a36ccea52..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebApps; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebAppsRegistration; -import org.junit.jupiter.api.Assertions; - -public final class AzureStaticWebAppsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureStaticWebApps model - = BinaryData.fromString("{\"enabled\":true,\"registration\":{\"clientId\":\"ktzlcuiywg\"}}") - .toObject(AzureStaticWebApps.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("ktzlcuiywg", model.registration().clientId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureStaticWebApps model = new AzureStaticWebApps().withEnabled(true) - .withRegistration(new AzureStaticWebAppsRegistration().withClientId("ktzlcuiywg")); - model = BinaryData.fromObject(model).toObject(AzureStaticWebApps.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("ktzlcuiywg", 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 6a849d6d1681..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterCollectionInnerTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.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\":\"qzbqjvsov\",\"properties\":{\"category\":\"kacspkw\",\"meterType\":\"zdobpxjmflbvvnch\",\"displayName\":\"cciw\"},\"id\":\"juqk\",\"name\":\"rsa\",\"type\":\"iwkuofos\"},{\"location\":\"hsauuimjmvxied\",\"properties\":{\"category\":\"idyjrrfbyaosvexc\",\"meterType\":\"npc\",\"displayName\":\"ocohslkevleg\"},\"id\":\"fbuhfmvfaxkffe\",\"name\":\"ithlvmezyvshxm\",\"type\":\"sbbzo\"},{\"location\":\"igrxwburvjxxjn\",\"properties\":{\"category\":\"dptkoenkouk\",\"meterType\":\"udwtiukbl\",\"displayName\":\"gkpocipazyxoe\"},\"id\":\"kgjn\",\"name\":\"iucgygevqzn\",\"type\":\"yp\"},{\"location\":\"bpizcdrqjsdpydn\",\"properties\":{\"category\":\"xdeoejzic\",\"meterType\":\"fsj\",\"displayName\":\"gzfbishcbk\"},\"id\":\"jdeyeamdpha\",\"name\":\"alpbuxwgipwhon\",\"type\":\"wkgshwa\"}]}") - .toObject(BillingMeterCollectionInner.class); - Assertions.assertEquals("qzbqjvsov", model.value().get(0).location()); - Assertions.assertEquals("kacspkw", model.value().get(0).properties().category()); - Assertions.assertEquals("zdobpxjmflbvvnch", model.value().get(0).properties().meterType()); - Assertions.assertEquals("cciw", 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("qzbqjvsov") - .withProperties(new BillingMeterProperties().withCategory("kacspkw").withMeterType("zdobpxjmflbvvnch") - .withDisplayName("cciw")), - new BillingMeter().withLocation("hsauuimjmvxied") - .withProperties(new BillingMeterProperties().withCategory("idyjrrfbyaosvexc").withMeterType("npc") - .withDisplayName("ocohslkevleg")), - new BillingMeter().withLocation("igrxwburvjxxjn") - .withProperties(new BillingMeterProperties().withCategory("dptkoenkouk").withMeterType("udwtiukbl") - .withDisplayName("gkpocipazyxoe")), - new BillingMeter().withLocation("bpizcdrqjsdpydn").withProperties(new BillingMeterProperties() - .withCategory("xdeoejzic").withMeterType("fsj").withDisplayName("gzfbishcbk")))); - model = BinaryData.fromObject(model).toObject(BillingMeterCollectionInner.class); - Assertions.assertEquals("qzbqjvsov", model.value().get(0).location()); - Assertions.assertEquals("kacspkw", model.value().get(0).properties().category()); - Assertions.assertEquals("zdobpxjmflbvvnch", model.value().get(0).properties().meterType()); - Assertions.assertEquals("cciw", 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 346ab94b6466..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterPropertiesTests.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.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\":\"fkbey\",\"meterType\":\"wrmjmwvvjektc\",\"displayName\":\"enhwlrs\"}") - .toObject(BillingMeterProperties.class); - Assertions.assertEquals("fkbey", model.category()); - Assertions.assertEquals("wrmjmwvvjektc", model.meterType()); - Assertions.assertEquals("enhwlrs", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BillingMeterProperties model = new BillingMeterProperties().withCategory("fkbey").withMeterType("wrmjmwvvjektc") - .withDisplayName("enhwlrs"); - model = BinaryData.fromObject(model).toObject(BillingMeterProperties.class); - Assertions.assertEquals("fkbey", model.category()); - Assertions.assertEquals("wrmjmwvvjektc", model.meterType()); - Assertions.assertEquals("enhwlrs", 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 bfd70b49381d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterTests.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.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\":\"ixzbinjeputtmryw\",\"properties\":{\"category\":\"oqftiyqzrnkcq\",\"meterType\":\"xlwhzlsicoh\",\"displayName\":\"qnwvlrya\"},\"id\":\"hheunmmqhgyx\",\"name\":\"konocu\",\"type\":\"oklyaxuconuq\"}") - .toObject(BillingMeter.class); - Assertions.assertEquals("ixzbinjeputtmryw", model.location()); - Assertions.assertEquals("oqftiyqzrnkcq", model.properties().category()); - Assertions.assertEquals("xlwhzlsicoh", model.properties().meterType()); - Assertions.assertEquals("qnwvlrya", model.properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BillingMeter model - = new BillingMeter().withLocation("ixzbinjeputtmryw").withProperties(new BillingMeterProperties() - .withCategory("oqftiyqzrnkcq").withMeterType("xlwhzlsicoh").withDisplayName("qnwvlrya")); - model = BinaryData.fromObject(model).toObject(BillingMeter.class); - Assertions.assertEquals("ixzbinjeputtmryw", model.location()); - Assertions.assertEquals("oqftiyqzrnkcq", model.properties().category()); - Assertions.assertEquals("xlwhzlsicoh", model.properties().meterType()); - Assertions.assertEquals("qnwvlrya", 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 553b35b0c887..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetWithResponseMockTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.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\":\"suah\",\"properties\":{\"category\":\"xjcmmzrrsc\",\"meterType\":\"i\",\"displayName\":\"drnpxqwodiff\"},\"id\":\"cjrmmua\",\"name\":\"wibvjogj\",\"type\":\"nmc\"},{\"location\":\"foyzbamwineof\",\"properties\":{\"category\":\"akpoldtvevbo\",\"meterType\":\"zhzjknyuxg\",\"displayName\":\"txpnrupza\"},\"id\":\"rdixt\",\"name\":\"ekidswyskb\",\"type\":\"uffgllukkutvlx\"}]}"; - - 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("albmqkyojwyvfk", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("suah", response.value().get(0).location()); - Assertions.assertEquals("xjcmmzrrsc", response.value().get(0).properties().category()); - Assertions.assertEquals("i", response.value().get(0).properties().meterType()); - Assertions.assertEquals("drnpxqwodiff", response.value().get(0).properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BlobStorageTokenStoreTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BlobStorageTokenStoreTests.java deleted file mode 100644 index 4ba0dc297ed0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BlobStorageTokenStoreTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BlobStorageTokenStore; -import org.junit.jupiter.api.Assertions; - -public final class BlobStorageTokenStoreTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BlobStorageTokenStore model - = BinaryData.fromString("{\"sasUrlSettingName\":\"keyyi\"}").toObject(BlobStorageTokenStore.class); - Assertions.assertEquals("keyyi", model.sasUrlSettingName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BlobStorageTokenStore model = new BlobStorageTokenStore().withSasUrlSettingName("keyyi"); - model = BinaryData.fromObject(model).toObject(BlobStorageTokenStore.class); - Assertions.assertEquals("keyyi", model.sasUrlSettingName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildConfigurationTests.java deleted file mode 100644 index 3bd395011233..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildConfigurationTests.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.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BuildConfiguration; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVariable; -import com.azure.resourcemanager.appcontainers.models.HttpGet; -import com.azure.resourcemanager.appcontainers.models.PreBuildStep; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BuildConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuildConfiguration model = BinaryData.fromString( - "{\"baseOs\":\"qtkoievs\",\"platform\":\"tgqr\",\"platformVersion\":\"tmuwlauwzi\",\"environmentVariables\":[{\"name\":\"mpgcjefuzmuvpbt\",\"value\":\"d\"}],\"preBuildSteps\":[{\"description\":\"p\",\"scripts\":[\"bmnzbtbhjpgl\",\"fgohdneuelfphs\",\"yhtozfikdowwqu\",\"v\"],\"httpGet\":{\"url\":\"xclvit\",\"fileName\":\"qzonosggbhcohf\",\"headers\":[\"jnkaljutiiswacff\",\"dkzzewkfvhqcrail\"]}},{\"description\":\"n\",\"scripts\":[\"uflrwd\",\"hdlxyjrxsagafcn\",\"hgw\"],\"httpGet\":{\"url\":\"pnedgf\",\"fileName\":\"vkcvqvpkeqd\",\"headers\":[\"rhvoods\",\"tbobz\",\"opcjwvnhd\"]}},{\"description\":\"wmgxcxrsl\",\"scripts\":[\"twuoegrpkhjwni\"],\"httpGet\":{\"url\":\"sluicpdggkzz\",\"fileName\":\"mbmpaxmodfvuefy\",\"headers\":[\"pfvmwyhrfou\",\"ft\"]}},{\"description\":\"kcpwiy\",\"scripts\":[\"tmnubexkpzksmon\",\"jmquxvypomgk\",\"pkwhojvpa\"],\"httpGet\":{\"url\":\"gxysmocmbqfqvm\",\"fileName\":\"xozap\",\"headers\":[\"lxprglyatddckcbc\",\"ejrjxgciqibrho\",\"xsdqrhzoymibmrqy\",\"bahwfl\"]}}]}") - .toObject(BuildConfiguration.class); - Assertions.assertEquals("qtkoievs", model.baseOs()); - Assertions.assertEquals("tgqr", model.platform()); - Assertions.assertEquals("tmuwlauwzi", model.platformVersion()); - Assertions.assertEquals("mpgcjefuzmuvpbt", model.environmentVariables().get(0).name()); - Assertions.assertEquals("d", model.environmentVariables().get(0).value()); - Assertions.assertEquals("p", model.preBuildSteps().get(0).description()); - Assertions.assertEquals("bmnzbtbhjpgl", model.preBuildSteps().get(0).scripts().get(0)); - Assertions.assertEquals("xclvit", model.preBuildSteps().get(0).httpGet().url()); - Assertions.assertEquals("qzonosggbhcohf", model.preBuildSteps().get(0).httpGet().fileName()); - Assertions.assertEquals("jnkaljutiiswacff", model.preBuildSteps().get(0).httpGet().headers().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuildConfiguration model - = new BuildConfiguration().withBaseOs("qtkoievs").withPlatform("tgqr").withPlatformVersion("tmuwlauwzi") - .withEnvironmentVariables( - Arrays.asList(new EnvironmentVariable().withName("mpgcjefuzmuvpbt").withValue("d"))) - .withPreBuildSteps(Arrays.asList( - new PreBuildStep().withDescription("p") - .withScripts(Arrays.asList("bmnzbtbhjpgl", "fgohdneuelfphs", "yhtozfikdowwqu", "v")) - .withHttpGet(new HttpGet().withUrl("xclvit").withFileName("qzonosggbhcohf") - .withHeaders(Arrays.asList("jnkaljutiiswacff", "dkzzewkfvhqcrail"))), - new PreBuildStep().withDescription("n") - .withScripts(Arrays.asList("uflrwd", "hdlxyjrxsagafcn", "hgw")) - .withHttpGet(new HttpGet().withUrl("pnedgf").withFileName("vkcvqvpkeqd") - .withHeaders(Arrays.asList("rhvoods", "tbobz", "opcjwvnhd"))), - new PreBuildStep().withDescription("wmgxcxrsl").withScripts(Arrays.asList("twuoegrpkhjwni")) - .withHttpGet(new HttpGet().withUrl("sluicpdggkzz").withFileName("mbmpaxmodfvuefy") - .withHeaders(Arrays.asList("pfvmwyhrfou", "ft"))), - new PreBuildStep().withDescription("kcpwiy") - .withScripts(Arrays.asList("tmnubexkpzksmon", "jmquxvypomgk", "pkwhojvpa")) - .withHttpGet(new HttpGet().withUrl("gxysmocmbqfqvm").withFileName("xozap").withHeaders( - Arrays.asList("lxprglyatddckcbc", "ejrjxgciqibrho", "xsdqrhzoymibmrqy", "bahwfl"))))); - model = BinaryData.fromObject(model).toObject(BuildConfiguration.class); - Assertions.assertEquals("qtkoievs", model.baseOs()); - Assertions.assertEquals("tgqr", model.platform()); - Assertions.assertEquals("tmuwlauwzi", model.platformVersion()); - Assertions.assertEquals("mpgcjefuzmuvpbt", model.environmentVariables().get(0).name()); - Assertions.assertEquals("d", model.environmentVariables().get(0).value()); - Assertions.assertEquals("p", model.preBuildSteps().get(0).description()); - Assertions.assertEquals("bmnzbtbhjpgl", model.preBuildSteps().get(0).scripts().get(0)); - Assertions.assertEquals("xclvit", model.preBuildSteps().get(0).httpGet().url()); - Assertions.assertEquals("qzonosggbhcohf", model.preBuildSteps().get(0).httpGet().fileName()); - Assertions.assertEquals("jnkaljutiiswacff", model.preBuildSteps().get(0).httpGet().headers().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderCollectionTests.java deleted file mode 100644 index 19ee9362b5ac..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderCollectionTests.java +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; -import com.azure.resourcemanager.appcontainers.models.BuilderCollection; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BuilderCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuilderCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"provisioningState\":\"Failed\",\"environmentId\":\"wvlqdqgb\",\"containerRegistries\":[{\"containerRegistryServer\":\"lihkaetcktvfc\",\"identityResourceId\":\"vf\"},{\"containerRegistryServer\":\"nkymuctqhjfbebrj\",\"identityResourceId\":\"xerf\"},{\"containerRegistryServer\":\"wutttxfvjrbi\",\"identityResourceId\":\"phxepcyvahf\"}]},\"identity\":{\"principalId\":\"847b4663-757a-41a8-a56a-bef3059e77aa\",\"tenantId\":\"df774d78-50b5-4a1d-adac-338d71865837\",\"type\":\"None\",\"userAssignedIdentities\":{\"uujqgidokgjljyo\":{\"principalId\":\"a7fee7c7-290a-4bae-94d9-fb07083e5965\",\"clientId\":\"0889cb62-fb77-4fdb-b1c8-2b173c8fc2be\"},\"cltbgsncghkjesz\":{\"principalId\":\"164d1a09-5a25-463b-b558-f2efc8364f6b\",\"clientId\":\"2ffaa11d-2317-4fec-86d8-1d93bf776f8a\"},\"ijhtxf\":{\"principalId\":\"3951829e-34d2-4e98-bf40-5a758a45d0e8\",\"clientId\":\"96279c01-3539-4642-84b5-ebccf5e05ff1\"},\"bfs\":{\"principalId\":\"728f80c3-ede8-4470-87e4-fe11de510296\",\"clientId\":\"8b1c2b8d-f2f2-4209-8f41-3f8c230b516b\"}}},\"location\":\"nehmpvecx\",\"tags\":{\"ukgri\":\"ebfqkkrbm\",\"fbxzpuzycisp\":\"flz\",\"y\":\"qzahmgkbrp\",\"rgvtqag\":\"hibnuqqkpika\"},\"id\":\"buynhijggm\",\"name\":\"bfs\",\"type\":\"arbu\"},{\"properties\":{\"provisioningState\":\"Succeeded\",\"environmentId\":\"pnazzm\",\"containerRegistries\":[{\"containerRegistryServer\":\"unmpxttd\",\"identityResourceId\":\"hrbnlankxmyskpbh\"},{\"containerRegistryServer\":\"nbtkcxywnytnr\",\"identityResourceId\":\"yn\"}]},\"identity\":{\"principalId\":\"99dac99b-6165-4414-8858-081afadffaee\",\"tenantId\":\"9e9e4442-9e55-454f-9121-dfd87c468189\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"zfcl\":{\"principalId\":\"97be5077-94a1-473d-baa0-da7633d0826c\",\"clientId\":\"2099c3f0-e4d9-420c-9d5b-85bace4a931d\"},\"xdbabphlwr\":{\"principalId\":\"f0472d36-d7b8-4ded-a1c3-7b4b6ccccb2a\",\"clientId\":\"e147659a-84e8-472b-80fd-0d82d0663c31\"}}},\"location\":\"fkts\",\"tags\":{\"nyyazttbtwwrqpue\":\"ucoc\",\"xibxujwbhqwalm\":\"ckzywbiexzfeyue\",\"ux\":\"zyoxaepdkzjan\",\"zt\":\"hdwbavxbniwdjs\"},\"id\":\"dbpgnxytxhp\",\"name\":\"xbzpfzab\",\"type\":\"lcuhxwtctyqiklb\"},{\"properties\":{\"provisioningState\":\"Creating\",\"environmentId\":\"lwzbhvgyugu\",\"containerRegistries\":[{\"containerRegistryServer\":\"mkfssxqukkfplgm\",\"identityResourceId\":\"sxnkjzkdeslpvlo\"},{\"containerRegistryServer\":\"wiyighxpkdw\",\"identityResourceId\":\"baiuebbaumny\"},{\"containerRegistryServer\":\"upedeojnabckhs\",\"identityResourceId\":\"txp\"}]},\"identity\":{\"principalId\":\"f84befd7-75fa-49a4-abee-cfbabdc853d1\",\"tenantId\":\"85643d46-bb48-41b8-ad99-9bc5fea1ab84\",\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{\"esap\":{\"principalId\":\"a98a3a00-f04d-4aec-bdad-24e8cea65ea8\",\"clientId\":\"5a3b38f1-76b5-4b45-ba9e-61ef317d599a\"},\"dqmh\":{\"principalId\":\"656b7cd5-d2b0-4edf-b482-37215064e168\",\"clientId\":\"c8bb6d30-8937-448a-97a2-c4ff7d398651\"},\"htldwk\":{\"principalId\":\"dd5064b4-3820-4423-834c-29b659c662b6\",\"clientId\":\"d75b71f7-777c-4b86-9fa1-82c28fab3b0d\"},\"uutkncw\":{\"principalId\":\"c059546f-c78c-47cf-9cfa-5cafa7a16def\",\"clientId\":\"7de0cf22-8535-493e-86f6-03a477389d01\"}}},\"location\":\"wsvlxotogtwrupqs\",\"tags\":{\"notyfjfcnjbkcn\":\"micykvceoveilo\"},\"id\":\"dhbt\",\"name\":\"kphywpnvjto\",\"type\":\"nermcl\"}],\"nextLink\":\"lphox\"}") - .toObject(BuilderCollection.class); - Assertions.assertEquals("nehmpvecx", model.value().get(0).location()); - Assertions.assertEquals("ebfqkkrbm", model.value().get(0).tags().get("ukgri")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("wvlqdqgb", model.value().get(0).environmentId()); - Assertions.assertEquals("lihkaetcktvfc", - model.value().get(0).containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("vf", model.value().get(0).containerRegistries().get(0).identityResourceId()); - Assertions.assertEquals("lphox", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuilderCollection model - = new BuilderCollection() - .withValue( - Arrays - .asList( - new BuilderResourceInner().withLocation("nehmpvecx") - .withTags(mapOf("ukgri", "ebfqkkrbm", "fbxzpuzycisp", "flz", "y", "qzahmgkbrp", - "rgvtqag", "hibnuqqkpika")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf("uujqgidokgjljyo", new UserAssignedIdentity(), - "cltbgsncghkjesz", new UserAssignedIdentity(), "ijhtxf", - new UserAssignedIdentity(), "bfs", new UserAssignedIdentity()))) - .withEnvironmentId("wvlqdqgb") - .withContainerRegistries(Arrays.asList( - new ContainerRegistry().withContainerRegistryServer("lihkaetcktvfc") - .withIdentityResourceId("vf"), - new ContainerRegistry().withContainerRegistryServer("nkymuctqhjfbebrj") - .withIdentityResourceId("xerf"), - new ContainerRegistry().withContainerRegistryServer("wutttxfvjrbi") - .withIdentityResourceId("phxepcyvahf"))), - new BuilderResourceInner().withLocation("fkts") - .withTags(mapOf("nyyazttbtwwrqpue", "ucoc", "xibxujwbhqwalm", "ckzywbiexzfeyue", "ux", - "zyoxaepdkzjan", "zt", "hdwbavxbniwdjs")) - .withIdentity( - new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("zfcl", new UserAssignedIdentity(), - "xdbabphlwr", new UserAssignedIdentity()))) - .withEnvironmentId("pnazzm") - .withContainerRegistries(Arrays.asList( - new ContainerRegistry().withContainerRegistryServer("unmpxttd") - .withIdentityResourceId("hrbnlankxmyskpbh"), - new ContainerRegistry().withContainerRegistryServer("nbtkcxywnytnr") - .withIdentityResourceId("yn"))), - new BuilderResourceInner().withLocation("wsvlxotogtwrupqs") - .withTags(mapOf("notyfjfcnjbkcn", "micykvceoveilo")) - .withIdentity(new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("esap", new UserAssignedIdentity(), "dqmh", - new UserAssignedIdentity(), "htldwk", new UserAssignedIdentity(), "uutkncw", - new UserAssignedIdentity()))) - .withEnvironmentId("lwzbhvgyugu") - .withContainerRegistries(Arrays.asList( - new ContainerRegistry().withContainerRegistryServer("mkfssxqukkfplgm") - .withIdentityResourceId("sxnkjzkdeslpvlo"), - new ContainerRegistry().withContainerRegistryServer("wiyighxpkdw") - .withIdentityResourceId("baiuebbaumny"), - new ContainerRegistry().withContainerRegistryServer("upedeojnabckhs") - .withIdentityResourceId("txp"))))) - .withNextLink("lphox"); - model = BinaryData.fromObject(model).toObject(BuilderCollection.class); - Assertions.assertEquals("nehmpvecx", model.value().get(0).location()); - Assertions.assertEquals("ebfqkkrbm", model.value().get(0).tags().get("ukgri")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.value().get(0).identity().type()); - Assertions.assertEquals("wvlqdqgb", model.value().get(0).environmentId()); - Assertions.assertEquals("lihkaetcktvfc", - model.value().get(0).containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("vf", model.value().get(0).containerRegistries().get(0).identityResourceId()); - Assertions.assertEquals("lphox", model.nextLink()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderPropertiesTests.java deleted file mode 100644 index 0005ed2ef507..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderPropertiesTests.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.fluent.models.BuilderProperties; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BuilderPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuilderProperties model = BinaryData.fromString( - "{\"provisioningState\":\"Deleting\",\"environmentId\":\"b\",\"containerRegistries\":[{\"containerRegistryServer\":\"dawkzbali\",\"identityResourceId\":\"urqhaka\"},{\"containerRegistryServer\":\"hashsfwxosow\",\"identityResourceId\":\"xcug\"},{\"containerRegistryServer\":\"cjooxdjebwpucwwf\",\"identityResourceId\":\"ovbvmeueciv\"},{\"containerRegistryServer\":\"hzceuojgjrwjue\",\"identityResourceId\":\"otwmcdyt\"}]}") - .toObject(BuilderProperties.class); - Assertions.assertEquals("b", model.environmentId()); - Assertions.assertEquals("dawkzbali", model.containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("urqhaka", model.containerRegistries().get(0).identityResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuilderProperties model = new BuilderProperties().withEnvironmentId("b").withContainerRegistries(Arrays.asList( - new ContainerRegistry().withContainerRegistryServer("dawkzbali").withIdentityResourceId("urqhaka"), - new ContainerRegistry().withContainerRegistryServer("hashsfwxosow").withIdentityResourceId("xcug"), - new ContainerRegistry().withContainerRegistryServer("cjooxdjebwpucwwf") - .withIdentityResourceId("ovbvmeueciv"), - new ContainerRegistry().withContainerRegistryServer("hzceuojgjrwjue").withIdentityResourceId("otwmcdyt"))); - model = BinaryData.fromObject(model).toObject(BuilderProperties.class); - Assertions.assertEquals("b", model.environmentId()); - Assertions.assertEquals("dawkzbali", model.containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("urqhaka", model.containerRegistries().get(0).identityResourceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceInnerTests.java deleted file mode 100644 index 80d64973eaba..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceInnerTests.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.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BuilderResourceInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuilderResourceInner model = BinaryData.fromString( - "{\"properties\":{\"provisioningState\":\"Canceled\",\"environmentId\":\"pabgyeps\",\"containerRegistries\":[{\"containerRegistryServer\":\"azqugxywpmueefj\",\"identityResourceId\":\"wfqkquj\"},{\"containerRegistryServer\":\"dsuyonobgla\",\"identityResourceId\":\"cq\"},{\"containerRegistryServer\":\"tcc\",\"identityResourceId\":\"g\"},{\"containerRegistryServer\":\"udxytlmoyrx\",\"identityResourceId\":\"wfudwpzntxhdzhl\"}]},\"identity\":{\"principalId\":\"d283a77e-dc68-4ae8-9a29-91c6c96dc2b0\",\"tenantId\":\"b5f6c785-2c4d-4e2f-a0e8-4d64408cfd27\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"lhrxsbkyvpyc\":{\"principalId\":\"2490eb9b-07eb-4e06-966e-9cf27322e46a\",\"clientId\":\"fa5994e2-52a1-4105-b133-71ed814de3d2\"},\"z\":{\"principalId\":\"fd046a24-727e-48e9-9aa4-f098807f38bb\",\"clientId\":\"ab7a4713-0fc0-41a8-9005-ac1ab2176387\"},\"kafkuwbcrnwbm\":{\"principalId\":\"306b92b0-9b5e-4a2f-90ff-9628fb77bc1c\",\"clientId\":\"63448741-c49e-4827-94f1-a0095ba114de\"}}},\"location\":\"hseyvju\",\"tags\":{\"kdeemaofmxagkvtm\":\"slhs\",\"ahaquh\":\"lmqkrhahvlj\",\"aex\":\"dhmdua\"},\"id\":\"pvfadmwsrcr\",\"name\":\"vxpvgomz\",\"type\":\"fmisg\"}") - .toObject(BuilderResourceInner.class); - Assertions.assertEquals("hseyvju", model.location()); - Assertions.assertEquals("slhs", model.tags().get("kdeemaofmxagkvtm")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("pabgyeps", model.environmentId()); - Assertions.assertEquals("azqugxywpmueefj", model.containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("wfqkquj", model.containerRegistries().get(0).identityResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuilderResourceInner model = new BuilderResourceInner().withLocation("hseyvju") - .withTags(mapOf("kdeemaofmxagkvtm", "slhs", "ahaquh", "lmqkrhahvlj", "aex", "dhmdua")) - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("lhrxsbkyvpyc", new UserAssignedIdentity(), "z", - new UserAssignedIdentity(), "kafkuwbcrnwbm", new UserAssignedIdentity()))) - .withEnvironmentId("pabgyeps") - .withContainerRegistries(Arrays.asList( - new ContainerRegistry().withContainerRegistryServer("azqugxywpmueefj") - .withIdentityResourceId("wfqkquj"), - new ContainerRegistry().withContainerRegistryServer("dsuyonobgla").withIdentityResourceId("cq"), - new ContainerRegistry().withContainerRegistryServer("tcc").withIdentityResourceId("g"), - new ContainerRegistry().withContainerRegistryServer("udxytlmoyrx") - .withIdentityResourceId("wfudwpzntxhdzhl"))); - model = BinaryData.fromObject(model).toObject(BuilderResourceInner.class); - Assertions.assertEquals("hseyvju", model.location()); - Assertions.assertEquals("slhs", model.tags().get("kdeemaofmxagkvtm")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.identity().type()); - Assertions.assertEquals("pabgyeps", model.environmentId()); - Assertions.assertEquals("azqugxywpmueefj", model.containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("wfqkquj", model.containerRegistries().get(0).identityResourceId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdatePropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdatePropertiesTests.java deleted file mode 100644 index cca471d917c8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdatePropertiesTests.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.BuilderResourceUpdateProperties; -import org.junit.jupiter.api.Assertions; - -public final class BuilderResourceUpdatePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuilderResourceUpdateProperties model - = BinaryData.fromString("{\"environmentId\":\"zjuzgwyz\"}").toObject(BuilderResourceUpdateProperties.class); - Assertions.assertEquals("zjuzgwyz", model.environmentId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuilderResourceUpdateProperties model = new BuilderResourceUpdateProperties().withEnvironmentId("zjuzgwyz"); - model = BinaryData.fromObject(model).toObject(BuilderResourceUpdateProperties.class); - Assertions.assertEquals("zjuzgwyz", model.environmentId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdateTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdateTests.java deleted file mode 100644 index 53627eaca33b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuilderResourceUpdateTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BuilderResourceUpdate; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class BuilderResourceUpdateTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BuilderResourceUpdate model = BinaryData.fromString( - "{\"identity\":{\"principalId\":\"84d35291-d118-4f28-95b0-c1dcc3c3a910\",\"tenantId\":\"263ffff3-91e3-4316-90cc-1884f071a054\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"dnhjdauwhvylw\":{\"principalId\":\"b77a149b-c006-4798-9e9d-df5a35b59301\",\"clientId\":\"39ba2083-5071-4bde-9214-424f126d40a2\"}}},\"tags\":{\"uwprzql\":\"dhxujznbmpo\",\"obbc\":\"eualupjmkhf\",\"tghfgblcgwxzvl\":\"wsrtjriplrbpbe\",\"egibtnmxiebww\":\"qhjk\"},\"properties\":{\"environmentId\":\"ayqcgw\"}}") - .toObject(BuilderResourceUpdate.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("dhxujznbmpo", model.tags().get("uwprzql")); - Assertions.assertEquals("ayqcgw", model.environmentId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BuilderResourceUpdate model = new BuilderResourceUpdate() - .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("dnhjdauwhvylw", new UserAssignedIdentity()))) - .withTags(mapOf("uwprzql", "dhxujznbmpo", "obbc", "eualupjmkhf", "tghfgblcgwxzvl", "wsrtjriplrbpbe", - "egibtnmxiebww", "qhjk")) - .withEnvironmentId("ayqcgw"); - model = BinaryData.fromObject(model).toObject(BuilderResourceUpdate.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("dhxujznbmpo", model.tags().get("uwprzql")); - Assertions.assertEquals("ayqcgw", model.environmentId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateMockTests.java deleted file mode 100644 index 906b03fa1bd0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateMockTests.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.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.BuilderResource; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import java.nio.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 BuildersCreateOrUpdateMockTests { - @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\":{\"provisioningState\":\"Succeeded\",\"environmentId\":\"atmqaqkuea\",\"containerRegistries\":[{\"containerRegistryServer\":\"oeshoygzcbyfq\",\"identityResourceId\":\"kfaoytehq\"},{\"containerRegistryServer\":\"uvjmv\",\"identityResourceId\":\"mtdwcky\"},{\"containerRegistryServer\":\"roejnndl\",\"identityResourceId\":\"djus\"}]},\"identity\":{\"principalId\":\"29dd6fc0-5b2c-4cc8-9cb1-9501230a97a8\",\"tenantId\":\"5b1e8839-d481-4cb6-90ec-e581fdf6f956\",\"type\":\"None\",\"userAssignedIdentities\":{\"ceysfaqeg\":{\"principalId\":\"6cd39565-3324-42f6-98f0-583a9e522072\",\"clientId\":\"7ff600fa-8860-4231-b8b5-4d6dc00eafc2\"},\"ryshwddkvbxgk\":{\"principalId\":\"0c22e148-22ce-455b-bffb-2d4bbec3cd57\",\"clientId\":\"8c461e97-f8b7-4554-84f9-0649f58baf04\"},\"ybwptda\":{\"principalId\":\"af01ff2e-9a5d-499a-b7e8-0bf72c2ab883\",\"clientId\":\"6db5edb8-83ab-4cf7-82c0-3800f26995e0\"},\"vvlfntymtp\":{\"principalId\":\"20a56fda-56ca-42b7-85fb-ccf6bca27205\",\"clientId\":\"e465b82e-bfa2-44c4-9a2f-d84fc0233ac5\"}}},\"location\":\"wenaz\",\"tags\":{\"qalsxkd\":\"hzr\",\"vessm\":\"wqapfgsdp\",\"dqq\":\"hhkuuip\"},\"id\":\"tekva\",\"name\":\"blhtjq\",\"type\":\"qyv\"}"; - - 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)); - - BuilderResource response = manager.builders().define("jbuscg").withRegion("yqrhvyeld") - .withExistingResourceGroup("bapxkiyfjjkb").withTags(mapOf("kwiswskukjtas", "v")) - .withIdentity( - new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) - .withUserAssignedIdentities(mapOf("ovwmbjlzqsczpgvd", new UserAssignedIdentity(), "pfdqwowftptnu", - new UserAssignedIdentity(), "kschgcgqyhle", new UserAssignedIdentity()))) - .withEnvironmentId("ioycbl") - .withContainerRegistries(Arrays.asList( - new ContainerRegistry().withContainerRegistryServer("mclujyxkyxlzgs").withIdentityResourceId("gkzz"))) - .create(); - - Assertions.assertEquals("wenaz", response.location()); - Assertions.assertEquals("hzr", response.tags().get("qalsxkd")); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, response.identity().type()); - Assertions.assertEquals("atmqaqkuea", response.environmentId()); - Assertions.assertEquals("oeshoygzcbyfq", response.containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("kfaoytehq", response.containerRegistries().get(0).identityResourceId()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupWithResponseMockTests.java deleted file mode 100644 index 1773ed82e36c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupWithResponseMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.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.BuilderResource; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -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 BuildersGetByResourceGroupWithResponseMockTests { - @Test - public void testGetByResourceGroupWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"properties\":{\"provisioningState\":\"Creating\",\"environmentId\":\"fwxudgnhg\",\"containerRegistries\":[{\"containerRegistryServer\":\"rtalvnbw\",\"identityResourceId\":\"pbeme\"},{\"containerRegistryServer\":\"uclvdjj\",\"identityResourceId\":\"kyrdnqodx\"}]},\"identity\":{\"principalId\":\"bd9b5d66-1857-47d4-96d2-da4b481c35dd\",\"tenantId\":\"84cd9d11-7fea-4e15-ac57-bda25c53edac\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"nvzoqgyipemch\":{\"principalId\":\"16827f64-00c8-404f-aeea-4da9cde3c89b\",\"clientId\":\"c5ce0006-6d24-445d-92b4-833a2c7a7490\"},\"sczuejdtxptlghwz\":{\"principalId\":\"b8d8b831-a0f2-47f3-8a51-4a61f7514391\",\"clientId\":\"cc54e4b5-cc4c-4b96-8585-53dc03fcb8e8\"}}},\"location\":\"mewjjstliuhq\",\"tags\":{\"blxydkxr\":\"oaiancznvodrrs\",\"hychocokuleh\":\"vvbxiwkgfbqljnq\"},\"id\":\"rqlrqffawe\",\"name\":\"urkphyjdxravju\",\"type\":\"dbrxmrgc\"}"; - - 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)); - - BuilderResource response = manager.builders() - .getByResourceGroupWithResponse("ftabenbbklqp", "zucafeddww", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("mewjjstliuhq", response.location()); - Assertions.assertEquals("oaiancznvodrrs", response.tags().get("blxydkxr")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, response.identity().type()); - Assertions.assertEquals("fwxudgnhg", response.environmentId()); - Assertions.assertEquals("rtalvnbw", response.containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("pbeme", response.containerRegistries().get(0).identityResourceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupMockTests.java deleted file mode 100644 index 9b78786f059b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupMockTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights 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.BuilderResource; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -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 BuildersListByResourceGroupMockTests { - @Test - public void testListByResourceGroup() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"value\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"environmentId\":\"jzcfyjzptwr\",\"containerRegistries\":[{\"containerRegistryServer\":\"apqinf\",\"identityResourceId\":\"zpyglqdhmrj\"}]},\"identity\":{\"principalId\":\"c109c21e-0de6-4ec9-9e01-b23c08f50998\",\"tenantId\":\"05125a64-3f48-49a4-8407-c0dbd090d728\",\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"yypsjoqc\":{\"principalId\":\"9eb3f752-d5b7-4d78-b818-4f329432f5b6\",\"clientId\":\"a410d029-5e56-4090-83f9-84d3bb9258c0\"}}},\"location\":\"nkyhf\",\"tags\":{\"jhhhqxu\":\"sqxfxjelgcmpz\",\"oyvivbsiz\":\"yvca\",\"bscm\":\"sjsz\",\"v\":\"lzijiufehgmvflnw\"},\"id\":\"kxrerlniylylyfwx\",\"name\":\"utgqztwh\",\"type\":\"hmupgxyjtcdxabbu\"}]}"; - - 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.builders().listByResourceGroup("hcoeocnhzq", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("nkyhf", response.iterator().next().location()); - Assertions.assertEquals("sqxfxjelgcmpz", response.iterator().next().tags().get("jhhhqxu")); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("jzcfyjzptwr", response.iterator().next().environmentId()); - Assertions.assertEquals("apqinf", - response.iterator().next().containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("zpyglqdhmrj", - response.iterator().next().containerRegistries().get(0).identityResourceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListMockTests.java deleted file mode 100644 index 14576179a9bf..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BuildersListMockTests.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.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.BuilderResource; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -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 BuildersListMockTests { - @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\":[{\"properties\":{\"provisioningState\":\"Deleting\",\"environmentId\":\"hvmblcouqehbhbc\",\"containerRegistries\":[{\"containerRegistryServer\":\"iryr\",\"identityResourceId\":\"ndo\"},{\"containerRegistryServer\":\"pmbltoormkfql\",\"identityResourceId\":\"xldykalsygaolnjp\"},{\"containerRegistryServer\":\"nbmjksibjgsjjxxa\",\"identityResourceId\":\"mr\"}]},\"identity\":{\"principalId\":\"1c0c7461-3309-4da8-9a13-57a29f20a97a\",\"tenantId\":\"f4d0c201-f27f-4a61-9ce1-ee809d63cbc9\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"yi\":{\"principalId\":\"8c44f5f7-1e24-45c6-8ed8-7777f6b38434\",\"clientId\":\"996c6a94-136d-48bd-826a-dfa5b00f46e1\"},\"nbm\":{\"principalId\":\"15efa945-7dba-47ff-9a63-7af495e5bce0\",\"clientId\":\"87bb6b63-12d1-4dc5-9198-4d1337032c68\"},\"jijkgqxnhmbke\":{\"principalId\":\"c3b09876-f7ea-4464-8c81-489961014d00\",\"clientId\":\"f3afd130-f471-4f6e-bccb-6be5ee9517d3\"},\"aujvaa\":{\"principalId\":\"aea57d92-76b1-4aa4-95da-0a7b69363c60\",\"clientId\":\"58f73390-0e22-4fce-a34a-5b5e0fbf1c13\"}}},\"location\":\"ggiycwkdtaawxwf\",\"tags\":{\"kratbnxwbj\":\"umrrqmbzm\",\"dgo\":\"idbirkfpkso\",\"zkye\":\"ewijymrhbguz\",\"o\":\"nfnzhhh\"},\"id\":\"mffjkutycyarn\",\"name\":\"oohguabzoghkt\",\"type\":\"pyc\"}]}"; - - 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.builders().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ggiycwkdtaawxwf", response.iterator().next().location()); - Assertions.assertEquals("umrrqmbzm", response.iterator().next().tags().get("kratbnxwbj")); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, - response.iterator().next().identity().type()); - Assertions.assertEquals("hvmblcouqehbhbc", response.iterator().next().environmentId()); - Assertions.assertEquals("iryr", - response.iterator().next().containerRegistries().get(0).containerRegistryServer()); - Assertions.assertEquals("ndo", response.iterator().next().containerRegistries().get(0).identityResourceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatePatchTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatePatchTests.java deleted file mode 100644 index 52739b2c49ca..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatePatchTests.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.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\":{\"ekkezzikhlyfjh\":\"kfcktqum\"}}").toObject(CertificatePatch.class); - Assertions.assertEquals("kfcktqum", model.tags().get("ekkezzikhlyfjh")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CertificatePatch model = new CertificatePatch().withTags(mapOf("ekkezzikhlyfjh", "kfcktqum")); - model = BinaryData.fromObject(model).toObject(CertificatePatch.class); - Assertions.assertEquals("kfcktqum", model.tags().get("ekkezzikhlyfjh")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteWithResponseMockTests.java deleted file mode 100644 index cbeb7511b7d9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.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("ymjzpwdlvwtiws", "osaonhqnamppu", "tassaekewna", - 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 54fee892b5da..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameAvailabilityRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameAvailabilityRequest model = BinaryData.fromString("{\"name\":\"i\",\"type\":\"blxgwimf\"}") - .toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("i", model.name()); - Assertions.assertEquals("blxgwimf", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityRequest model = new CheckNameAvailabilityRequest().withName("i").withType("blxgwimf"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("i", model.name()); - Assertions.assertEquals("blxgwimf", 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 6d25db82465b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityResponseInnerTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReason; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameAvailabilityResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameAvailabilityResponseInner model - = BinaryData.fromString("{\"nameAvailable\":false,\"reason\":\"Invalid\",\"message\":\"wmszkk\"}") - .toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, model.reason()); - Assertions.assertEquals("wmszkk", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityResponseInner model = new CheckNameAvailabilityResponseInner().withNameAvailable(false) - .withReason(CheckNameAvailabilityReason.INVALID).withMessage("wmszkk"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(false, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, model.reason()); - Assertions.assertEquals("wmszkk", model.message()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CircuitBreakerPolicyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CircuitBreakerPolicyTests.java deleted file mode 100644 index 552002cd6f22..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CircuitBreakerPolicyTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CircuitBreakerPolicy; -import org.junit.jupiter.api.Assertions; - -public final class CircuitBreakerPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CircuitBreakerPolicy model = BinaryData - .fromString( - "{\"consecutiveErrors\":1722437661,\"intervalInSeconds\":1946289710,\"maxEjectionPercent\":158340850}") - .toObject(CircuitBreakerPolicy.class); - Assertions.assertEquals(1722437661, model.consecutiveErrors()); - Assertions.assertEquals(1946289710, model.intervalInSeconds()); - Assertions.assertEquals(158340850, model.maxEjectionPercent()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CircuitBreakerPolicy model = new CircuitBreakerPolicy().withConsecutiveErrors(1722437661) - .withIntervalInSeconds(1946289710).withMaxEjectionPercent(158340850); - model = BinaryData.fromObject(model).toObject(CircuitBreakerPolicy.class); - Assertions.assertEquals(1722437661, model.consecutiveErrors()); - Assertions.assertEquals(1946289710, model.intervalInSeconds()); - Assertions.assertEquals(158340850, model.maxEjectionPercent()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteWithResponseMockTests.java deleted file mode 100644 index aeaabdb8f080..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.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("rcyrucpcunnu", "dqumoenodnai", "nhq", - 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 03908e4869ac..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilityWithResponseMockTests.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 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\":\"Invalid\",\"message\":\"jtfvpndpmiljpn\"}"; - - 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("zregzgyufutrwpw", "ryekzkd", - new CheckNameAvailabilityRequest().withName("eotta").withType("yos"), com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, response.reason()); - Assertions.assertEquals("jtfvpndpmiljpn", 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 8036deaffa7f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.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("rhunlp", "rykycndzfqivjr", "uykbbmn", - 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 e8e274a5ebe6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsWithResponseMockTests.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.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\":\"myymvqdbpbhfckdv\",\"value\":\"crcss\"},{\"name\":\"hddubbnqfbl\",\"value\":\"alehpav\"}]}"; - - 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("aglt", "xoe", "onql", 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 24f9db539107..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteMockTests.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.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("hfw", "v", 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 29790bd95607..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.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("xeyg", "qigijiitnspxlzde", "ygr", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppJobExecutionsInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppJobExecutionsInnerTests.java deleted file mode 100644 index 99c65f203b0c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppJobExecutionsInnerTests.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.ContainerAppJobExecutionsInner; -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 ContainerAppJobExecutionsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppJobExecutionsInner model = BinaryData.fromString( - "{\"value\":[{\"name\":\"uartvti\",\"id\":\"yefchnm\",\"type\":\"hmnxhkxjqi\",\"properties\":{\"status\":\"Degraded\",\"startTime\":\"2021-02-25T22:43:28Z\",\"endTime\":\"2021-08-15T18:00:46Z\",\"template\":{\"containers\":[{}],\"initContainers\":[{}]}}},{\"name\":\"wrsnewmozqvbu\",\"id\":\"ma\",\"type\":\"sycxhxzgaz\",\"properties\":{\"status\":\"Running\",\"startTime\":\"2021-09-16T19:45:24Z\",\"endTime\":\"2021-01-19T00:16:09Z\",\"template\":{\"containers\":[{},{},{},{}],\"initContainers\":[{}]}}}],\"nextLink\":\"ubowsepdfgkm\"}") - .toObject(ContainerAppJobExecutionsInner.class); - Assertions.assertEquals("uartvti", model.value().get(0).name()); - Assertions.assertEquals("yefchnm", model.value().get(0).id()); - Assertions.assertEquals("hmnxhkxjqi", model.value().get(0).type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-25T22:43:28Z"), model.value().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-15T18:00:46Z"), 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("uartvti").withId("yefchnm").withType("hmnxhkxjqi") - .withStartTime(OffsetDateTime.parse("2021-02-25T22:43:28Z")) - .withEndTime(OffsetDateTime.parse("2021-08-15T18:00:46Z")) - .withTemplate(new JobExecutionTemplate().withContainers(Arrays.asList(new JobExecutionContainer())) - .withInitContainers(Arrays.asList(new JobExecutionContainer()))), - new JobExecutionInner().withName("wrsnewmozqvbu").withId("ma").withType("sycxhxzgaz") - .withStartTime(OffsetDateTime.parse("2021-09-16T19:45:24Z")) - .withEndTime(OffsetDateTime.parse("2021-01-19T00:16:09Z")) - .withTemplate(new JobExecutionTemplate() - .withContainers(Arrays.asList(new JobExecutionContainer(), new JobExecutionContainer(), - new JobExecutionContainer(), new JobExecutionContainer())) - .withInitContainers(Arrays.asList(new JobExecutionContainer()))))); - model = BinaryData.fromObject(model).toObject(ContainerAppJobExecutionsInner.class); - Assertions.assertEquals("uartvti", model.value().get(0).name()); - Assertions.assertEquals("yefchnm", model.value().get(0).id()); - Assertions.assertEquals("hmnxhkxjqi", model.value().get(0).type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-25T22:43:28Z"), model.value().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-15T18:00:46Z"), 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 546d6b8d32bd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetHttpHeadersItemTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppProbeHttpGetHttpHeadersItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppProbeHttpGetHttpHeadersItem model - = BinaryData.fromString("{\"name\":\"lihhyuspskasdvlm\",\"value\":\"wdgzxulucv\"}") - .toObject(ContainerAppProbeHttpGetHttpHeadersItem.class); - Assertions.assertEquals("lihhyuspskasdvlm", model.name()); - Assertions.assertEquals("wdgzxulucv", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbeHttpGetHttpHeadersItem model - = new ContainerAppProbeHttpGetHttpHeadersItem().withName("lihhyuspskasdvlm").withValue("wdgzxulucv"); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeHttpGetHttpHeadersItem.class); - Assertions.assertEquals("lihhyuspskasdvlm", model.name()); - Assertions.assertEquals("wdgzxulucv", 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 0a450bfe15d9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetTests.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.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\":\"shfssnrbgyef\",\"httpHeaders\":[{\"name\":\"sgaojfmwncot\",\"value\":\"rfh\"},{\"name\":\"rctym\",\"value\":\"xoftpipiwyczu\"}],\"path\":\"a\",\"port\":850210589,\"scheme\":\"HTTP\"}") - .toObject(ContainerAppProbeHttpGet.class); - Assertions.assertEquals("shfssnrbgyef", model.host()); - Assertions.assertEquals("sgaojfmwncot", model.httpHeaders().get(0).name()); - Assertions.assertEquals("rfh", model.httpHeaders().get(0).value()); - Assertions.assertEquals("a", model.path()); - Assertions.assertEquals(850210589, model.port()); - Assertions.assertEquals(Scheme.HTTP, model.scheme()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbeHttpGet model - = new ContainerAppProbeHttpGet().withHost("shfssnrbgyef") - .withHttpHeaders(Arrays.asList( - new ContainerAppProbeHttpGetHttpHeadersItem().withName("sgaojfmwncot").withValue("rfh"), - new ContainerAppProbeHttpGetHttpHeadersItem().withName("rctym").withValue("xoftpipiwyczu"))) - .withPath("a").withPort(850210589).withScheme(Scheme.HTTP); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeHttpGet.class); - Assertions.assertEquals("shfssnrbgyef", model.host()); - Assertions.assertEquals("sgaojfmwncot", model.httpHeaders().get(0).name()); - Assertions.assertEquals("rfh", model.httpHeaders().get(0).value()); - Assertions.assertEquals("a", model.path()); - Assertions.assertEquals(850210589, 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 9acc70016448..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTcpSocketTests.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.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\":\"mrsreuzvxurisjnh\",\"port\":1189641650}") - .toObject(ContainerAppProbeTcpSocket.class); - Assertions.assertEquals("mrsreuzvxurisjnh", model.host()); - Assertions.assertEquals(1189641650, model.port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbeTcpSocket model - = new ContainerAppProbeTcpSocket().withHost("mrsreuzvxurisjnh").withPort(1189641650); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeTcpSocket.class); - Assertions.assertEquals("mrsreuzvxurisjnh", model.host()); - Assertions.assertEquals(1189641650, 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 61093c41d2fd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.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\":1290029311,\"httpGet\":{\"host\":\"ycnunvjsrtk\",\"httpHeaders\":[{\"name\":\"nopqgikyzirtx\",\"value\":\"yuxzejntpsewgi\"},{\"name\":\"ilqu\",\"value\":\"rydxtqm\"},{\"name\":\"eoxorggufhyao\",\"value\":\"tbghhavgrvkf\"},{\"name\":\"ovjzhpjbibgjmfx\",\"value\":\"mv\"}],\"path\":\"luyovwxnbkfezzx\",\"port\":357757853,\"scheme\":\"HTTPS\"},\"initialDelaySeconds\":1673017156,\"periodSeconds\":215949715,\"successThreshold\":1640359024,\"tcpSocket\":{\"host\":\"bzbomvzzbtdcqvpn\",\"port\":1622829877},\"terminationGracePeriodSeconds\":2588743107415946739,\"timeoutSeconds\":277819924,\"type\":\"Startup\"}") - .toObject(ContainerAppProbe.class); - Assertions.assertEquals(1290029311, model.failureThreshold()); - Assertions.assertEquals("ycnunvjsrtk", model.httpGet().host()); - Assertions.assertEquals("nopqgikyzirtx", model.httpGet().httpHeaders().get(0).name()); - Assertions.assertEquals("yuxzejntpsewgi", model.httpGet().httpHeaders().get(0).value()); - Assertions.assertEquals("luyovwxnbkfezzx", model.httpGet().path()); - Assertions.assertEquals(357757853, model.httpGet().port()); - Assertions.assertEquals(Scheme.HTTPS, model.httpGet().scheme()); - Assertions.assertEquals(1673017156, model.initialDelaySeconds()); - Assertions.assertEquals(215949715, model.periodSeconds()); - Assertions.assertEquals(1640359024, model.successThreshold()); - Assertions.assertEquals("bzbomvzzbtdcqvpn", model.tcpSocket().host()); - Assertions.assertEquals(1622829877, model.tcpSocket().port()); - Assertions.assertEquals(2588743107415946739L, model.terminationGracePeriodSeconds()); - Assertions.assertEquals(277819924, model.timeoutSeconds()); - Assertions.assertEquals(Type.STARTUP, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbe model = new ContainerAppProbe().withFailureThreshold(1290029311) - .withHttpGet(new ContainerAppProbeHttpGet().withHost("ycnunvjsrtk") - .withHttpHeaders(Arrays.asList( - new ContainerAppProbeHttpGetHttpHeadersItem().withName("nopqgikyzirtx").withValue("yuxzejntpsewgi"), - new ContainerAppProbeHttpGetHttpHeadersItem().withName("ilqu").withValue("rydxtqm"), - new ContainerAppProbeHttpGetHttpHeadersItem().withName("eoxorggufhyao").withValue("tbghhavgrvkf"), - new ContainerAppProbeHttpGetHttpHeadersItem().withName("ovjzhpjbibgjmfx").withValue("mv"))) - .withPath("luyovwxnbkfezzx").withPort(357757853).withScheme(Scheme.HTTPS)) - .withInitialDelaySeconds(1673017156).withPeriodSeconds(215949715).withSuccessThreshold(1640359024) - .withTcpSocket(new ContainerAppProbeTcpSocket().withHost("bzbomvzzbtdcqvpn").withPort(1622829877)) - .withTerminationGracePeriodSeconds(2588743107415946739L).withTimeoutSeconds(277819924) - .withType(Type.STARTUP); - model = BinaryData.fromObject(model).toObject(ContainerAppProbe.class); - Assertions.assertEquals(1290029311, model.failureThreshold()); - Assertions.assertEquals("ycnunvjsrtk", model.httpGet().host()); - Assertions.assertEquals("nopqgikyzirtx", model.httpGet().httpHeaders().get(0).name()); - Assertions.assertEquals("yuxzejntpsewgi", model.httpGet().httpHeaders().get(0).value()); - Assertions.assertEquals("luyovwxnbkfezzx", model.httpGet().path()); - Assertions.assertEquals(357757853, model.httpGet().port()); - Assertions.assertEquals(Scheme.HTTPS, model.httpGet().scheme()); - Assertions.assertEquals(1673017156, model.initialDelaySeconds()); - Assertions.assertEquals(215949715, model.periodSeconds()); - Assertions.assertEquals(1640359024, model.successThreshold()); - Assertions.assertEquals("bzbomvzzbtdcqvpn", model.tcpSocket().host()); - Assertions.assertEquals(1622829877, model.tcpSocket().port()); - Assertions.assertEquals(2588743107415946739L, model.terminationGracePeriodSeconds()); - Assertions.assertEquals(277819924, model.timeoutSeconds()); - Assertions.assertEquals(Type.STARTUP, model.type()); - } -} 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 3bbb3e8099b1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteWithResponseMockTests.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.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("d", "kkyihzt", "eq", com.azure.core.util.Context.NONE); - - } -} 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 1801b268202b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteMockTests.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.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("o", "sxxh", 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 75ea345b4e86..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorWithResponseMockTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.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\":\"xxgfbbmtlpqagyn\",\"name\":\"prnzc\",\"description\":\"incryqxzx\",\"author\":\"zi\",\"category\":\"qimiymqr\",\"supportTopicList\":[{\"id\":\"hfupetasvvoqsbpk\",\"pesId\":\"anfkgxsyaowuzow\"},{\"id\":\"ohdkcprgukx\",\"pesId\":\"tiochlutixmqr\"}],\"analysisTypes\":[\"izcbfzmcrunfhiuc\",\"mfbcpaqktkrum\",\"u\",\"dkyzbfvxov\"],\"type\":\"xiuxqggvqrnhy\",\"score\":87.82275},\"dataset\":[{\"table\":{\"tableName\":\"ggjh\",\"columns\":[{},{},{}],\"rows\":[\"dataqrkijpeuq\",\"datasdxeqztvxwmwwmjs\",\"dataen\",\"datawwa\"]},\"renderingProperties\":{\"type\":308965260,\"title\":\"qioulndhzyoeojht\",\"description\":\"lhsvidmytzlnglxp\",\"isVisible\":true}}],\"status\":{\"message\":\"anfbc\",\"statusId\":536650888},\"dataProviderMetadata\":{\"providerName\":\"ywv\",\"propertyBag\":[{\"name\":\"vjrktpgaeukyawoh\",\"value\":\"w\"},{\"name\":\"nucsk\",\"value\":\"sidsjtd\"}]}},\"id\":\"bninjgazlsvbzfc\",\"name\":\"uoeedwjcci\",\"type\":\"lhsyekrdrenxolr\"}"; - - 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("kkld", "rcwfcmfcnrjajq", "atxjtiel", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("izcbfzmcrunfhiuc", response.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("ggjh", response.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(308965260, response.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("qioulndhzyoeojht", - response.properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("lhsvidmytzlnglxp", - response.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, response.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("anfbc", response.properties().status().message()); - Assertions.assertEquals(536650888, response.properties().status().statusId()); - Assertions.assertEquals("ywv", response.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("vjrktpgaeukyawoh", - response.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("w", response.properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.java deleted file mode 100644 index fc0c158dadd8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.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.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\":\"zarhzvqnsqktcmbj\",\"name\":\"zoslpkybtgl\",\"description\":\"zp\",\"author\":\"jsqjcemqbm\",\"category\":\"vqar\",\"supportTopicList\":[{\"id\":\"qreblui\",\"pesId\":\"bwxsfgtdm\"},{\"id\":\"xekr\",\"pesId\":\"k\"}],\"analysisTypes\":[\"ud\",\"twaokb\"],\"type\":\"lyttaaknwfr\",\"score\":69.09618},\"dataset\":[{\"table\":{\"tableName\":\"dujdigatoleksc\",\"columns\":[{},{},{}],\"rows\":[\"datanqimwbzxpdcldp\",\"dataawnsnlaimou\",\"dataw\",\"datasqmu\"]},\"renderingProperties\":{\"type\":2118230542,\"title\":\"ibicz\",\"description\":\"swswjrkbq\",\"isVisible\":true}},{\"table\":{\"tableName\":\"qqvyfscyrfw\",\"columns\":[{},{}],\"rows\":[\"dataogfuyzwvbhlim\",\"datayqe\",\"datar\"]},\"renderingProperties\":{\"type\":1779759130,\"title\":\"kcdrdaasaxxobsm\",\"description\":\"wiyjvzuko\",\"isVisible\":false}}],\"status\":{\"message\":\"nvzmlnkoywsx\",\"statusId\":1909708055},\"dataProviderMetadata\":{\"providerName\":\"qqax\",\"propertyBag\":[{\"name\":\"mc\",\"value\":\"dndoabhjxw\"}]}},\"id\":\"weuipmpvksmi\",\"name\":\"nsqxtltc\",\"type\":\"krdpqgfhyrfr\"}]}"; - - 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("gmihzpimcqr", - "nxtminklog", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("ud", response.iterator().next().properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("dujdigatoleksc", - response.iterator().next().properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(2118230542, - response.iterator().next().properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("ibicz", - response.iterator().next().properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("swswjrkbq", - response.iterator().next().properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, - response.iterator().next().properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("nvzmlnkoywsx", response.iterator().next().properties().status().message()); - Assertions.assertEquals(1909708055, response.iterator().next().properties().status().statusId()); - Assertions.assertEquals("qqax", response.iterator().next().properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("mc", - response.iterator().next().properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("dndoabhjxw", - response.iterator().next().properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaWithResponseMockTests.java deleted file mode 100644 index a6042c4543bc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaWithResponseMockTests.java +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights 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.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 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-11-27T21:15:44Z\",\"runningState\":\"NotRunning\",\"runningStateDetails\":\"epdjxqeskoyn\",\"containers\":[{\"name\":\"pckaewse\",\"containerId\":\"eskwxeg\",\"ready\":false,\"started\":false,\"restartCount\":665890978,\"runningState\":\"Terminated\",\"runningStateDetails\":\"tmjtsghp\",\"logStreamEndpoint\":\"bcpzarpzeqacdldt\",\"execEndpoint\":\"pypefcpczshnuq\"},{\"name\":\"aizu\",\"containerId\":\"kh\",\"ready\":false,\"started\":true,\"restartCount\":1048467054,\"runningState\":\"Running\",\"runningStateDetails\":\"vtvegwqiukvzw\",\"logStreamEndpoint\":\"wtthaokgksk\",\"execEndpoint\":\"vb\"},{\"name\":\"hajqfuk\",\"containerId\":\"expgeumilhwu\",\"ready\":false,\"started\":true,\"restartCount\":1014412406,\"runningState\":\"Terminated\",\"runningStateDetails\":\"ofninbdbz\",\"logStreamEndpoint\":\"cw\",\"execEndpoint\":\"rsmpcbbprtuga\"}],\"initContainers\":[{\"name\":\"cyksivmfo\",\"containerId\":\"rt\",\"ready\":true,\"started\":true,\"restartCount\":1811675094,\"runningState\":\"Running\",\"runningStateDetails\":\"cwjjxsgmbawvif\",\"logStreamEndpoint\":\"kecifhocjxwklo\",\"execEndpoint\":\"rvtxvcmufunlc\"},{\"name\":\"xvi\",\"containerId\":\"eyngjg\",\"ready\":false,\"started\":false,\"restartCount\":563018487,\"runningState\":\"Running\",\"runningStateDetails\":\"pmcrdcuelj\",\"logStreamEndpoint\":\"ahxm\",\"execEndpoint\":\"ryarvsxzqb\"}]},\"id\":\"cjkay\",\"name\":\"pth\",\"type\":\"odubtlmjt\"}"; - - 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("cvumepjpbi", "nzpphepife", - "leqirccjclykcgxv", "pjlvczuoda", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("pckaewse", response.containers().get(0).name()); - Assertions.assertEquals("eskwxeg", response.containers().get(0).containerId()); - Assertions.assertEquals(false, response.containers().get(0).ready()); - Assertions.assertEquals(false, response.containers().get(0).started()); - Assertions.assertEquals(665890978, response.containers().get(0).restartCount()); - Assertions.assertEquals("cyksivmfo", response.initContainers().get(0).name()); - Assertions.assertEquals("rt", response.initContainers().get(0).containerId()); - Assertions.assertEquals(true, response.initContainers().get(0).ready()); - Assertions.assertEquals(true, response.initContainers().get(0).started()); - Assertions.assertEquals(1811675094, response.initContainers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasWithResponseMockTests.java deleted file mode 100644 index 28d4a830b230..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasWithResponseMockTests.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.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\":[{\"properties\":{\"createdTime\":\"2021-01-16T05:14:58Z\",\"runningState\":\"Running\",\"runningStateDetails\":\"vjnzdpvocojhpcna\",\"containers\":[{}],\"initContainers\":[{},{},{},{}]},\"id\":\"ggytexvzilmhivz\",\"name\":\"wwwncknr\",\"type\":\"dajlskzpt\"},{\"properties\":{\"createdTime\":\"2021-09-18T03:15:46Z\",\"runningState\":\"NotRunning\",\"runningStateDetails\":\"cyrthxqlehm\",\"containers\":[{}],\"initContainers\":[{},{},{}]},\"id\":\"n\",\"name\":\"ehokamvfej\",\"type\":\"qnttmbq\"},{\"properties\":{\"createdTime\":\"2021-02-03T14:51:39Z\",\"runningState\":\"Unknown\",\"runningStateDetails\":\"okpysthhzagj\",\"containers\":[{},{},{}],\"initContainers\":[{},{},{}]},\"id\":\"hgenuzejgvkveb\",\"name\":\"qszllrz\",\"type\":\"smmd\"}]}"; - - 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("blioskkfmkmf", "jxyxgb", "kqvjcteoedlr", 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 382a79bd1379..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionWithResponseMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.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("htkbtnq", "rngl", "mbiipsnawwlqk", - 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 9ac9853466e6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionWithResponseMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.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("nxhhl", "xricctkwmuqq", "ajxeiygle", - 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 623f6e937a24..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionWithResponseMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.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("rwvaexhdc", "rceqnkbrupob", "hdmljz", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java deleted file mode 100644 index be01b831fcb9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.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("lpfliwoyn", "uuzhw", "ladpcmhjha", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryTests.java deleted file mode 100644 index 04215d89f660..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryTests.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.ContainerRegistry; -import org.junit.jupiter.api.Assertions; - -public final class ContainerRegistryTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerRegistry model - = BinaryData.fromString("{\"containerRegistryServer\":\"x\",\"identityResourceId\":\"it\"}") - .toObject(ContainerRegistry.class); - Assertions.assertEquals("x", model.containerRegistryServer()); - Assertions.assertEquals("it", model.identityResourceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerRegistry model = new ContainerRegistry().withContainerRegistryServer("x").withIdentityResourceId("it"); - model = BinaryData.fromObject(model).toObject(ContainerRegistry.class); - Assertions.assertEquals("x", model.containerRegistryServer()); - Assertions.assertEquals("it", model.identityResourceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryWithCustomImageTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryWithCustomImageTests.java deleted file mode 100644 index afff40faacf6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerRegistryWithCustomImageTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; -import org.junit.jupiter.api.Assertions; - -public final class ContainerRegistryWithCustomImageTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerRegistryWithCustomImage model - = BinaryData.fromString("{\"server\":\"bpodxunkbebxm\",\"image\":\"yyntwl\"}") - .toObject(ContainerRegistryWithCustomImage.class); - Assertions.assertEquals("bpodxunkbebxm", model.server()); - Assertions.assertEquals("yyntwl", model.image()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerRegistryWithCustomImage model - = new ContainerRegistryWithCustomImage().withServer("bpodxunkbebxm").withImage("yyntwl"); - model = BinaryData.fromObject(model).toObject(ContainerRegistryWithCustomImage.class); - Assertions.assertEquals("bpodxunkbebxm", model.server()); - Assertions.assertEquals("yyntwl", model.image()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.java deleted file mode 100644 index 650b5f062a0a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import org.junit.jupiter.api.Assertions; - -public final class ContainerResourcesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerResources model = BinaryData - .fromString("{\"cpu\":95.55475275329178,\"memory\":\"hcexdrrvqa\",\"ephemeralStorage\":\"kghtpwijnh\"}") - .toObject(ContainerResources.class); - Assertions.assertEquals(95.55475275329178D, model.cpu()); - Assertions.assertEquals("hcexdrrvqa", model.memory()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerResources model = new ContainerResources().withCpu(95.55475275329178D).withMemory("hcexdrrvqa"); - model = BinaryData.fromObject(model).toObject(ContainerResources.class); - Assertions.assertEquals(95.55475275329178D, model.cpu()); - Assertions.assertEquals("hcexdrrvqa", 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 84c98c134e83..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CookieExpirationTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CookieExpiration; -import com.azure.resourcemanager.appcontainers.models.CookieExpirationConvention; -import org.junit.jupiter.api.Assertions; - -public final class CookieExpirationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CookieExpiration model - = BinaryData.fromString("{\"convention\":\"IdentityProviderDerived\",\"timeToExpiration\":\"dlwtgrhpdj\"}") - .toObject(CookieExpiration.class); - Assertions.assertEquals(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED, model.convention()); - Assertions.assertEquals("dlwtgrhpdj", model.timeToExpiration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CookieExpiration model = new CookieExpiration() - .withConvention(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED).withTimeToExpiration("dlwtgrhpdj"); - model = BinaryData.fromObject(model).toObject(CookieExpiration.class); - Assertions.assertEquals(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED, model.convention()); - Assertions.assertEquals("dlwtgrhpdj", 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 df779637ad7d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.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\":\"owqkdwytisi\",\"bindingType\":\"Disabled\",\"certificateId\":\"gpikpzimejza\"}") - .toObject(CustomDomain.class); - Assertions.assertEquals("owqkdwytisi", model.name()); - Assertions.assertEquals(BindingType.DISABLED, model.bindingType()); - Assertions.assertEquals("gpikpzimejza", model.certificateId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomDomain model = new CustomDomain().withName("owqkdwytisi").withBindingType(BindingType.DISABLED) - .withCertificateId("gpikpzimejza"); - model = BinaryData.fromObject(model).toObject(CustomDomain.class); - Assertions.assertEquals("owqkdwytisi", model.name()); - Assertions.assertEquals(BindingType.DISABLED, model.bindingType()); - Assertions.assertEquals("gpikpzimejza", model.certificateId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCollectionTests.java deleted file mode 100644 index 30423923b704..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCollectionTests.java +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPoliciesCollection; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPoliciesCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPoliciesCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1701983547,\"retryBackOff\":{}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1998431294},\"circuitBreakerPolicy\":{\"consecutiveErrors\":672713653,\"timeoutInSeconds\":1300202975,\"intervalInSeconds\":64736512}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":499319607,\"retryBackOff\":{}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":972204015},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1265182150,\"timeoutInSeconds\":112594464,\"intervalInSeconds\":9633412}}},\"id\":\"kkhminqcymczngn\",\"name\":\"dxxewuninv\",\"type\":\"db\"},{\"properties\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":709462942,\"retryBackOff\":{}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1900039321},\"circuitBreakerPolicy\":{\"consecutiveErrors\":313351461,\"timeoutInSeconds\":720636191,\"intervalInSeconds\":1857605955}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":217232947,\"retryBackOff\":{}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":485950763},\"circuitBreakerPolicy\":{\"consecutiveErrors\":334709748,\"timeoutInSeconds\":297911426,\"intervalInSeconds\":1148214254}}},\"id\":\"napxbannovv\",\"name\":\"xc\",\"type\":\"ytprwnwvroev\"},{\"properties\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1307302388,\"retryBackOff\":{}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":67510907},\"circuitBreakerPolicy\":{\"consecutiveErrors\":491107905,\"timeoutInSeconds\":725083050,\"intervalInSeconds\":1312539760}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":810647712,\"retryBackOff\":{}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1031456845},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1458275962,\"timeoutInSeconds\":952405971,\"intervalInSeconds\":1220621790}}},\"id\":\"d\",\"name\":\"nazpmk\",\"type\":\"lmv\"},{\"properties\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":343155487,\"retryBackOff\":{}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1939182119},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1553253878,\"timeoutInSeconds\":1749137224,\"intervalInSeconds\":1704256415}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":632448787,\"retryBackOff\":{}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1848154538},\"circuitBreakerPolicy\":{\"consecutiveErrors\":530417864,\"timeoutInSeconds\":540353819,\"intervalInSeconds\":796010051}}},\"id\":\"zqcyknap\",\"name\":\"ofyuicd\",\"type\":\"zb\"}],\"nextLink\":\"bwwg\"}") - .toObject(DaprComponentResiliencyPoliciesCollection.class); - Assertions.assertEquals(1701983547, model.value().get(0).inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1998431294, - model.value().get(0).inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(672713653, - model.value().get(0).inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1300202975, - model.value().get(0).inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(64736512, - model.value().get(0).inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(499319607, model.value().get(0).outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(972204015, - model.value().get(0).outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1265182150, - model.value().get(0).outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(112594464, - model.value().get(0).outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(9633412, - model.value().get(0).outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPoliciesCollection model - = new DaprComponentResiliencyPoliciesCollection().withValue(Arrays.asList( - new DaprComponentResiliencyPolicyInner() - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(1701983547) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration())) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1998431294)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(672713653).withTimeoutInSeconds(1300202975) - .withIntervalInSeconds(64736512))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(499319607) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration())) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(972204015)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(1265182150).withTimeoutInSeconds(112594464) - .withIntervalInSeconds(9633412))), - new DaprComponentResiliencyPolicyInner() - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(709462942) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration())) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1900039321)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(313351461).withTimeoutInSeconds(720636191) - .withIntervalInSeconds(1857605955))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(217232947) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration())) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(485950763)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(334709748).withTimeoutInSeconds(297911426) - .withIntervalInSeconds(1148214254))), - new DaprComponentResiliencyPolicyInner() - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(1307302388) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration())) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(67510907)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(491107905).withTimeoutInSeconds(725083050) - .withIntervalInSeconds(1312539760))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(810647712) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration())) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1031456845)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(1458275962).withTimeoutInSeconds(952405971) - .withIntervalInSeconds(1220621790))), - new DaprComponentResiliencyPolicyInner() - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(343155487) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration())) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1939182119)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(1553253878).withTimeoutInSeconds(1749137224) - .withIntervalInSeconds(1704256415))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(632448787) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration())) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1848154538)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(530417864).withTimeoutInSeconds(540353819) - .withIntervalInSeconds(796010051))))); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPoliciesCollection.class); - Assertions.assertEquals(1701983547, model.value().get(0).inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1998431294, - model.value().get(0).inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(672713653, - model.value().get(0).inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1300202975, - model.value().get(0).inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(64736512, - model.value().get(0).inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(499319607, model.value().get(0).outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(972204015, - model.value().get(0).outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1265182150, - model.value().get(0).outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(112594464, - model.value().get(0).outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(9633412, - model.value().get(0).outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 4fefee0af707..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights 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.DaprComponentResiliencyPolicy; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; -import java.nio.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 DaprComponentResiliencyPoliciesCreateOrUpdateWithResponseMockTests { - @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\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":2061685284,\"retryBackOff\":{\"initialDelayInMilliseconds\":76340315,\"maxIntervalInMilliseconds\":1313860717}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1186020907},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1701022036,\"timeoutInSeconds\":2062030350,\"intervalInSeconds\":700693046}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":562282561,\"retryBackOff\":{\"initialDelayInMilliseconds\":644167930,\"maxIntervalInMilliseconds\":1581599883}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":285262475},\"circuitBreakerPolicy\":{\"consecutiveErrors\":620670470,\"timeoutInSeconds\":1906572737,\"intervalInSeconds\":445835887}}},\"id\":\"jod\",\"name\":\"cbjqqwmtqsm\",\"type\":\"xsazuxejgw\"}"; - - 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)); - - DaprComponentResiliencyPolicy response = manager.daprComponentResiliencyPolicies().define("vctkbbx") - .withExistingDaprComponent("wetjtdrhutf", "oadtxopgehpadkmd", "gssz") - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(989359747) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(1895023582).withMaxIntervalInMilliseconds(1275197408))) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1486832256)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(18849329).withTimeoutInSeconds(946198346).withIntervalInSeconds(758730321))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(380797824) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(187800600).withMaxIntervalInMilliseconds(1759604216))) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1843031385)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(221407560).withTimeoutInSeconds(2145155757).withIntervalInSeconds(20348867))) - .create(); - - Assertions.assertEquals(2061685284, response.inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(76340315, - response.inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1313860717, - response.inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1186020907, response.inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1701022036, response.inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(2062030350, response.inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(700693046, response.inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(562282561, response.outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(644167930, - response.outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1581599883, - response.outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(285262475, response.outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(620670470, response.outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1906572737, response.outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(445835887, response.outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteWithResponseMockTests.java deleted file mode 100644 index ac65275659d9..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.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 DaprComponentResiliencyPoliciesDeleteWithResponseMockTests { - @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.daprComponentResiliencyPolicies().deleteWithResponse("itbfjtdy", "tnp", "facqo", "cqrq", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetWithResponseMockTests.java deleted file mode 100644 index 16792a762d38..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetWithResponseMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicy; -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 DaprComponentResiliencyPoliciesGetWithResponseMockTests { - @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\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":2069524060,\"retryBackOff\":{\"initialDelayInMilliseconds\":104080595,\"maxIntervalInMilliseconds\":336537069}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":52257926},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1868056089,\"timeoutInSeconds\":702156768,\"intervalInSeconds\":1966996701}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1592793613,\"retryBackOff\":{\"initialDelayInMilliseconds\":964008937,\"maxIntervalInMilliseconds\":1025699882}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":190570552},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1736402043,\"timeoutInSeconds\":1964383171,\"intervalInSeconds\":822001690}}},\"id\":\"proqk\",\"name\":\"mfxm\",\"type\":\"vprstv\"}"; - - 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)); - - DaprComponentResiliencyPolicy response - = manager.daprComponentResiliencyPolicies().getWithResponse("ajpxecxqnwhscoza", "mvgxsmpknpwir", "ljfewxqo", - "oxudnmckap", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals(2069524060, response.inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(104080595, - response.inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(336537069, - response.inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(52257926, response.inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1868056089, response.inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(702156768, response.inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1966996701, response.inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(1592793613, response.outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(964008937, - response.outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1025699882, - response.outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(190570552, response.outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1736402043, response.outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1964383171, response.outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(822001690, response.outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListMockTests.java deleted file mode 100644 index 762bc4efbb24..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListMockTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.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.DaprComponentResiliencyPolicy; -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 DaprComponentResiliencyPoliciesListMockTests { - @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\":[{\"properties\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":741089432,\"retryBackOff\":{\"initialDelayInMilliseconds\":1379724649,\"maxIntervalInMilliseconds\":433842501}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":2087912773},\"circuitBreakerPolicy\":{\"consecutiveErrors\":206815663,\"timeoutInSeconds\":495264872,\"intervalInSeconds\":910596652}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":529500532,\"retryBackOff\":{\"initialDelayInMilliseconds\":330883602,\"maxIntervalInMilliseconds\":1649946980}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":2137785308},\"circuitBreakerPolicy\":{\"consecutiveErrors\":550103154,\"timeoutInSeconds\":1960286905,\"intervalInSeconds\":781281199}}},\"id\":\"naoaqymhccto\",\"name\":\"uowyrnskbyhqu\",\"type\":\"czygxv\"}]}"; - - 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.daprComponentResiliencyPolicies() - .list("qdnzyza", "atuwqkokbc", "othymgobl", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(741089432, response.iterator().next().inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1379724649, - response.iterator().next().inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(433842501, - response.iterator().next().inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(2087912773, - response.iterator().next().inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(206815663, - response.iterator().next().inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(495264872, - response.iterator().next().inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(910596652, - response.iterator().next().inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(529500532, response.iterator().next().outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(330883602, - response.iterator().next().outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1649946980, - response.iterator().next().outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(2137785308, - response.iterator().next().outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(550103154, - response.iterator().next().outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1960286905, - response.iterator().next().outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(781281199, - response.iterator().next().outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfigurationTests.java deleted file mode 100644 index 86047c5217ae..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfigurationTests.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.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyCircuitBreakerPolicyConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration model = BinaryData - .fromString( - "{\"consecutiveErrors\":1053497499,\"timeoutInSeconds\":729007822,\"intervalInSeconds\":367318900}") - .toObject(DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.class); - Assertions.assertEquals(1053497499, model.consecutiveErrors()); - Assertions.assertEquals(729007822, model.timeoutInSeconds()); - Assertions.assertEquals(367318900, model.intervalInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration model - = new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration().withConsecutiveErrors(1053497499) - .withTimeoutInSeconds(729007822).withIntervalInSeconds(367318900); - model = BinaryData.fromObject(model) - .toObject(DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.class); - Assertions.assertEquals(1053497499, model.consecutiveErrors()); - Assertions.assertEquals(729007822, model.timeoutInSeconds()); - Assertions.assertEquals(367318900, model.intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyConfigurationTests.java deleted file mode 100644 index 6e0eae0eb525..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyConfigurationTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyConfiguration model = BinaryData.fromString( - "{\"httpRetryPolicy\":{\"maxRetries\":36314711,\"retryBackOff\":{\"initialDelayInMilliseconds\":715935859,\"maxIntervalInMilliseconds\":2047901283}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1840957180},\"circuitBreakerPolicy\":{\"consecutiveErrors\":304822445,\"timeoutInSeconds\":1524765987,\"intervalInSeconds\":1267462998}}") - .toObject(DaprComponentResiliencyPolicyConfiguration.class); - Assertions.assertEquals(36314711, model.httpRetryPolicy().maxRetries()); - Assertions.assertEquals(715935859, model.httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(2047901283, model.httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1840957180, model.timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(304822445, model.circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1524765987, model.circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1267462998, model.circuitBreakerPolicy().intervalInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyConfiguration model = new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(36314711) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(715935859).withMaxIntervalInMilliseconds(2047901283))) - .withTimeoutPolicy( - new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(1840957180)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(304822445).withTimeoutInSeconds(1524765987).withIntervalInSeconds(1267462998)); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPolicyConfiguration.class); - Assertions.assertEquals(36314711, model.httpRetryPolicy().maxRetries()); - Assertions.assertEquals(715935859, model.httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(2047901283, model.httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1840957180, model.timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(304822445, model.circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1524765987, model.circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1267462998, model.circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryBackOffConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryBackOffConfigurationTests.java deleted file mode 100644 index 8febc17720aa..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryBackOffConfigurationTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyHttpRetryBackOffConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration model = BinaryData - .fromString("{\"initialDelayInMilliseconds\":1297889112,\"maxIntervalInMilliseconds\":1150159087}") - .toObject(DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.class); - Assertions.assertEquals(1297889112, model.initialDelayInMilliseconds()); - Assertions.assertEquals(1150159087, model.maxIntervalInMilliseconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration model - = new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(1297889112).withMaxIntervalInMilliseconds(1150159087); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.class); - Assertions.assertEquals(1297889112, model.initialDelayInMilliseconds()); - Assertions.assertEquals(1150159087, model.maxIntervalInMilliseconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryPolicyConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryPolicyConfigurationTests.java deleted file mode 100644 index 0c2cdc232246..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyHttpRetryPolicyConfigurationTests.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.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyHttpRetryPolicyConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration model = BinaryData.fromString( - "{\"maxRetries\":1923932304,\"retryBackOff\":{\"initialDelayInMilliseconds\":366697291,\"maxIntervalInMilliseconds\":1294543038}}") - .toObject(DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.class); - Assertions.assertEquals(1923932304, model.maxRetries()); - Assertions.assertEquals(366697291, model.retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1294543038, model.retryBackOff().maxIntervalInMilliseconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration model - = new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(1923932304) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(366697291).withMaxIntervalInMilliseconds(1294543038)); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.class); - Assertions.assertEquals(1923932304, model.maxRetries()); - Assertions.assertEquals(366697291, model.retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1294543038, model.retryBackOff().maxIntervalInMilliseconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyInnerTests.java deleted file mode 100644 index 5a1d972a017f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyInnerTests.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.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyInner model = BinaryData.fromString( - "{\"properties\":{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1801029414,\"retryBackOff\":{\"initialDelayInMilliseconds\":728731016,\"maxIntervalInMilliseconds\":1056355405}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":2137652282},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1436158527,\"timeoutInSeconds\":1159295504,\"intervalInSeconds\":881600617}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":2065822308,\"retryBackOff\":{\"initialDelayInMilliseconds\":643996998,\"maxIntervalInMilliseconds\":1253377600}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":798651388},\"circuitBreakerPolicy\":{\"consecutiveErrors\":1601507048,\"timeoutInSeconds\":64161749,\"intervalInSeconds\":919572814}}},\"id\":\"immoiroqboshbrag\",\"name\":\"pyyrmfs\",\"type\":\"bpav\"}") - .toObject(DaprComponentResiliencyPolicyInner.class); - Assertions.assertEquals(1801029414, model.inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(728731016, - model.inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1056355405, - model.inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(2137652282, model.inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1436158527, model.inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1159295504, model.inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(881600617, model.inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(2065822308, model.outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(643996998, - model.outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1253377600, - model.outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(798651388, model.outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1601507048, model.outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(64161749, model.outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(919572814, model.outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyInner model = new DaprComponentResiliencyPolicyInner() - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(1801029414) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(728731016).withMaxIntervalInMilliseconds(1056355405))) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(2137652282)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(1436158527).withTimeoutInSeconds(1159295504) - .withIntervalInSeconds(881600617))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(2065822308) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(643996998).withMaxIntervalInMilliseconds(1253377600))) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(798651388)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(1601507048).withTimeoutInSeconds(64161749) - .withIntervalInSeconds(919572814))); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPolicyInner.class); - Assertions.assertEquals(1801029414, model.inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(728731016, - model.inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1056355405, - model.inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(2137652282, model.inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1436158527, model.inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1159295504, model.inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(881600617, model.inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(2065822308, model.outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(643996998, - model.outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1253377600, - model.outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(798651388, model.outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(1601507048, model.outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(64161749, model.outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(919572814, model.outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyPropertiesTests.java deleted file mode 100644 index e6b3dbf066a8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyPropertiesTests.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.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyProperties; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyProperties model = BinaryData.fromString( - "{\"inboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1818158355,\"retryBackOff\":{\"initialDelayInMilliseconds\":1487017150,\"maxIntervalInMilliseconds\":267572624}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1237918766},\"circuitBreakerPolicy\":{\"consecutiveErrors\":745209495,\"timeoutInSeconds\":353739432,\"intervalInSeconds\":1569477780}},\"outboundPolicy\":{\"httpRetryPolicy\":{\"maxRetries\":1931546764,\"retryBackOff\":{\"initialDelayInMilliseconds\":1973714604,\"maxIntervalInMilliseconds\":1422758538}},\"timeoutPolicy\":{\"responseTimeoutInSeconds\":1903849017},\"circuitBreakerPolicy\":{\"consecutiveErrors\":344097144,\"timeoutInSeconds\":1836074224,\"intervalInSeconds\":913638656}}}") - .toObject(DaprComponentResiliencyPolicyProperties.class); - Assertions.assertEquals(1818158355, model.inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1487017150, - model.inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(267572624, - model.inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1237918766, model.inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(745209495, model.inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(353739432, model.inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1569477780, model.inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(1931546764, model.outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1973714604, - model.outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1422758538, - model.outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1903849017, model.outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(344097144, model.outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1836074224, model.outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(913638656, model.outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyProperties model = new DaprComponentResiliencyPolicyProperties() - .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(1818158355) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(1487017150).withMaxIntervalInMilliseconds(267572624))) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1237918766)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(745209495).withTimeoutInSeconds(353739432) - .withIntervalInSeconds(1569477780))) - .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() - .withHttpRetryPolicy( - new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(1931546764) - .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() - .withInitialDelayInMilliseconds(1973714604).withMaxIntervalInMilliseconds(1422758538))) - .withTimeoutPolicy(new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() - .withResponseTimeoutInSeconds(1903849017)) - .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() - .withConsecutiveErrors(344097144).withTimeoutInSeconds(1836074224) - .withIntervalInSeconds(913638656))); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPolicyProperties.class); - Assertions.assertEquals(1818158355, model.inboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1487017150, - model.inboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(267572624, - model.inboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1237918766, model.inboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(745209495, model.inboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(353739432, model.inboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(1569477780, model.inboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - Assertions.assertEquals(1931546764, model.outboundPolicy().httpRetryPolicy().maxRetries()); - Assertions.assertEquals(1973714604, - model.outboundPolicy().httpRetryPolicy().retryBackOff().initialDelayInMilliseconds()); - Assertions.assertEquals(1422758538, - model.outboundPolicy().httpRetryPolicy().retryBackOff().maxIntervalInMilliseconds()); - Assertions.assertEquals(1903849017, model.outboundPolicy().timeoutPolicy().responseTimeoutInSeconds()); - Assertions.assertEquals(344097144, model.outboundPolicy().circuitBreakerPolicy().consecutiveErrors()); - Assertions.assertEquals(1836074224, model.outboundPolicy().circuitBreakerPolicy().timeoutInSeconds()); - Assertions.assertEquals(913638656, model.outboundPolicy().circuitBreakerPolicy().intervalInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyTimeoutPolicyConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyTimeoutPolicyConfigurationTests.java deleted file mode 100644 index d5c553bd706e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPolicyTimeoutPolicyConfigurationTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentResiliencyPolicyTimeoutPolicyConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentResiliencyPolicyTimeoutPolicyConfiguration model - = BinaryData.fromString("{\"responseTimeoutInSeconds\":417226641}") - .toObject(DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.class); - Assertions.assertEquals(417226641, model.responseTimeoutInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentResiliencyPolicyTimeoutPolicyConfiguration model - = new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(417226641); - model = BinaryData.fromObject(model).toObject(DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.class); - Assertions.assertEquals(417226641, model.responseTimeoutInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentServiceBindingTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentServiceBindingTests.java deleted file mode 100644 index 493189dba9d6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentServiceBindingTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; -import com.azure.resourcemanager.appcontainers.models.DaprServiceBindMetadata; -import org.junit.jupiter.api.Assertions; - -public final class DaprComponentServiceBindingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprComponentServiceBinding model = BinaryData.fromString( - "{\"name\":\"owpulpq\",\"serviceId\":\"ylsyxkqjnsje\",\"metadata\":{\"name\":\"iagxsdszuempsbz\",\"value\":\"z\"}}") - .toObject(DaprComponentServiceBinding.class); - Assertions.assertEquals("owpulpq", model.name()); - Assertions.assertEquals("ylsyxkqjnsje", model.serviceId()); - Assertions.assertEquals("iagxsdszuempsbz", model.metadata().name()); - Assertions.assertEquals("z", model.metadata().value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprComponentServiceBinding model - = new DaprComponentServiceBinding().withName("owpulpq").withServiceId("ylsyxkqjnsje") - .withMetadata(new DaprServiceBindMetadata().withName("iagxsdszuempsbz").withValue("z")); - model = BinaryData.fromObject(model).toObject(DaprComponentServiceBinding.class); - Assertions.assertEquals("owpulpq", model.name()); - Assertions.assertEquals("ylsyxkqjnsje", model.serviceId()); - Assertions.assertEquals("iagxsdszuempsbz", model.metadata().name()); - Assertions.assertEquals("z", model.metadata().value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteWithResponseMockTests.java deleted file mode 100644 index 1e715b47922f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.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("abalfdxaglz", "ytlbtlqhopxouvm", "siflikyypzkgxf", - 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 61dcbf5a6ff1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsWithResponseMockTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.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\":\"h\",\"value\":\"pter\"}]}"; - - 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("fmy", "qsdb", "oksz", 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 342b528c00a3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprConfigurationTests.java +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprConfiguration; - -public final class DaprConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprConfiguration model = BinaryData.fromString("{\"version\":\"jed\"}").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 2b872446772d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprSecret; - -public final class DaprSecretTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSecret model - = BinaryData.fromString("{\"name\":\"bqwcsdbnwdcf\",\"value\":\"cqdpfuv\"}").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 c4dcd23aa143..000000000000 --- 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\":\"lw\",\"value\":\"ztzp\"},{\"name\":\"ncckw\",\"value\":\"zqwhxxbuyqaxzfeq\"},{\"name\":\"ppriol\",\"value\":\"rjaltolmncw\"}]}") - .toObject(DaprSecretsCollectionInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSecretsCollectionInner model = new DaprSecretsCollectionInner() - .withValue(Arrays.asList(new DaprSecret(), new DaprSecret(), new DaprSecret())); - model = BinaryData.fromObject(model).toObject(DaprSecretsCollectionInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprServiceBindMetadataTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprServiceBindMetadataTests.java deleted file mode 100644 index 6a5ef8046091..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprServiceBindMetadataTests.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.DaprServiceBindMetadata; -import org.junit.jupiter.api.Assertions; - -public final class DaprServiceBindMetadataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprServiceBindMetadata model = BinaryData.fromString("{\"name\":\"yvpnqicvinvkjj\",\"value\":\"xrbuukzclew\"}") - .toObject(DaprServiceBindMetadata.class); - Assertions.assertEquals("yvpnqicvinvkjj", model.name()); - Assertions.assertEquals("xrbuukzclew", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprServiceBindMetadata model - = new DaprServiceBindMetadata().withName("yvpnqicvinvkjj").withValue("xrbuukzclew"); - model = BinaryData.fromObject(model).toObject(DaprServiceBindMetadata.class); - Assertions.assertEquals("yvpnqicvinvkjj", model.name()); - Assertions.assertEquals("xrbuukzclew", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionBulkSubscribeOptionsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionBulkSubscribeOptionsTests.java deleted file mode 100644 index 9b28d6282e10..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionBulkSubscribeOptionsTests.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.DaprSubscriptionBulkSubscribeOptions; -import org.junit.jupiter.api.Assertions; - -public final class DaprSubscriptionBulkSubscribeOptionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSubscriptionBulkSubscribeOptions model = BinaryData - .fromString("{\"enabled\":false,\"maxMessagesCount\":2076319922,\"maxAwaitDurationMs\":1797276638}") - .toObject(DaprSubscriptionBulkSubscribeOptions.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals(2076319922, model.maxMessagesCount()); - Assertions.assertEquals(1797276638, model.maxAwaitDurationMs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSubscriptionBulkSubscribeOptions model = new DaprSubscriptionBulkSubscribeOptions().withEnabled(false) - .withMaxMessagesCount(2076319922).withMaxAwaitDurationMs(1797276638); - model = BinaryData.fromObject(model).toObject(DaprSubscriptionBulkSubscribeOptions.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals(2076319922, model.maxMessagesCount()); - Assertions.assertEquals(1797276638, model.maxAwaitDurationMs()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionInnerTests.java deleted file mode 100644 index 9fc23bde2ddc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionInnerTests.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.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DaprSubscriptionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSubscriptionInner model = BinaryData.fromString( - "{\"properties\":{\"pubsubName\":\"zvlnsnnjz\",\"topic\":\"afolpymwamxqzrag\",\"deadLetterTopic\":\"dphtv\",\"routes\":{\"rules\":[{\"match\":\"vl\",\"path\":\"c\"}],\"default\":\"srlzknmzlan\"},\"scopes\":[\"dwv\",\"phcnzqtpj\",\"mqrhvthl\"],\"metadata\":{\"hzdtxetlgydlh\":\"dcxsmlz\",\"b\":\"vlnnpx\",\"gjekglklby\":\"fiqgeaar\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":2131258889,\"maxAwaitDurationMs\":1571149104}},\"id\":\"zegjonfhjirwgdn\",\"name\":\"z\",\"type\":\"rfkspzhz\"}") - .toObject(DaprSubscriptionInner.class); - Assertions.assertEquals("zvlnsnnjz", model.pubsubName()); - Assertions.assertEquals("afolpymwamxqzrag", model.topic()); - Assertions.assertEquals("dphtv", model.deadLetterTopic()); - Assertions.assertEquals("vl", model.routes().rules().get(0).match()); - Assertions.assertEquals("c", model.routes().rules().get(0).path()); - Assertions.assertEquals("srlzknmzlan", model.routes().defaultProperty()); - Assertions.assertEquals("dwv", model.scopes().get(0)); - Assertions.assertEquals("dcxsmlz", model.metadata().get("hzdtxetlgydlh")); - Assertions.assertEquals(false, model.bulkSubscribe().enabled()); - Assertions.assertEquals(2131258889, model.bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(1571149104, model.bulkSubscribe().maxAwaitDurationMs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSubscriptionInner model = new DaprSubscriptionInner().withPubsubName("zvlnsnnjz") - .withTopic("afolpymwamxqzrag").withDeadLetterTopic("dphtv") - .withRoutes(new DaprSubscriptionRoutes() - .withRules(Arrays.asList(new DaprSubscriptionRouteRule().withMatch("vl").withPath("c"))) - .withDefaultProperty("srlzknmzlan")) - .withScopes(Arrays.asList("dwv", "phcnzqtpj", "mqrhvthl")) - .withMetadata(mapOf("hzdtxetlgydlh", "dcxsmlz", "b", "vlnnpx", "gjekglklby", "fiqgeaar")) - .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(false) - .withMaxMessagesCount(2131258889).withMaxAwaitDurationMs(1571149104)); - model = BinaryData.fromObject(model).toObject(DaprSubscriptionInner.class); - Assertions.assertEquals("zvlnsnnjz", model.pubsubName()); - Assertions.assertEquals("afolpymwamxqzrag", model.topic()); - Assertions.assertEquals("dphtv", model.deadLetterTopic()); - Assertions.assertEquals("vl", model.routes().rules().get(0).match()); - Assertions.assertEquals("c", model.routes().rules().get(0).path()); - Assertions.assertEquals("srlzknmzlan", model.routes().defaultProperty()); - Assertions.assertEquals("dwv", model.scopes().get(0)); - Assertions.assertEquals("dcxsmlz", model.metadata().get("hzdtxetlgydlh")); - Assertions.assertEquals(false, model.bulkSubscribe().enabled()); - Assertions.assertEquals(2131258889, model.bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(1571149104, model.bulkSubscribe().maxAwaitDurationMs()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionPropertiesTests.java deleted file mode 100644 index b6c8a1b4883e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionPropertiesTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionProperties; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DaprSubscriptionPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSubscriptionProperties model = BinaryData.fromString( - "{\"pubsubName\":\"ksjcitdigs\",\"topic\":\"dglj\",\"deadLetterTopic\":\"keuachtomf\",\"routes\":{\"rules\":[{\"match\":\"wfpfmdgycx\",\"path\":\"skw\"},{\"match\":\"jjyslurlps\",\"path\":\"kvp\"},{\"match\":\"wqslsrhmpqvw\",\"path\":\"kondcb\"},{\"match\":\"imuvqejosovyrrl\",\"path\":\"esi\"}],\"default\":\"qtljqobbpihehc\"},\"scopes\":[\"bmrqbrjbbmp\",\"dlvykfrex\",\"rseqwjksghudgz\"],\"metadata\":{\"u\":\"gjggsv\",\"kmdyomkxfbvfbh\":\"kxibdafh\",\"rhpw\":\"y\",\"o\":\"gddeimaw\"},\"bulkSubscribe\":{\"enabled\":true,\"maxMessagesCount\":1582308433,\"maxAwaitDurationMs\":166613008}}") - .toObject(DaprSubscriptionProperties.class); - Assertions.assertEquals("ksjcitdigs", model.pubsubName()); - Assertions.assertEquals("dglj", model.topic()); - Assertions.assertEquals("keuachtomf", model.deadLetterTopic()); - Assertions.assertEquals("wfpfmdgycx", model.routes().rules().get(0).match()); - Assertions.assertEquals("skw", model.routes().rules().get(0).path()); - Assertions.assertEquals("qtljqobbpihehc", model.routes().defaultProperty()); - Assertions.assertEquals("bmrqbrjbbmp", model.scopes().get(0)); - Assertions.assertEquals("gjggsv", model.metadata().get("u")); - Assertions.assertEquals(true, model.bulkSubscribe().enabled()); - Assertions.assertEquals(1582308433, model.bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(166613008, model.bulkSubscribe().maxAwaitDurationMs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSubscriptionProperties model = new DaprSubscriptionProperties().withPubsubName("ksjcitdigs") - .withTopic("dglj").withDeadLetterTopic("keuachtomf") - .withRoutes(new DaprSubscriptionRoutes() - .withRules(Arrays.asList(new DaprSubscriptionRouteRule().withMatch("wfpfmdgycx").withPath("skw"), - new DaprSubscriptionRouteRule().withMatch("jjyslurlps").withPath("kvp"), - new DaprSubscriptionRouteRule().withMatch("wqslsrhmpqvw").withPath("kondcb"), - new DaprSubscriptionRouteRule().withMatch("imuvqejosovyrrl").withPath("esi"))) - .withDefaultProperty("qtljqobbpihehc")) - .withScopes(Arrays.asList("bmrqbrjbbmp", "dlvykfrex", "rseqwjksghudgz")) - .withMetadata(mapOf("u", "gjggsv", "kmdyomkxfbvfbh", "kxibdafh", "rhpw", "y", "o", "gddeimaw")) - .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(true) - .withMaxMessagesCount(1582308433).withMaxAwaitDurationMs(166613008)); - model = BinaryData.fromObject(model).toObject(DaprSubscriptionProperties.class); - Assertions.assertEquals("ksjcitdigs", model.pubsubName()); - Assertions.assertEquals("dglj", model.topic()); - Assertions.assertEquals("keuachtomf", model.deadLetterTopic()); - Assertions.assertEquals("wfpfmdgycx", model.routes().rules().get(0).match()); - Assertions.assertEquals("skw", model.routes().rules().get(0).path()); - Assertions.assertEquals("qtljqobbpihehc", model.routes().defaultProperty()); - Assertions.assertEquals("bmrqbrjbbmp", model.scopes().get(0)); - Assertions.assertEquals("gjggsv", model.metadata().get("u")); - Assertions.assertEquals(true, model.bulkSubscribe().enabled()); - Assertions.assertEquals(1582308433, model.bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(166613008, model.bulkSubscribe().maxAwaitDurationMs()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRouteRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRouteRuleTests.java deleted file mode 100644 index af04eb16faf5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRouteRuleTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule; -import org.junit.jupiter.api.Assertions; - -public final class DaprSubscriptionRouteRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSubscriptionRouteRule model = BinaryData.fromString("{\"match\":\"n\",\"path\":\"aoyankcoeqswa\"}") - .toObject(DaprSubscriptionRouteRule.class); - Assertions.assertEquals("n", model.match()); - Assertions.assertEquals("aoyankcoeqswa", model.path()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSubscriptionRouteRule model = new DaprSubscriptionRouteRule().withMatch("n").withPath("aoyankcoeqswa"); - model = BinaryData.fromObject(model).toObject(DaprSubscriptionRouteRule.class); - Assertions.assertEquals("n", model.match()); - Assertions.assertEquals("aoyankcoeqswa", model.path()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRoutesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRoutesTests.java deleted file mode 100644 index 3bedba6279c6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionRoutesTests.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.DaprSubscriptionRouteRule; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DaprSubscriptionRoutesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSubscriptionRoutes model = BinaryData.fromString( - "{\"rules\":[{\"match\":\"jcazt\",\"path\":\"snsqowxwcoml\"},{\"match\":\"ytwvczcswkacve\",\"path\":\"fdv\"}],\"default\":\"hbwrnfxtgddpqth\"}") - .toObject(DaprSubscriptionRoutes.class); - Assertions.assertEquals("jcazt", model.rules().get(0).match()); - Assertions.assertEquals("snsqowxwcoml", model.rules().get(0).path()); - Assertions.assertEquals("hbwrnfxtgddpqth", model.defaultProperty()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSubscriptionRoutes model = new DaprSubscriptionRoutes() - .withRules(Arrays.asList(new DaprSubscriptionRouteRule().withMatch("jcazt").withPath("snsqowxwcoml"), - new DaprSubscriptionRouteRule().withMatch("ytwvczcswkacve").withPath("fdv"))) - .withDefaultProperty("hbwrnfxtgddpqth"); - model = BinaryData.fromObject(model).toObject(DaprSubscriptionRoutes.class); - Assertions.assertEquals("jcazt", model.rules().get(0).match()); - Assertions.assertEquals("snsqowxwcoml", model.rules().get(0).path()); - Assertions.assertEquals("hbwrnfxtgddpqth", model.defaultProperty()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCollectionTests.java deleted file mode 100644 index 42ef1ef68013..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCollectionTests.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionsCollection; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class DaprSubscriptionsCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSubscriptionsCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"pubsubName\":\"rmoucsofl\",\"topic\":\"uviyfcaabeo\",\"deadLetterTopic\":\"bh\",\"routes\":{\"rules\":[{}],\"default\":\"uqibsxtkcu\"},\"scopes\":[\"sfar\"],\"metadata\":{\"gf\":\"owlkjxnqpv\"},\"bulkSubscribe\":{\"enabled\":true,\"maxMessagesCount\":889840232,\"maxAwaitDurationMs\":1864942425}},\"id\":\"mdksaoa\",\"name\":\"cluqvo\",\"type\":\"mycjimryvwgcwwp\"},{\"properties\":{\"pubsubName\":\"gwe\",\"topic\":\"dsxwefoh\",\"deadLetterTopic\":\"bvopwndyqle\",\"routes\":{\"rules\":[{},{},{}],\"default\":\"mtkhlowkxxpvbr\"},\"scopes\":[\"mzsyzfhotl\",\"ikcyyc\"],\"metadata\":{\"uic\":\"sjlpjrtwszhv\",\"ubhvj\":\"hvtrrmhwrbfdpyf\",\"memhooclutnpq\":\"lrocuyzlwh\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":339637531,\"maxAwaitDurationMs\":1132519096}},\"id\":\"ykyujxsg\",\"name\":\"hsrrryejylmbkz\",\"type\":\"dnigrfihot\"},{\"properties\":{\"pubsubName\":\"lpxuzzjgnrefq\",\"topic\":\"qotoihiqakydiwfb\",\"deadLetterTopic\":\"wpzdqtvhcspo\",\"routes\":{\"rules\":[{},{},{}],\"default\":\"sipi\"},\"scopes\":[\"bebjfu\",\"bmoichd\"],\"metadata\":{\"iqsowsaaelc\":\"fpubntnbatz\",\"mjvlgfgg\":\"ttcjuhplrvkmjc\",\"sfuztlvtmv\":\"vkyylizrzbjpsf\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":891535208,\"maxAwaitDurationMs\":563395516}},\"id\":\"hukoveofizrv\",\"name\":\"f\",\"type\":\"mjm\"},{\"properties\":{\"pubsubName\":\"yzgib\",\"topic\":\"ujr\",\"deadLetterTopic\":\"fojuidjpuuyj\",\"routes\":{\"rules\":[{},{},{},{}],\"default\":\"kzoeovvtzejetj\"},\"scopes\":[\"tikyj\"],\"metadata\":{\"rhtgvgzpcrrkol\":\"dbqzolxrzvhqjw\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":817860491,\"maxAwaitDurationMs\":660756224}},\"id\":\"okcdxfzzzwyjaf\",\"name\":\"tlhguynuchl\",\"type\":\"mltx\"}],\"nextLink\":\"hmoz\"}") - .toObject(DaprSubscriptionsCollection.class); - Assertions.assertEquals("rmoucsofl", model.value().get(0).pubsubName()); - Assertions.assertEquals("uviyfcaabeo", model.value().get(0).topic()); - Assertions.assertEquals("bh", model.value().get(0).deadLetterTopic()); - Assertions.assertEquals("uqibsxtkcu", model.value().get(0).routes().defaultProperty()); - Assertions.assertEquals("sfar", model.value().get(0).scopes().get(0)); - Assertions.assertEquals("owlkjxnqpv", model.value().get(0).metadata().get("gf")); - Assertions.assertEquals(true, model.value().get(0).bulkSubscribe().enabled()); - Assertions.assertEquals(889840232, model.value().get(0).bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(1864942425, model.value().get(0).bulkSubscribe().maxAwaitDurationMs()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSubscriptionsCollection model - = new DaprSubscriptionsCollection() - .withValue(Arrays.asList( - new DaprSubscriptionInner().withPubsubName("rmoucsofl").withTopic("uviyfcaabeo") - .withDeadLetterTopic("bh") - .withRoutes( - new DaprSubscriptionRoutes().withRules(Arrays.asList(new DaprSubscriptionRouteRule())) - .withDefaultProperty("uqibsxtkcu")) - .withScopes(Arrays.asList("sfar")).withMetadata( - mapOf("gf", "owlkjxnqpv")) - .withBulkSubscribe( - new DaprSubscriptionBulkSubscribeOptions().withEnabled(true).withMaxMessagesCount(889840232) - .withMaxAwaitDurationMs(1864942425)), - new DaprSubscriptionInner().withPubsubName("gwe").withTopic("dsxwefoh") - .withDeadLetterTopic("bvopwndyqle") - .withRoutes( - new DaprSubscriptionRoutes() - .withRules(Arrays.asList(new DaprSubscriptionRouteRule(), - new DaprSubscriptionRouteRule(), new DaprSubscriptionRouteRule())) - .withDefaultProperty("mtkhlowkxxpvbr")) - .withScopes(Arrays.asList("mzsyzfhotl", "ikcyyc")) - .withMetadata( - mapOf("uic", "sjlpjrtwszhv", "ubhvj", "hvtrrmhwrbfdpyf", "memhooclutnpq", "lrocuyzlwh")) - .withBulkSubscribe( - new DaprSubscriptionBulkSubscribeOptions().withEnabled(false).withMaxMessagesCount( - 339637531).withMaxAwaitDurationMs(1132519096)), - new DaprSubscriptionInner().withPubsubName("lpxuzzjgnrefq").withTopic("qotoihiqakydiwfb") - .withDeadLetterTopic("wpzdqtvhcspo") - .withRoutes( - new DaprSubscriptionRoutes() - .withRules(Arrays.asList(new DaprSubscriptionRouteRule(), - new DaprSubscriptionRouteRule(), new DaprSubscriptionRouteRule())) - .withDefaultProperty("sipi")) - .withScopes(Arrays.asList("bebjfu", "bmoichd")) - .withMetadata(mapOf("iqsowsaaelc", "fpubntnbatz", "mjvlgfgg", "ttcjuhplrvkmjc", "sfuztlvtmv", - "vkyylizrzbjpsf")) - .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(false) - .withMaxMessagesCount(891535208).withMaxAwaitDurationMs(563395516)), - new DaprSubscriptionInner().withPubsubName("yzgib").withTopic("ujr") - .withDeadLetterTopic("fojuidjpuuyj") - .withRoutes(new DaprSubscriptionRoutes() - .withRules(Arrays.asList(new DaprSubscriptionRouteRule(), new DaprSubscriptionRouteRule(), - new DaprSubscriptionRouteRule(), new DaprSubscriptionRouteRule())) - .withDefaultProperty("kzoeovvtzejetj")) - .withScopes(Arrays.asList("tikyj")).withMetadata(mapOf("rhtgvgzpcrrkol", "dbqzolxrzvhqjw")) - .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(false) - .withMaxMessagesCount(817860491).withMaxAwaitDurationMs(660756224)))); - model = BinaryData.fromObject(model).toObject(DaprSubscriptionsCollection.class); - Assertions.assertEquals("rmoucsofl", model.value().get(0).pubsubName()); - Assertions.assertEquals("uviyfcaabeo", model.value().get(0).topic()); - Assertions.assertEquals("bh", model.value().get(0).deadLetterTopic()); - Assertions.assertEquals("uqibsxtkcu", model.value().get(0).routes().defaultProperty()); - Assertions.assertEquals("sfar", model.value().get(0).scopes().get(0)); - Assertions.assertEquals("owlkjxnqpv", model.value().get(0).metadata().get("gf")); - Assertions.assertEquals(true, model.value().get(0).bulkSubscribe().enabled()); - Assertions.assertEquals(889840232, model.value().get(0).bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(1864942425, model.value().get(0).bulkSubscribe().maxAwaitDurationMs()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateWithResponseMockTests.java deleted file mode 100644 index 6c1b443c66f2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateWithResponseMockTests.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights 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.DaprSubscription; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule; -import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; -import java.nio.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 DaprSubscriptionsCreateOrUpdateWithResponseMockTests { - @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\":{\"pubsubName\":\"jiotif\",\"topic\":\"bcngkegxc\",\"deadLetterTopic\":\"xbbfetwil\",\"routes\":{\"rules\":[{\"match\":\"pdxqlfrolqownkiu\",\"path\":\"ewnahwkxjjmzt\"},{\"match\":\"mso\",\"path\":\"tmvecdhdyswcrptv\"}],\"default\":\"jczxvlgsrg\"},\"scopes\":[\"izrpywlptyuqhrl\",\"cs\",\"ykpfu\",\"fixcnpcfykkpy\"],\"metadata\":{\"wrpcfpcfjfwzlgza\":\"awmpjprd\",\"amnni\":\"kgyepe\",\"z\":\"mdiawpzx\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":335893529,\"maxAwaitDurationMs\":825702294}},\"id\":\"uos\",\"name\":\"wqpsqaz\",\"type\":\"hqodv\"}"; - - 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)); - - DaprSubscription response - = manager.daprSubscriptions().define("wennin").withExistingManagedEnvironment("xquddrw", "cljbrhlhpvzad") - .withPubsubName("xrzfrmvztiucwvi").withTopic("lukh").withDeadLetterTopic("cqx") - .withRoutes(new DaprSubscriptionRoutes() - .withRules(Arrays.asList(new DaprSubscriptionRouteRule().withMatch("a").withPath("qcbpokstsinv"))) - .withDefaultProperty("ovjyhd")) - .withScopes(Arrays.asList("rdvcehqwhit", "nmxgnm")) - .withMetadata(mapOf("kjnbkbdhlltqstq", "buwvorba", "vagzkheuba", "qsygxiynec", "pqcckqiawzlz", "lxu", - "r", "laslgacizux")) - .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(false) - .withMaxMessagesCount(1749126168).withMaxAwaitDurationMs(1501943232)) - .create(); - - Assertions.assertEquals("jiotif", response.pubsubName()); - Assertions.assertEquals("bcngkegxc", response.topic()); - Assertions.assertEquals("xbbfetwil", response.deadLetterTopic()); - Assertions.assertEquals("pdxqlfrolqownkiu", response.routes().rules().get(0).match()); - Assertions.assertEquals("ewnahwkxjjmzt", response.routes().rules().get(0).path()); - Assertions.assertEquals("jczxvlgsrg", response.routes().defaultProperty()); - Assertions.assertEquals("izrpywlptyuqhrl", response.scopes().get(0)); - Assertions.assertEquals("awmpjprd", response.metadata().get("wrpcfpcfjfwzlgza")); - Assertions.assertEquals(false, response.bulkSubscribe().enabled()); - Assertions.assertEquals(335893529, response.bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(825702294, response.bulkSubscribe().maxAwaitDurationMs()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteWithResponseMockTests.java deleted file mode 100644 index cbdf3dd6e62b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.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 DaprSubscriptionsDeleteWithResponseMockTests { - @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.daprSubscriptions().deleteWithResponse("c", "wnujvqynvav", "tmdmuqohhihr", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetWithResponseMockTests.java deleted file mode 100644 index 68ef1a7b2471..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetWithResponseMockTests.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.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.DaprSubscription; -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 DaprSubscriptionsGetWithResponseMockTests { - @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\":{\"pubsubName\":\"suaawj\",\"topic\":\"xwjnfcz\",\"deadLetterTopic\":\"nii\",\"routes\":{\"rules\":[{\"match\":\"ba\",\"path\":\"sjtgirnbgmgmddo\"},{\"match\":\"mynltwmpftmfoeaj\",\"path\":\"syxwetamfdd\"}],\"default\":\"lkpzwbhnrecchd\"},\"scopes\":[\"muhkahm\",\"edbiucvkhhwmjpjb\",\"eunxcqrrihufoi\",\"ppiybxv\"],\"metadata\":{\"zvkunhdi\":\"uzpbgkzcscpi\",\"cfqp\":\"juktirzkaugpucd\",\"rjlvzklkvbgi\":\"wgofmhx\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":86596689,\"maxAwaitDurationMs\":1162128652}},\"id\":\"bishjvpzaptuo\",\"name\":\"kaoizjixw\",\"type\":\"gcdiyk\"}"; - - 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)); - - DaprSubscription response = manager.daprSubscriptions() - .getWithResponse("btimpkjblor", "s", "hqhud", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("suaawj", response.pubsubName()); - Assertions.assertEquals("xwjnfcz", response.topic()); - Assertions.assertEquals("nii", response.deadLetterTopic()); - Assertions.assertEquals("ba", response.routes().rules().get(0).match()); - Assertions.assertEquals("sjtgirnbgmgmddo", response.routes().rules().get(0).path()); - Assertions.assertEquals("lkpzwbhnrecchd", response.routes().defaultProperty()); - Assertions.assertEquals("muhkahm", response.scopes().get(0)); - Assertions.assertEquals("uzpbgkzcscpi", response.metadata().get("zvkunhdi")); - Assertions.assertEquals(false, response.bulkSubscribe().enabled()); - Assertions.assertEquals(86596689, response.bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(1162128652, response.bulkSubscribe().maxAwaitDurationMs()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListMockTests.java deleted file mode 100644 index a26bc89bdf8d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListMockTests.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.DaprSubscription; -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 DaprSubscriptionsListMockTests { - @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\":[{\"properties\":{\"pubsubName\":\"sdgzyy\",\"topic\":\"oxlvocptvdxxheig\",\"deadLetterTopic\":\"ilwzghj\",\"routes\":{\"rules\":[{\"match\":\"bzzbwayb\",\"path\":\"d\"}],\"default\":\"bgymqt\"},\"scopes\":[\"reojxrjnbsc\",\"nx\",\"vi\",\"neychbjizq\"],\"metadata\":{\"ipmlnfyzavf\":\"nwdxzedpqlrfbor\",\"aq\":\"bypicdbkpdj\"},\"bulkSubscribe\":{\"enabled\":false,\"maxMessagesCount\":2041682008,\"maxAwaitDurationMs\":1356872563}},\"id\":\"onjhxshthmgpczqu\",\"name\":\"ptkbvcpxtzhi\",\"type\":\"q\"}]}"; - - 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.daprSubscriptions().list("iuwkirkskwzts", "etjygowifcqpolz", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("sdgzyy", response.iterator().next().pubsubName()); - Assertions.assertEquals("oxlvocptvdxxheig", response.iterator().next().topic()); - Assertions.assertEquals("ilwzghj", response.iterator().next().deadLetterTopic()); - Assertions.assertEquals("bzzbwayb", response.iterator().next().routes().rules().get(0).match()); - Assertions.assertEquals("d", response.iterator().next().routes().rules().get(0).path()); - Assertions.assertEquals("bgymqt", response.iterator().next().routes().defaultProperty()); - Assertions.assertEquals("reojxrjnbsc", response.iterator().next().scopes().get(0)); - Assertions.assertEquals("nwdxzedpqlrfbor", response.iterator().next().metadata().get("ipmlnfyzavf")); - Assertions.assertEquals(false, response.iterator().next().bulkSubscribe().enabled()); - Assertions.assertEquals(2041682008, response.iterator().next().bulkSubscribe().maxMessagesCount()); - Assertions.assertEquals(1356872563, response.iterator().next().bulkSubscribe().maxAwaitDurationMs()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.java deleted file mode 100644 index 0feb7db9d933..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.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.AppProtocol; -import com.azure.resourcemanager.appcontainers.models.Dapr; -import com.azure.resourcemanager.appcontainers.models.LogLevel; -import org.junit.jupiter.api.Assertions; - -public final class DaprTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Dapr model = BinaryData.fromString( - "{\"enabled\":true,\"appId\":\"kfwynw\",\"appProtocol\":\"grpc\",\"appPort\":885107915,\"httpReadBufferSize\":1353261360,\"httpMaxRequestSize\":1479821561,\"logLevel\":\"warn\",\"enableApiLogging\":false}") - .toObject(Dapr.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("kfwynw", model.appId()); - Assertions.assertEquals(AppProtocol.GRPC, model.appProtocol()); - Assertions.assertEquals(885107915, model.appPort()); - Assertions.assertEquals(1353261360, model.httpReadBufferSize()); - Assertions.assertEquals(1479821561, model.httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.WARN, model.logLevel()); - Assertions.assertEquals(false, model.enableApiLogging()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Dapr model = new Dapr().withEnabled(true).withAppId("kfwynw").withAppProtocol(AppProtocol.GRPC) - .withAppPort(885107915).withHttpReadBufferSize(1353261360).withHttpMaxRequestSize(1479821561) - .withLogLevel(LogLevel.WARN).withEnableApiLogging(false); - model = BinaryData.fromObject(model).toObject(Dapr.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("kfwynw", model.appId()); - Assertions.assertEquals(AppProtocol.GRPC, model.appProtocol()); - Assertions.assertEquals(885107915, model.appPort()); - Assertions.assertEquals(1353261360, model.httpReadBufferSize()); - Assertions.assertEquals(1479821561, model.httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.WARN, 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 1ca655a96628..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultAuthorizationPolicyTests.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.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\":[\"hbzhfepg\",\"gqexzlocxs\",\"paierh\"],\"identities\":[\"sglumma\",\"tjaodxobnb\"]},\"allowedApplications\":[\"qp\"]}") - .toObject(DefaultAuthorizationPolicy.class); - Assertions.assertEquals("hbzhfepg", model.allowedPrincipals().groups().get(0)); - Assertions.assertEquals("sglumma", model.allowedPrincipals().identities().get(0)); - Assertions.assertEquals("qp", model.allowedApplications().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DefaultAuthorizationPolicy model - = new DefaultAuthorizationPolicy() - .withAllowedPrincipals( - new AllowedPrincipals().withGroups(Arrays.asList("hbzhfepg", "gqexzlocxs", "paierh")) - .withIdentities(Arrays.asList("sglumma", "tjaodxobnb"))) - .withAllowedApplications(Arrays.asList("qp")); - model = BinaryData.fromObject(model).toObject(DefaultAuthorizationPolicy.class); - Assertions.assertEquals("hbzhfepg", model.allowedPrincipals().groups().get(0)); - Assertions.assertEquals("sglumma", model.allowedPrincipals().identities().get(0)); - Assertions.assertEquals("qp", 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 1b9c62c0f6b7..000000000000 --- 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\":\"qulngsntnbybkzgc\"}").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 b7337a343a0d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataPropertyBagItemTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticDataProviderMetadataPropertyBagItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticDataProviderMetadataPropertyBagItem model - = BinaryData.fromString("{\"name\":\"ifrygzn\",\"value\":\"axri\"}") - .toObject(DiagnosticDataProviderMetadataPropertyBagItem.class); - Assertions.assertEquals("ifrygzn", model.name()); - Assertions.assertEquals("axri", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataProviderMetadataPropertyBagItem model - = new DiagnosticDataProviderMetadataPropertyBagItem().withName("ifrygzn").withValue("axri"); - model = BinaryData.fromObject(model).toObject(DiagnosticDataProviderMetadataPropertyBagItem.class); - Assertions.assertEquals("ifrygzn", model.name()); - Assertions.assertEquals("axri", 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 b0e24a5ad71b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticDataProviderMetadataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticDataProviderMetadata model = BinaryData.fromString( - "{\"providerName\":\"b\",\"propertyBag\":[{\"name\":\"hv\",\"value\":\"lkvn\"},{\"name\":\"lrigjkskyri\",\"value\":\"vzidsxwaab\"}]}") - .toObject(DiagnosticDataProviderMetadata.class); - Assertions.assertEquals("b", model.providerName()); - Assertions.assertEquals("hv", model.propertyBag().get(0).name()); - Assertions.assertEquals("lkvn", model.propertyBag().get(0).value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataProviderMetadata model = new DiagnosticDataProviderMetadata().withProviderName("b") - .withPropertyBag(Arrays.asList( - new DiagnosticDataProviderMetadataPropertyBagItem().withName("hv").withValue("lkvn"), - new DiagnosticDataProviderMetadataPropertyBagItem().withName("lrigjkskyri").withValue("vzidsxwaab"))); - model = BinaryData.fromObject(model).toObject(DiagnosticDataProviderMetadata.class); - Assertions.assertEquals("b", model.providerName()); - Assertions.assertEquals("hv", model.propertyBag().get(0).name()); - Assertions.assertEquals("lkvn", 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 a7c905a0bf2e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseColumnTests.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.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\":\"waz\",\"dataType\":\"qnmcjngzqdqx\",\"columnType\":\"jw\"}") - .toObject(DiagnosticDataTableResponseColumn.class); - Assertions.assertEquals("waz", model.columnName()); - Assertions.assertEquals("qnmcjngzqdqx", model.dataType()); - Assertions.assertEquals("jw", model.columnType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataTableResponseColumn model = new DiagnosticDataTableResponseColumn().withColumnName("waz") - .withDataType("qnmcjngzqdqx").withColumnType("jw"); - model = BinaryData.fromObject(model).toObject(DiagnosticDataTableResponseColumn.class); - Assertions.assertEquals("waz", model.columnName()); - Assertions.assertEquals("qnmcjngzqdqx", model.dataType()); - Assertions.assertEquals("jw", 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 8efb2fbdfcb6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseObjectTests.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.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\":\"tmzlbiojlv\",\"columns\":[{\"columnName\":\"bpneqvcwwyyurm\",\"dataType\":\"hppr\",\"columnType\":\"snmokayzej\"},{\"columnName\":\"lbkpb\",\"dataType\":\"cpilj\",\"columnType\":\"hzvechndbnwieho\"},{\"columnName\":\"wjwiuub\",\"dataType\":\"fqsfa\",\"columnType\":\"qtferrqwexjkmf\"},{\"columnName\":\"pjwogqqno\",\"dataType\":\"udcdabtqwpwyawb\",\"columnType\":\"sqbuc\"}],\"rows\":[\"datakyexaoguyaipi\",\"datasdaultxij\",\"dataum\"]}") - .toObject(DiagnosticDataTableResponseObject.class); - Assertions.assertEquals("tmzlbiojlv", model.tableName()); - Assertions.assertEquals("bpneqvcwwyyurm", model.columns().get(0).columnName()); - Assertions.assertEquals("hppr", model.columns().get(0).dataType()); - Assertions.assertEquals("snmokayzej", model.columns().get(0).columnType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataTableResponseObject model = new DiagnosticDataTableResponseObject().withTableName("tmzlbiojlv") - .withColumns(Arrays.asList( - new DiagnosticDataTableResponseColumn().withColumnName("bpneqvcwwyyurm").withDataType("hppr") - .withColumnType("snmokayzej"), - new DiagnosticDataTableResponseColumn().withColumnName("lbkpb").withDataType("cpilj") - .withColumnType("hzvechndbnwieho"), - new DiagnosticDataTableResponseColumn().withColumnName("wjwiuub").withDataType("fqsfa") - .withColumnType("qtferrqwexjkmf"), - new DiagnosticDataTableResponseColumn().withColumnName("pjwogqqno").withDataType("udcdabtqwpwyawb") - .withColumnType("sqbuc"))) - .withRows(Arrays.asList("datakyexaoguyaipi", "datasdaultxij", "dataum")); - model = BinaryData.fromObject(model).toObject(DiagnosticDataTableResponseObject.class); - Assertions.assertEquals("tmzlbiojlv", model.tableName()); - Assertions.assertEquals("bpneqvcwwyyurm", model.columns().get(0).columnName()); - Assertions.assertEquals("hppr", model.columns().get(0).dataType()); - Assertions.assertEquals("snmokayzej", 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 ed630e867c94..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticRenderingTests.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.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\":673657894,\"title\":\"usfzsvtuikzha\",\"description\":\"glcfhmlrqryxyn\",\"isVisible\":true}") - .toObject(DiagnosticRendering.class); - Assertions.assertEquals(673657894, model.type()); - Assertions.assertEquals("usfzsvtuikzha", model.title()); - Assertions.assertEquals("glcfhmlrqryxyn", model.description()); - Assertions.assertEquals(true, model.isVisible()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticRendering model = new DiagnosticRendering().withType(673657894).withTitle("usfzsvtuikzha") - .withDescription("glcfhmlrqryxyn").withIsVisible(true); - model = BinaryData.fromObject(model).toObject(DiagnosticRendering.class); - Assertions.assertEquals(673657894, model.type()); - Assertions.assertEquals("usfzsvtuikzha", model.title()); - Assertions.assertEquals("glcfhmlrqryxyn", model.description()); - Assertions.assertEquals(true, model.isVisible()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java deleted file mode 100644 index f3775dd9fd2a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; - -public final class DiagnosticSupportTopicTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticSupportTopic model = BinaryData.fromString("{\"id\":\"opv\",\"pesId\":\"dbzqgqqihed\"}") - .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 c7738824b28f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsCollectionInnerTests.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.fluent.models.DiagnosticsCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsCollectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsCollectionInner model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"metadata\":{\"id\":\"nzqodfvpg\",\"name\":\"oxgsgbpfgzdjtx\",\"description\":\"flbqvgaq\",\"author\":\"gafcqu\",\"category\":\"dvetnws\",\"supportTopicList\":[{}],\"analysisTypes\":[\"wlduyc\",\"uzhyrmewipmvekdx\",\"kuqgsjjxundxgket\",\"zhhzjhfjmhvvmu\"],\"type\":\"pmuneqsx\",\"score\":97.42455},\"dataset\":[{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}}],\"status\":{\"message\":\"sasbhu\",\"statusId\":1639205644},\"dataProviderMetadata\":{\"providerName\":\"yue\",\"propertyBag\":[{},{},{}]}},\"id\":\"nsqyrpfoobrltt\",\"name\":\"msjnygqdnfw\",\"type\":\"zdzgtilaxhnfhqly\"},{\"properties\":{\"metadata\":{\"id\":\"uwivkxoy\",\"name\":\"nbixxrti\",\"description\":\"cpwpg\",\"author\":\"rc\",\"category\":\"tso\",\"supportTopicList\":[{},{}],\"analysisTypes\":[\"nxpmyyefrpmpdnq\",\"skawaoqvmmb\",\"pqfrtqlkz\"],\"type\":\"gnitgvkxlzyq\",\"score\":34.082},\"dataset\":[{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}}],\"status\":{\"message\":\"cansymoyqhlwigd\",\"statusId\":247334898},\"dataProviderMetadata\":{\"providerName\":\"xgomfajuwa\",\"propertyBag\":[{},{},{},{}]}},\"id\":\"aeyyg\",\"name\":\"xakjsqzhzb\",\"type\":\"zkgimsid\"},{\"properties\":{\"metadata\":{\"id\":\"cddyvvjsk\",\"name\":\"mocwa\",\"description\":\"qgatjeaahhvjhhn\",\"author\":\"zybbj\",\"category\":\"dj\",\"supportTopicList\":[{},{}],\"analysisTypes\":[\"yxvxevblbjed\",\"ljlageuaulxu\",\"smjbnkppxyn\",\"nlsvxeiz\"],\"type\":\"wklnsrmffeyc\",\"score\":18.504536},\"dataset\":[{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}}],\"status\":{\"message\":\"ammxqi\",\"statusId\":1876834385},\"dataProviderMetadata\":{\"providerName\":\"ddrtkgdojb\",\"propertyBag\":[{},{},{}]}},\"id\":\"vrefdeesv\",\"name\":\"cuijpxt\",\"type\":\"s\"},{\"properties\":{\"metadata\":{\"id\":\"tujwsawdd\",\"name\":\"babxvitit\",\"description\":\"zeexavoxtfgle\",\"author\":\"m\",\"category\":\"bwpypqtgsfjacb\",\"supportTopicList\":[{},{}],\"analysisTypes\":[\"udbxv\"],\"type\":\"htnsi\",\"score\":69.404366},\"dataset\":[{\"table\":{},\"renderingProperties\":{}}],\"status\":{\"message\":\"ckdlpag\",\"statusId\":1885722966},\"dataProviderMetadata\":{\"providerName\":\"a\",\"propertyBag\":[{},{},{}]}},\"id\":\"xwmdboxd\",\"name\":\"gsftufqobrjlnacg\",\"type\":\"ckknhxkizvy\"}],\"nextLink\":\"rzvul\"}") - .toObject(DiagnosticsCollectionInner.class); - Assertions.assertEquals("wlduyc", model.value().get(0).properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("sasbhu", model.value().get(0).properties().status().message()); - Assertions.assertEquals(1639205644, model.value().get(0).properties().status().statusId()); - Assertions.assertEquals("yue", model.value().get(0).properties().dataProviderMetadata().providerName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsCollectionInner model - = new DiagnosticsCollectionInner() - .withValue(Arrays.asList( - new DiagnosticsInner() - .withProperties( - new DiagnosticsProperties() - .withMetadata(new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("wlduyc", "uzhyrmewipmvekdx", "kuqgsjjxundxgket", - "zhhzjhfjmhvvmu"))) - .withDataset(Arrays.asList( - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()), - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()))) - .withStatus(new DiagnosticsStatus().withMessage("sasbhu").withStatusId(1639205644)) - .withDataProviderMetadata( - new DiagnosticDataProviderMetadata().withProviderName( - "yue").withPropertyBag( - Arrays.asList(new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem())))), - new DiagnosticsInner() - .withProperties( - new DiagnosticsProperties() - .withMetadata(new DiagnosticsDefinition() - .withSupportTopicList( - Arrays.asList(new DiagnosticSupportTopic(), new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("nxpmyyefrpmpdnq", "skawaoqvmmb", "pqfrtqlkz"))) - .withDataset(Arrays.asList( - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()), - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()), - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()))) - .withStatus(new DiagnosticsStatus().withMessage("cansymoyqhlwigd").withStatusId( - 247334898)) - .withDataProviderMetadata(new DiagnosticDataProviderMetadata() - .withProviderName("xgomfajuwa") - .withPropertyBag(Arrays.asList(new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem())))), - new DiagnosticsInner() - .withProperties(new DiagnosticsProperties() - .withMetadata(new DiagnosticsDefinition() - .withSupportTopicList( - Arrays.asList(new DiagnosticSupportTopic(), new DiagnosticSupportTopic())) - .withAnalysisTypes( - Arrays.asList("yxvxevblbjed", "ljlageuaulxu", "smjbnkppxyn", "nlsvxeiz"))) - .withDataset(Arrays.asList( - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()), - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()), - new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()))) - .withStatus(new DiagnosticsStatus().withMessage("ammxqi").withStatusId(1876834385)) - .withDataProviderMetadata( - new DiagnosticDataProviderMetadata().withProviderName("ddrtkgdojb") - .withPropertyBag(Arrays.asList(new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem())))), - new DiagnosticsInner().withProperties(new DiagnosticsProperties() - .withMetadata(new DiagnosticsDefinition() - .withSupportTopicList( - Arrays.asList(new DiagnosticSupportTopic(), new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("udbxv"))) - .withDataset(Arrays - .asList(new DiagnosticsDataApiResponse().withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()))) - .withStatus(new DiagnosticsStatus().withMessage("ckdlpag").withStatusId(1885722966)) - .withDataProviderMetadata(new DiagnosticDataProviderMetadata().withProviderName("a") - .withPropertyBag(Arrays.asList(new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem())))))); - model = BinaryData.fromObject(model).toObject(DiagnosticsCollectionInner.class); - Assertions.assertEquals("wlduyc", model.value().get(0).properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("sasbhu", model.value().get(0).properties().status().message()); - Assertions.assertEquals(1639205644, model.value().get(0).properties().status().statusId()); - Assertions.assertEquals("yue", model.value().get(0).properties().dataProviderMetadata().providerName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java deleted file mode 100644 index 030f1d800655..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.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.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\":\"wthmkyib\",\"columns\":[{\"columnName\":\"hsgqc\",\"dataType\":\"hohsd\",\"columnType\":\"cdzsu\"},{\"columnName\":\"ohdxbzlmcmu\",\"dataType\":\"cvhd\",\"columnType\":\"v\"},{\"columnName\":\"qxeysko\",\"dataType\":\"zinkfkbgbzbowxeq\",\"columnType\":\"ljmygvkzqkjjeokb\"},{\"columnName\":\"fezrx\",\"dataType\":\"zurtleipqxbkwvz\",\"columnType\":\"zvd\"}],\"rows\":[\"datad\"]},\"renderingProperties\":{\"type\":1814010794,\"title\":\"pnodawopqhe\",\"description\":\"ptmcgsbostzelnd\",\"isVisible\":false}}") - .toObject(DiagnosticsDataApiResponse.class); - Assertions.assertEquals("wthmkyib", model.table().tableName()); - Assertions.assertEquals("hsgqc", model.table().columns().get(0).columnName()); - Assertions.assertEquals("hohsd", model.table().columns().get(0).dataType()); - Assertions.assertEquals("cdzsu", model.table().columns().get(0).columnType()); - Assertions.assertEquals(1814010794, model.renderingProperties().type()); - Assertions.assertEquals("pnodawopqhe", model.renderingProperties().title()); - Assertions.assertEquals("ptmcgsbostzelnd", 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("wthmkyib") - .withColumns(Arrays.asList( - new DiagnosticDataTableResponseColumn().withColumnName("hsgqc").withDataType("hohsd") - .withColumnType("cdzsu"), - new DiagnosticDataTableResponseColumn().withColumnName("ohdxbzlmcmu").withDataType("cvhd") - .withColumnType("v"), - new DiagnosticDataTableResponseColumn().withColumnName("qxeysko").withDataType("zinkfkbgbzbowxeq") - .withColumnType("ljmygvkzqkjjeokb"), - new DiagnosticDataTableResponseColumn().withColumnName("fezrx").withDataType("zurtleipqxbkwvz") - .withColumnType("zvd"))) - .withRows(Arrays.asList("datad"))) - .withRenderingProperties(new DiagnosticRendering().withType(1814010794).withTitle("pnodawopqhe") - .withDescription("ptmcgsbostzelnd").withIsVisible(false)); - model = BinaryData.fromObject(model).toObject(DiagnosticsDataApiResponse.class); - Assertions.assertEquals("wthmkyib", model.table().tableName()); - Assertions.assertEquals("hsgqc", model.table().columns().get(0).columnName()); - Assertions.assertEquals("hohsd", model.table().columns().get(0).dataType()); - Assertions.assertEquals("cdzsu", model.table().columns().get(0).columnType()); - Assertions.assertEquals(1814010794, model.renderingProperties().type()); - Assertions.assertEquals("pnodawopqhe", model.renderingProperties().title()); - Assertions.assertEquals("ptmcgsbostzelnd", 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 d4271ef45f59..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDefinitionTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsDefinition model = BinaryData.fromString( - "{\"id\":\"hlqhykprlpy\",\"name\":\"uciqdsme\",\"description\":\"itdfuxtyasiib\",\"author\":\"ybnnustg\",\"category\":\"jh\",\"supportTopicList\":[{\"id\":\"xhcmavmqfoudo\",\"pesId\":\"cgyypro\"}],\"analysisTypes\":[\"pundmbxhug\",\"mjkavlgorbmft\",\"mdtzfjltfvnzc\"],\"type\":\"t\",\"score\":1.86252}") - .toObject(DiagnosticsDefinition.class); - Assertions.assertEquals("pundmbxhug", 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("pundmbxhug", "mjkavlgorbmft", "mdtzfjltfvnzc")); - model = BinaryData.fromObject(model).toObject(DiagnosticsDefinition.class); - Assertions.assertEquals("pundmbxhug", 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 e6d2d26a529b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsInnerTests.java +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsInner model = BinaryData.fromString( - "{\"properties\":{\"metadata\":{\"id\":\"eranokqgukkjqnv\",\"name\":\"oylaxxul\",\"description\":\"isdos\",\"author\":\"b\",\"category\":\"vgjrwhr\",\"supportTopicList\":[{\"id\":\"ytdc\",\"pesId\":\"gc\"}],\"analysisTypes\":[\"fnwmbtmvpdvj\"],\"type\":\"ttzaefed\",\"score\":85.42932},\"dataset\":[{\"table\":{\"tableName\":\"hk\",\"columns\":[{},{},{}],\"rows\":[\"dataqnsdfzpbgtgky\"]},\"renderingProperties\":{\"type\":50734303,\"title\":\"rjeuut\",\"description\":\"xezw\",\"isVisible\":true}},{\"table\":{\"tableName\":\"bwnhhtql\",\"columns\":[{},{},{},{}],\"rows\":[\"datapipifh\",\"dataf\",\"dataoajvgcxtxjcs\"]},\"renderingProperties\":{\"type\":1665237289,\"title\":\"dltug\",\"description\":\"esmkssjhoiftxfkf\",\"isVisible\":false}},{\"table\":{\"tableName\":\"hpt\",\"columns\":[{},{},{},{}],\"rows\":[\"databiqtgdq\",\"datahm\",\"datawsldrizetpwbr\"]},\"renderingProperties\":{\"type\":1155046174,\"title\":\"bphbqzmizakakank\",\"description\":\"dnjzh\",\"isVisible\":true}}],\"status\":{\"message\":\"hjlmu\",\"statusId\":29560725},\"dataProviderMetadata\":{\"providerName\":\"imrsopteecjmei\",\"propertyBag\":[{\"name\":\"vasylwxdzau\",\"value\":\"eoohguufuzboyj\"},{\"name\":\"hwtzolb\",\"value\":\"mwmdxmebwjscjpa\"},{\"name\":\"xveabf\",\"value\":\"nmwmqtibx\"},{\"name\":\"jddtvqct\",\"value\":\"dija\"}]}},\"id\":\"kmr\",\"name\":\"ieekpndzaa\",\"type\":\"mudqmeq\"}") - .toObject(DiagnosticsInner.class); - Assertions.assertEquals("fnwmbtmvpdvj", model.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("hk", model.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(50734303, model.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("rjeuut", model.properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("xezw", model.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, model.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("hjlmu", model.properties().status().message()); - Assertions.assertEquals(29560725, model.properties().status().statusId()); - Assertions.assertEquals("imrsopteecjmei", model.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("vasylwxdzau", model.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("eoohguufuzboyj", - model.properties().dataProviderMetadata().propertyBag().get(0).value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsInner model = new DiagnosticsInner().withProperties(new DiagnosticsProperties() - .withMetadata(new DiagnosticsDefinition().withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("fnwmbtmvpdvj"))) - .withDataset(Arrays.asList( - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject().withTableName("hk") - .withColumns(Arrays.asList(new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn(), new DiagnosticDataTableResponseColumn())) - .withRows(Arrays.asList("dataqnsdfzpbgtgky"))) - .withRenderingProperties(new DiagnosticRendering().withType(50734303).withTitle("rjeuut") - .withDescription("xezw").withIsVisible(true)), - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject().withTableName("bwnhhtql") - .withColumns(Arrays.asList(new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn(), new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn())) - .withRows(Arrays.asList("datapipifh", "dataf", "dataoajvgcxtxjcs"))) - .withRenderingProperties(new DiagnosticRendering().withType(1665237289).withTitle("dltug") - .withDescription("esmkssjhoiftxfkf").withIsVisible(false)), - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject().withTableName("hpt") - .withColumns(Arrays.asList(new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn(), new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn())) - .withRows(Arrays.asList("databiqtgdq", "datahm", "datawsldrizetpwbr"))) - .withRenderingProperties(new DiagnosticRendering().withType(1155046174) - .withTitle("bphbqzmizakakank").withDescription("dnjzh").withIsVisible(true)))) - .withStatus(new DiagnosticsStatus().withMessage("hjlmu").withStatusId(29560725)) - .withDataProviderMetadata(new DiagnosticDataProviderMetadata().withProviderName("imrsopteecjmei") - .withPropertyBag(Arrays.asList( - new DiagnosticDataProviderMetadataPropertyBagItem().withName("vasylwxdzau") - .withValue("eoohguufuzboyj"), - new DiagnosticDataProviderMetadataPropertyBagItem().withName("hwtzolb") - .withValue("mwmdxmebwjscjpa"), - new DiagnosticDataProviderMetadataPropertyBagItem().withName("xveabf").withValue("nmwmqtibx"), - new DiagnosticDataProviderMetadataPropertyBagItem().withName("jddtvqct").withValue("dija"))))); - model = BinaryData.fromObject(model).toObject(DiagnosticsInner.class); - Assertions.assertEquals("fnwmbtmvpdvj", model.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("hk", model.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(50734303, model.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("rjeuut", model.properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("xezw", model.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, model.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("hjlmu", model.properties().status().message()); - Assertions.assertEquals(29560725, model.properties().status().statusId()); - Assertions.assertEquals("imrsopteecjmei", model.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("vasylwxdzau", model.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("eoohguufuzboyj", - model.properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java deleted file mode 100644 index 3f5416c74a0f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsProperties model = BinaryData.fromString( - "{\"metadata\":{\"id\":\"pibudqwyxebeybpm\",\"name\":\"nrtffyaqi\",\"description\":\"hheioqaqhvseuf\",\"author\":\"yrxpdlcgqls\",\"category\":\"mjqfrddgamquhio\",\"supportTopicList\":[{\"id\":\"uivfcdis\",\"pesId\":\"rnxzh\"},{\"id\":\"exrxzbujrtrhq\",\"pesId\":\"revkhgnlnzo\"},{\"id\":\"lrpiqywnc\",\"pesId\":\"tszcofizehtdhgb\"},{\"id\":\"vreljea\",\"pesId\":\"rvzmlovuana\"}],\"analysisTypes\":[\"xlpm\",\"erbdk\",\"lvidizozs\"],\"type\":\"ccxjm\",\"score\":89.4738},\"dataset\":[{\"table\":{\"tableName\":\"n\",\"columns\":[{\"columnName\":\"uwwltvuqjctz\",\"dataType\":\"keifzzhmkdasv\",\"columnType\":\"yhbxcudchxgs\"}],\"rows\":[\"dataldforobwj\",\"datavizbfhfo\",\"datavacqpbtuodxesz\"]},\"renderingProperties\":{\"type\":1654037219,\"title\":\"awumuaslzkwrrwo\",\"description\":\"qucwyhahnom\",\"isVisible\":true}},{\"table\":{\"tableName\":\"uh\",\"columns\":[{\"columnName\":\"uurutlwexxwlalni\",\"dataType\":\"zsrzpgepq\",\"columnType\":\"bb\"},{\"columnName\":\"pgdakchzyvli\",\"dataType\":\"nrkcxkj\",\"columnType\":\"nxm\"}],\"rows\":[\"dataxs\",\"dataqrntv\",\"datawijpsttexoqqpwc\"]},\"renderingProperties\":{\"type\":402556977,\"title\":\"hruncuwmq\",\"description\":\"kcdqzhlct\",\"isVisible\":true}},{\"table\":{\"tableName\":\"ndy\",\"columns\":[{\"columnName\":\"rqbnjjrc\",\"dataType\":\"gydcw\",\"columnType\":\"xjumvq\"},{\"columnName\":\"lihrraiouaubr\",\"dataType\":\"loqxfuojrngif\",\"columnType\":\"z\"}],\"rows\":[\"dataccbiuimzdlyjdfq\",\"datamkyoqufdvruzsl\",\"dataojhp\"]},\"renderingProperties\":{\"type\":320738899,\"title\":\"dxotng\",\"description\":\"gugey\",\"isVisible\":false}},{\"table\":{\"tableName\":\"kyuizabsnmfpp\",\"columns\":[{\"columnName\":\"evy\",\"dataType\":\"hsgz\",\"columnType\":\"zbgomfgbeg\"}],\"rows\":[\"dataleohibetnluankr\",\"datafxeeebtijvacvbm\"]},\"renderingProperties\":{\"type\":1802665958,\"title\":\"xl\",\"description\":\"rnwxacevehjkuyxo\",\"isVisible\":false}}],\"status\":{\"message\":\"qltfaey\",\"statusId\":277162772},\"dataProviderMetadata\":{\"providerName\":\"gv\",\"propertyBag\":[{\"name\":\"gh\",\"value\":\"ypoq\"}]}}") - .toObject(DiagnosticsProperties.class); - Assertions.assertEquals("xlpm", model.metadata().analysisTypes().get(0)); - Assertions.assertEquals("n", model.dataset().get(0).table().tableName()); - Assertions.assertEquals("uwwltvuqjctz", model.dataset().get(0).table().columns().get(0).columnName()); - Assertions.assertEquals("keifzzhmkdasv", model.dataset().get(0).table().columns().get(0).dataType()); - Assertions.assertEquals("yhbxcudchxgs", model.dataset().get(0).table().columns().get(0).columnType()); - Assertions.assertEquals(1654037219, model.dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("awumuaslzkwrrwo", model.dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("qucwyhahnom", model.dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, model.dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("qltfaey", model.status().message()); - Assertions.assertEquals(277162772, model.status().statusId()); - Assertions.assertEquals("gv", model.dataProviderMetadata().providerName()); - Assertions.assertEquals("gh", model.dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("ypoq", 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(), new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("xlpm", "erbdk", "lvidizozs"))) - .withDataset(Arrays.asList( - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject().withTableName("n") - .withColumns( - Arrays.asList(new DiagnosticDataTableResponseColumn().withColumnName("uwwltvuqjctz") - .withDataType("keifzzhmkdasv").withColumnType("yhbxcudchxgs"))) - .withRows(Arrays.asList("dataldforobwj", "datavizbfhfo", "datavacqpbtuodxesz"))) - .withRenderingProperties(new DiagnosticRendering().withType(1654037219) - .withTitle("awumuaslzkwrrwo").withDescription("qucwyhahnom").withIsVisible(true)), - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject().withTableName("uh") - .withColumns(Arrays.asList( - new DiagnosticDataTableResponseColumn().withColumnName("uurutlwexxwlalni") - .withDataType("zsrzpgepq").withColumnType("bb"), - new DiagnosticDataTableResponseColumn().withColumnName("pgdakchzyvli") - .withDataType("nrkcxkj").withColumnType("nxm"))) - .withRows(Arrays.asList("dataxs", "dataqrntv", "datawijpsttexoqqpwc"))) - .withRenderingProperties(new DiagnosticRendering().withType(402556977).withTitle("hruncuwmq") - .withDescription("kcdqzhlct").withIsVisible(true)), - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject().withTableName("ndy") - .withColumns(Arrays.asList( - new DiagnosticDataTableResponseColumn().withColumnName("rqbnjjrc").withDataType("gydcw") - .withColumnType("xjumvq"), - new DiagnosticDataTableResponseColumn().withColumnName("lihrraiouaubr") - .withDataType("loqxfuojrngif").withColumnType("z"))) - .withRows(Arrays.asList("dataccbiuimzdlyjdfq", "datamkyoqufdvruzsl", "dataojhp"))) - .withRenderingProperties(new DiagnosticRendering().withType(320738899).withTitle("dxotng") - .withDescription("gugey").withIsVisible(false)), - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject().withTableName("kyuizabsnmfpp") - .withColumns(Arrays.asList(new DiagnosticDataTableResponseColumn().withColumnName("evy") - .withDataType("hsgz").withColumnType("zbgomfgbeg"))) - .withRows(Arrays.asList("dataleohibetnluankr", "datafxeeebtijvacvbm"))) - .withRenderingProperties(new DiagnosticRendering().withType(1802665958).withTitle("xl") - .withDescription("rnwxacevehjkuyxo").withIsVisible(false)))) - .withStatus(new DiagnosticsStatus().withMessage("qltfaey").withStatusId(277162772)) - .withDataProviderMetadata( - new DiagnosticDataProviderMetadata().withProviderName("gv").withPropertyBag(Arrays - .asList(new DiagnosticDataProviderMetadataPropertyBagItem().withName("gh").withValue("ypoq")))); - model = BinaryData.fromObject(model).toObject(DiagnosticsProperties.class); - Assertions.assertEquals("xlpm", model.metadata().analysisTypes().get(0)); - Assertions.assertEquals("n", model.dataset().get(0).table().tableName()); - Assertions.assertEquals("uwwltvuqjctz", model.dataset().get(0).table().columns().get(0).columnName()); - Assertions.assertEquals("keifzzhmkdasv", model.dataset().get(0).table().columns().get(0).dataType()); - Assertions.assertEquals("yhbxcudchxgs", model.dataset().get(0).table().columns().get(0).columnType()); - Assertions.assertEquals(1654037219, model.dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("awumuaslzkwrrwo", model.dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("qucwyhahnom", model.dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, model.dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("qltfaey", model.status().message()); - Assertions.assertEquals(277162772, model.status().statusId()); - Assertions.assertEquals("gv", model.dataProviderMetadata().providerName()); - Assertions.assertEquals("gh", model.dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("ypoq", 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 8f497b3cec3e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsStatusTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsStatus model = BinaryData.fromString("{\"message\":\"dpsovwxznptgo\",\"statusId\":935021144}") - .toObject(DiagnosticsStatus.class); - Assertions.assertEquals("dpsovwxznptgo", model.message()); - Assertions.assertEquals(935021144, model.statusId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsStatus model = new DiagnosticsStatus().withMessage("dpsovwxznptgo").withStatusId(935021144); - model = BinaryData.fromObject(model).toObject(DiagnosticsStatus.class); - Assertions.assertEquals("dpsovwxznptgo", model.message()); - Assertions.assertEquals(935021144, model.statusId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentConfigurationPropertyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentConfigurationPropertyTests.java deleted file mode 100644 index f29915ca3f90..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentConfigurationPropertyTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import org.junit.jupiter.api.Assertions; - -public final class DotNetComponentConfigurationPropertyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DotNetComponentConfigurationProperty model - = BinaryData.fromString("{\"propertyName\":\"gjlgvvpase\",\"value\":\"gbuxantuygdh\"}") - .toObject(DotNetComponentConfigurationProperty.class); - Assertions.assertEquals("gjlgvvpase", model.propertyName()); - Assertions.assertEquals("gbuxantuygdh", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DotNetComponentConfigurationProperty model - = new DotNetComponentConfigurationProperty().withPropertyName("gjlgvvpase").withValue("gbuxantuygdh"); - model = BinaryData.fromObject(model).toObject(DotNetComponentConfigurationProperty.class); - Assertions.assertEquals("gjlgvvpase", model.propertyName()); - Assertions.assertEquals("gbuxantuygdh", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentInnerTests.java deleted file mode 100644 index e27a5336ff69..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentInnerTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DotNetComponentInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DotNetComponentInner model = BinaryData.fromString( - "{\"properties\":{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"Deleting\",\"configurations\":[{\"propertyName\":\"rx\",\"value\":\"sojklinhmdptys\"},{\"propertyName\":\"qsgnzxojpsl\",\"value\":\"jgpliuf\"},{\"propertyName\":\"woyxqvapcohhou\",\"value\":\"pqojxcx\"}],\"serviceBinds\":[{\"name\":\"cgdz\",\"serviceId\":\"nr\"},{\"name\":\"cawetzqddt\",\"serviceId\":\"fljhznamtua\"},{\"name\":\"zwcjjncqtj\",\"serviceId\":\"izvg\"}]},\"id\":\"atzuuv\",\"name\":\"xngre\",\"type\":\"wggahttzlswvaj\"}") - .toObject(DotNetComponentInner.class); - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, model.componentType()); - Assertions.assertEquals("rx", model.configurations().get(0).propertyName()); - Assertions.assertEquals("sojklinhmdptys", model.configurations().get(0).value()); - Assertions.assertEquals("cgdz", model.serviceBinds().get(0).name()); - Assertions.assertEquals("nr", model.serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DotNetComponentInner model = new DotNetComponentInner().withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("rx").withValue("sojklinhmdptys"), - new DotNetComponentConfigurationProperty().withPropertyName("qsgnzxojpsl").withValue("jgpliuf"), - new DotNetComponentConfigurationProperty().withPropertyName("woyxqvapcohhou").withValue("pqojxcx"))) - .withServiceBinds(Arrays.asList(new DotNetComponentServiceBind().withName("cgdz").withServiceId("nr"), - new DotNetComponentServiceBind().withName("cawetzqddt").withServiceId("fljhznamtua"), - new DotNetComponentServiceBind().withName("zwcjjncqtj").withServiceId("izvg"))); - model = BinaryData.fromObject(model).toObject(DotNetComponentInner.class); - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, model.componentType()); - Assertions.assertEquals("rx", model.configurations().get(0).propertyName()); - Assertions.assertEquals("sojklinhmdptys", model.configurations().get(0).value()); - Assertions.assertEquals("cgdz", model.serviceBinds().get(0).name()); - Assertions.assertEquals("nr", model.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentPropertiesTests.java deleted file mode 100644 index 813190824ddf..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentPropertiesTests.java +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentProperties; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DotNetComponentPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DotNetComponentProperties model = BinaryData.fromString( - "{\"componentType\":\"AspireResourceServerApi\",\"provisioningState\":\"Succeeded\",\"configurations\":[{\"propertyName\":\"qzasunwqrjzfrgqh\",\"value\":\"hcmbuocnjrohmbp\"},{\"propertyName\":\"yx\",\"value\":\"eblydyv\"}],\"serviceBinds\":[{\"name\":\"rocxnehvs\",\"serviceId\":\"odlfpyapucygvo\"},{\"name\":\"yunssx\",\"serviceId\":\"hi\"}]}") - .toObject(DotNetComponentProperties.class); - Assertions.assertEquals(DotNetComponentType.ASPIRE_RESOURCE_SERVER_API, model.componentType()); - Assertions.assertEquals("qzasunwqrjzfrgqh", model.configurations().get(0).propertyName()); - Assertions.assertEquals("hcmbuocnjrohmbp", model.configurations().get(0).value()); - Assertions.assertEquals("rocxnehvs", model.serviceBinds().get(0).name()); - Assertions.assertEquals("odlfpyapucygvo", model.serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DotNetComponentProperties model = new DotNetComponentProperties() - .withComponentType(DotNetComponentType.ASPIRE_RESOURCE_SERVER_API) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("qzasunwqrjzfrgqh") - .withValue("hcmbuocnjrohmbp"), - new DotNetComponentConfigurationProperty().withPropertyName("yx").withValue("eblydyv"))) - .withServiceBinds( - Arrays.asList(new DotNetComponentServiceBind().withName("rocxnehvs").withServiceId("odlfpyapucygvo"), - new DotNetComponentServiceBind().withName("yunssx").withServiceId("hi"))); - model = BinaryData.fromObject(model).toObject(DotNetComponentProperties.class); - Assertions.assertEquals(DotNetComponentType.ASPIRE_RESOURCE_SERVER_API, model.componentType()); - Assertions.assertEquals("qzasunwqrjzfrgqh", model.configurations().get(0).propertyName()); - Assertions.assertEquals("hcmbuocnjrohmbp", model.configurations().get(0).value()); - Assertions.assertEquals("rocxnehvs", model.serviceBinds().get(0).name()); - Assertions.assertEquals("odlfpyapucygvo", model.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentServiceBindTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentServiceBindTests.java deleted file mode 100644 index c988c2e53267..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentServiceBindTests.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.DotNetComponentServiceBind; -import org.junit.jupiter.api.Assertions; - -public final class DotNetComponentServiceBindTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DotNetComponentServiceBind model = BinaryData.fromString("{\"name\":\"qipir\",\"serviceId\":\"wrq\"}") - .toObject(DotNetComponentServiceBind.class); - Assertions.assertEquals("qipir", model.name()); - Assertions.assertEquals("wrq", model.serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DotNetComponentServiceBind model = new DotNetComponentServiceBind().withName("qipir").withServiceId("wrq"); - model = BinaryData.fromObject(model).toObject(DotNetComponentServiceBind.class); - Assertions.assertEquals("qipir", model.name()); - Assertions.assertEquals("wrq", model.serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCollectionTests.java deleted file mode 100644 index b7bb2687921e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCollectionTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentsCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DotNetComponentsCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DotNetComponentsCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"Succeeded\",\"configurations\":[{\"propertyName\":\"xigdhxiidlope\",\"value\":\"wdpyq\"}],\"serviceBinds\":[{\"name\":\"ubmdnafcbqwre\",\"serviceId\":\"ela\"},{\"name\":\"cigeleohdbvqvw\",\"serviceId\":\"jopwbeonrlkwz\"}]},\"id\":\"ybxc\",\"name\":\"akxcptsoqfyiaseq\",\"type\":\"hkrttzrazis\"}],\"nextLink\":\"kiuemv\"}") - .toObject(DotNetComponentsCollection.class); - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, model.value().get(0).componentType()); - Assertions.assertEquals("xigdhxiidlope", model.value().get(0).configurations().get(0).propertyName()); - Assertions.assertEquals("wdpyq", model.value().get(0).configurations().get(0).value()); - Assertions.assertEquals("ubmdnafcbqwre", model.value().get(0).serviceBinds().get(0).name()); - Assertions.assertEquals("ela", model.value().get(0).serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DotNetComponentsCollection model = new DotNetComponentsCollection() - .withValue(Arrays.asList(new DotNetComponentInner().withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("xigdhxiidlope").withValue("wdpyq"))) - .withServiceBinds( - Arrays.asList(new DotNetComponentServiceBind().withName("ubmdnafcbqwre").withServiceId("ela"), - new DotNetComponentServiceBind().withName("cigeleohdbvqvw").withServiceId("jopwbeonrlkwz"))))); - model = BinaryData.fromObject(model).toObject(DotNetComponentsCollection.class); - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, model.value().get(0).componentType()); - Assertions.assertEquals("xigdhxiidlope", model.value().get(0).configurations().get(0).propertyName()); - Assertions.assertEquals("wdpyq", model.value().get(0).configurations().get(0).value()); - Assertions.assertEquals("ubmdnafcbqwre", model.value().get(0).serviceBinds().get(0).name()); - Assertions.assertEquals("ela", model.value().get(0).serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateMockTests.java deleted file mode 100644 index eaca56b8abc3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.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.DotNetComponent; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -import java.nio.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 DotNetComponentsCreateOrUpdateMockTests { - @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\":{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"Succeeded\",\"configurations\":[{\"propertyName\":\"qbbewfcuqfpyyxm\",\"value\":\"mtmvwituwey\"}],\"serviceBinds\":[{\"name\":\"cybwfuppoxprcm\",\"serviceId\":\"uujxdii\"},{\"name\":\"oxrezsvavlrxik\",\"serviceId\":\"oywlunpipcwyb\"},{\"name\":\"fncn\",\"serviceId\":\"tpf\"}]},\"id\":\"aebwfwhxorpwa\",\"name\":\"tzwugexojfccy\",\"type\":\"h\"}"; - - 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)); - - DotNetComponent response = manager.dotNetComponents().define("bibiwks") - .withExistingManagedEnvironment("ajqzj", "alec").withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) - .withConfigurations(Arrays.asList( - new DotNetComponentConfigurationProperty().withPropertyName("zvoikvntwczf").withValue("ushlcxpblalh"), - new DotNetComponentConfigurationProperty().withPropertyName("zpfkis").withValue("idqzsaaoqdsgpto"), - new DotNetComponentConfigurationProperty().withPropertyName("jq").withValue("afcnlrtb"), - new DotNetComponentConfigurationProperty().withPropertyName("jzzca").withValue("jolb"))) - .withServiceBinds( - Arrays.asList(new DotNetComponentServiceBind().withName("twieopexelxqdwr").withServiceId("yil"), - new DotNetComponentServiceBind().withName("ibkgxyxyau").withServiceId("eddobmcnltm"), - new DotNetComponentServiceBind().withName("tkujsqycm").withServiceId("xfabl"), - new DotNetComponentServiceBind().withName("pwbmwhria").withServiceId("wrycgnwpl"))) - .create(); - - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, response.componentType()); - Assertions.assertEquals("qbbewfcuqfpyyxm", response.configurations().get(0).propertyName()); - Assertions.assertEquals("mtmvwituwey", response.configurations().get(0).value()); - Assertions.assertEquals("cybwfuppoxprcm", response.serviceBinds().get(0).name()); - Assertions.assertEquals("uujxdii", response.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetWithResponseMockTests.java deleted file mode 100644 index 61d5b7692e8a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetWithResponseMockTests.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 com.azure.resourcemanager.appcontainers.models.DotNetComponent; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -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 DotNetComponentsGetWithResponseMockTests { - @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\":{\"componentType\":\"AspireResourceServerApi\",\"provisioningState\":\"Deleting\",\"configurations\":[{\"propertyName\":\"oxinunjlzkdr\",\"value\":\"qsxytqqtcmiw\"},{\"propertyName\":\"is\",\"value\":\"mey\"}],\"serviceBinds\":[{\"name\":\"m\",\"serviceId\":\"jyh\"},{\"name\":\"p\",\"serviceId\":\"rryklleynqan\"}]},\"id\":\"igglclwalhvub\",\"name\":\"gzphetxd\",\"type\":\"cmyc\"}"; - - 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)); - - DotNetComponent response = manager.dotNetComponents() - .getWithResponse("zlhhfix", "cfculzj", "mhpfywvy", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals(DotNetComponentType.ASPIRE_RESOURCE_SERVER_API, response.componentType()); - Assertions.assertEquals("oxinunjlzkdr", response.configurations().get(0).propertyName()); - Assertions.assertEquals("qsxytqqtcmiw", response.configurations().get(0).value()); - Assertions.assertEquals("m", response.serviceBinds().get(0).name()); - Assertions.assertEquals("jyh", response.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListMockTests.java deleted file mode 100644 index 63366437f67a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.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.DotNetComponent; -import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; -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 DotNetComponentsListMockTests { - @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\":[{\"properties\":{\"componentType\":\"AspireDashboard\",\"provisioningState\":\"Canceled\",\"configurations\":[{\"propertyName\":\"ixyqhfnkvy\",\"value\":\"qqdseipnquwzxhrp\"},{\"propertyName\":\"odlhkfktl\",\"value\":\"dsobjopnouhbq\"},{\"propertyName\":\"kqxs\",\"value\":\"uzyigfcvcewbwqhd\"}],\"serviceBinds\":[{\"name\":\"atm\",\"serviceId\":\"c\"},{\"name\":\"zdfsqxhyqmr\",\"serviceId\":\"parn\"}]},\"id\":\"grszrbwtdrcwg\",\"name\":\"w\",\"type\":\"l\"}]}"; - - 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.dotNetComponents().list("ceov", "gzwhsxyrujmtik", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(DotNetComponentType.ASPIRE_DASHBOARD, response.iterator().next().componentType()); - Assertions.assertEquals("ixyqhfnkvy", response.iterator().next().configurations().get(0).propertyName()); - Assertions.assertEquals("qqdseipnquwzxhrp", response.iterator().next().configurations().get(0).value()); - Assertions.assertEquals("atm", response.iterator().next().serviceBinds().get(0).name()); - Assertions.assertEquals("c", response.iterator().next().serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentVariableTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentVariableTests.java deleted file mode 100644 index e1434bf5a7d4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentVariableTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVariable; -import org.junit.jupiter.api.Assertions; - -public final class EnvironmentVariableTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - EnvironmentVariable model = BinaryData.fromString("{\"name\":\"szdtmhrkwof\",\"value\":\"yvoqa\"}") - .toObject(EnvironmentVariable.class); - Assertions.assertEquals("szdtmhrkwof", model.name()); - Assertions.assertEquals("yvoqa", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - EnvironmentVariable model = new EnvironmentVariable().withName("szdtmhrkwof").withValue("yvoqa"); - model = BinaryData.fromObject(model).toObject(EnvironmentVariable.class); - Assertions.assertEquals("szdtmhrkwof", model.name()); - Assertions.assertEquals("yvoqa", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.java deleted file mode 100644 index 2ef2ffb9678a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import org.junit.jupiter.api.Assertions; - -public final class ExtendedLocationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtendedLocation model = BinaryData.fromString("{\"name\":\"gsyocogj\",\"type\":\"CustomLocation\"}") - .toObject(ExtendedLocation.class); - Assertions.assertEquals("gsyocogj", model.name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExtendedLocation model - = new ExtendedLocation().withName("gsyocogj").withType(ExtendedLocationTypes.CUSTOM_LOCATION); - model = BinaryData.fromObject(model).toObject(ExtendedLocation.class); - Assertions.assertEquals("gsyocogj", 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 f181e726332b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ForwardProxyTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ForwardProxy; -import com.azure.resourcemanager.appcontainers.models.ForwardProxyConvention; -import org.junit.jupiter.api.Assertions; - -public final class ForwardProxyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ForwardProxy model = BinaryData.fromString( - "{\"convention\":\"Custom\",\"customHostHeaderName\":\"yfsoppu\",\"customProtoHeaderName\":\"esnzwde\"}") - .toObject(ForwardProxy.class); - Assertions.assertEquals(ForwardProxyConvention.CUSTOM, model.convention()); - Assertions.assertEquals("yfsoppu", model.customHostHeaderName()); - Assertions.assertEquals("esnzwde", model.customProtoHeaderName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ForwardProxy model = new ForwardProxy().withConvention(ForwardProxyConvention.CUSTOM) - .withCustomHostHeaderName("yfsoppu").withCustomProtoHeaderName("esnzwde"); - model = BinaryData.fromObject(model).toObject(ForwardProxy.class); - Assertions.assertEquals(ForwardProxyConvention.CUSTOM, model.convention()); - Assertions.assertEquals("yfsoppu", model.customHostHeaderName()); - Assertions.assertEquals("esnzwde", 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 110f45d9daee..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GlobalValidationTests.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.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\":\"RedirectToLoginPage\",\"redirectToProvider\":\"rkujy\",\"excludedPaths\":[\"eju\"]}") - .toObject(GlobalValidation.class); - Assertions.assertEquals(UnauthenticatedClientActionV2.REDIRECT_TO_LOGIN_PAGE, - model.unauthenticatedClientAction()); - Assertions.assertEquals("rkujy", model.redirectToProvider()); - Assertions.assertEquals("eju", model.excludedPaths().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GlobalValidation model = new GlobalValidation() - .withUnauthenticatedClientAction(UnauthenticatedClientActionV2.REDIRECT_TO_LOGIN_PAGE) - .withRedirectToProvider("rkujy").withExcludedPaths(Arrays.asList("eju")); - model = BinaryData.fromObject(model).toObject(GlobalValidation.class); - Assertions.assertEquals(UnauthenticatedClientActionV2.REDIRECT_TO_LOGIN_PAGE, - model.unauthenticatedClientAction()); - Assertions.assertEquals("rkujy", model.redirectToProvider()); - Assertions.assertEquals("eju", model.excludedPaths().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchMatchTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchMatchTests.java deleted file mode 100644 index 515a6c0da528..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchMatchTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.HeaderMatchMatch; -import org.junit.jupiter.api.Assertions; - -public final class HeaderMatchMatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HeaderMatchMatch model = BinaryData.fromString( - "{\"exactMatch\":\"wjzrnfygxgisp\",\"prefixMatch\":\"vtz\",\"suffixMatch\":\"ufubl\",\"regexMatch\":\"fxqeof\"}") - .toObject(HeaderMatchMatch.class); - Assertions.assertEquals("wjzrnfygxgisp", model.exactMatch()); - Assertions.assertEquals("vtz", model.prefixMatch()); - Assertions.assertEquals("ufubl", model.suffixMatch()); - Assertions.assertEquals("fxqeof", model.regexMatch()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HeaderMatchMatch model = new HeaderMatchMatch().withExactMatch("wjzrnfygxgisp").withPrefixMatch("vtz") - .withSuffixMatch("ufubl").withRegexMatch("fxqeof"); - model = BinaryData.fromObject(model).toObject(HeaderMatchMatch.class); - Assertions.assertEquals("wjzrnfygxgisp", model.exactMatch()); - Assertions.assertEquals("vtz", model.prefixMatch()); - Assertions.assertEquals("ufubl", model.suffixMatch()); - Assertions.assertEquals("fxqeof", model.regexMatch()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchTests.java deleted file mode 100644 index 4e1a115aee8d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HeaderMatchTests.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.HeaderMatch; -import org.junit.jupiter.api.Assertions; - -public final class HeaderMatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HeaderMatch model = BinaryData.fromString( - "{\"header\":\"uybbkpodep\",\"match\":{\"exactMatch\":\"inuvamiheogn\",\"prefixMatch\":\"xzxtheo\",\"suffixMatch\":\"si\",\"regexMatch\":\"evcciqihnhun\"}}") - .toObject(HeaderMatch.class); - Assertions.assertEquals("uybbkpodep", model.headerProperty()); - Assertions.assertEquals("inuvamiheogn", model.exactMatch()); - Assertions.assertEquals("xzxtheo", model.prefixMatch()); - Assertions.assertEquals("si", model.suffixMatch()); - Assertions.assertEquals("evcciqihnhun", model.regexMatch()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HeaderMatch model = new HeaderMatch().withHeaderProperty("uybbkpodep").withExactMatch("inuvamiheogn") - .withPrefixMatch("xzxtheo").withSuffixMatch("si").withRegexMatch("evcciqihnhun"); - model = BinaryData.fromObject(model).toObject(HeaderMatch.class); - Assertions.assertEquals("uybbkpodep", model.headerProperty()); - Assertions.assertEquals("inuvamiheogn", model.exactMatch()); - Assertions.assertEquals("xzxtheo", model.prefixMatch()); - Assertions.assertEquals("si", model.suffixMatch()); - Assertions.assertEquals("evcciqihnhun", model.regexMatch()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpConnectionPoolTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpConnectionPoolTests.java deleted file mode 100644 index 5662a4ebc19c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpConnectionPoolTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.HttpConnectionPool; -import org.junit.jupiter.api.Assertions; - -public final class HttpConnectionPoolTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HttpConnectionPool model - = BinaryData.fromString("{\"http1MaxPendingRequests\":5903092,\"http2MaxRequests\":1154409847}") - .toObject(HttpConnectionPool.class); - Assertions.assertEquals(5903092, model.http1MaxPendingRequests()); - Assertions.assertEquals(1154409847, model.http2MaxRequests()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpConnectionPool model - = new HttpConnectionPool().withHttp1MaxPendingRequests(5903092).withHttp2MaxRequests(1154409847); - model = BinaryData.fromObject(model).toObject(HttpConnectionPool.class); - Assertions.assertEquals(5903092, model.http1MaxPendingRequests()); - Assertions.assertEquals(1154409847, model.http2MaxRequests()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpGetTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpGetTests.java deleted file mode 100644 index a6cf972503e0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpGetTests.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.HttpGet; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class HttpGetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HttpGet model = BinaryData - .fromString( - "{\"url\":\"auvfbtkuwhhmhyk\",\"fileName\":\"oxafn\",\"headers\":[\"pichkoymkcdy\",\"bpkkpwdre\"]}") - .toObject(HttpGet.class); - Assertions.assertEquals("auvfbtkuwhhmhyk", model.url()); - Assertions.assertEquals("oxafn", model.fileName()); - Assertions.assertEquals("pichkoymkcdy", model.headers().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpGet model = new HttpGet().withUrl("auvfbtkuwhhmhyk").withFileName("oxafn") - .withHeaders(Arrays.asList("pichkoymkcdy", "bpkkpwdre")); - model = BinaryData.fromObject(model).toObject(HttpGet.class); - Assertions.assertEquals("auvfbtkuwhhmhyk", model.url()); - Assertions.assertEquals("oxafn", model.fileName()); - Assertions.assertEquals("pichkoymkcdy", model.headers().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpRetryPolicyRetryBackOffTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpRetryPolicyRetryBackOffTests.java deleted file mode 100644 index 42af511c7a7a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpRetryPolicyRetryBackOffTests.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.HttpRetryPolicyRetryBackOff; -import org.junit.jupiter.api.Assertions; - -public final class HttpRetryPolicyRetryBackOffTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HttpRetryPolicyRetryBackOff model = BinaryData.fromString( - "{\"initialDelayInMilliseconds\":2232295730634911769,\"maxIntervalInMilliseconds\":8368000594620652423}") - .toObject(HttpRetryPolicyRetryBackOff.class); - Assertions.assertEquals(2232295730634911769L, model.initialDelayInMilliseconds()); - Assertions.assertEquals(8368000594620652423L, model.maxIntervalInMilliseconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpRetryPolicyRetryBackOff model = new HttpRetryPolicyRetryBackOff() - .withInitialDelayInMilliseconds(2232295730634911769L).withMaxIntervalInMilliseconds(8368000594620652423L); - model = BinaryData.fromObject(model).toObject(HttpRetryPolicyRetryBackOff.class); - Assertions.assertEquals(2232295730634911769L, model.initialDelayInMilliseconds()); - Assertions.assertEquals(8368000594620652423L, model.maxIntervalInMilliseconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.java deleted file mode 100644 index f55fbf7cff92..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.HttpSettingsRoutes; -import org.junit.jupiter.api.Assertions; - -public final class HttpSettingsRoutesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HttpSettingsRoutes model - = BinaryData.fromString("{\"apiPrefix\":\"gacftadeh\"}").toObject(HttpSettingsRoutes.class); - Assertions.assertEquals("gacftadeh", model.apiPrefix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpSettingsRoutes model = new HttpSettingsRoutes().withApiPrefix("gacftadeh"); - model = BinaryData.fromObject(model).toObject(HttpSettingsRoutes.class); - Assertions.assertEquals("gacftadeh", 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 7d131968d937..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsTests.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.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\":\"jzzvdud\"},\"forwardProxy\":{\"convention\":\"NoProxy\",\"customHostHeaderName\":\"fhotw\",\"customProtoHeaderName\":\"ynpwlbj\"}}") - .toObject(HttpSettings.class); - Assertions.assertEquals(false, model.requireHttps()); - Assertions.assertEquals("jzzvdud", model.routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.forwardProxy().convention()); - Assertions.assertEquals("fhotw", model.forwardProxy().customHostHeaderName()); - Assertions.assertEquals("ynpwlbj", model.forwardProxy().customProtoHeaderName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpSettings model - = new HttpSettings().withRequireHttps(false).withRoutes(new HttpSettingsRoutes().withApiPrefix("jzzvdud")) - .withForwardProxy(new ForwardProxy().withConvention(ForwardProxyConvention.NO_PROXY) - .withCustomHostHeaderName("fhotw").withCustomProtoHeaderName("ynpwlbj")); - model = BinaryData.fromObject(model).toObject(HttpSettings.class); - Assertions.assertEquals(false, model.requireHttps()); - Assertions.assertEquals("jzzvdud", model.routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.forwardProxy().convention()); - Assertions.assertEquals("fhotw", model.forwardProxy().customHostHeaderName()); - Assertions.assertEquals("ynpwlbj", model.forwardProxy().customProtoHeaderName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressPortMappingTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressPortMappingTests.java deleted file mode 100644 index 71de6b53f387..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressPortMappingTests.java +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.IngressPortMapping; -import org.junit.jupiter.api.Assertions; - -public final class IngressPortMappingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IngressPortMapping model - = BinaryData.fromString("{\"external\":true,\"targetPort\":2060980520,\"exposedPort\":200260047}") - .toObject(IngressPortMapping.class); - Assertions.assertEquals(true, model.external()); - Assertions.assertEquals(2060980520, model.targetPort()); - Assertions.assertEquals(200260047, model.exposedPort()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IngressPortMapping model - = new IngressPortMapping().withExternal(true).withTargetPort(2060980520).withExposedPort(200260047); - model = BinaryData.fromObject(model).toObject(IngressPortMapping.class); - Assertions.assertEquals(true, model.external()); - Assertions.assertEquals(2060980520, model.targetPort()); - Assertions.assertEquals(200260047, model.exposedPort()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressStickySessionsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressStickySessionsTests.java deleted file mode 100644 index f5793c8ace6b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressStickySessionsTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Affinity; -import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; -import org.junit.jupiter.api.Assertions; - -public final class IngressStickySessionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IngressStickySessions model - = BinaryData.fromString("{\"affinity\":\"none\"}").toObject(IngressStickySessions.class); - Assertions.assertEquals(Affinity.NONE, model.affinity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IngressStickySessions model = new IngressStickySessions().withAffinity(Affinity.NONE); - model = BinaryData.fromObject(model).toObject(IngressStickySessions.class); - Assertions.assertEquals(Affinity.NONE, model.affinity()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.java deleted file mode 100644 index 468f27b140ff..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.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.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\":\"lfzxiavrmbzonoki\",\"description\":\"jq\",\"ipAddressRange\":\"irgzp\",\"action\":\"Deny\"}") - .toObject(IpSecurityRestrictionRule.class); - Assertions.assertEquals("lfzxiavrmbzonoki", model.name()); - Assertions.assertEquals("jq", model.description()); - Assertions.assertEquals("irgzp", model.ipAddressRange()); - Assertions.assertEquals(Action.DENY, model.action()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpSecurityRestrictionRule model = new IpSecurityRestrictionRule().withName("lfzxiavrmbzonoki") - .withDescription("jq").withIpAddressRange("irgzp").withAction(Action.DENY); - model = BinaryData.fromObject(model).toObject(IpSecurityRestrictionRule.class); - Assertions.assertEquals("lfzxiavrmbzonoki", model.name()); - Assertions.assertEquals("jq", model.description()); - Assertions.assertEquals("irgzp", model.ipAddressRange()); - Assertions.assertEquals(Action.DENY, model.action()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentConfigurationPropertyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentConfigurationPropertyTests.java deleted file mode 100644 index 08a4978c304c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentConfigurationPropertyTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import org.junit.jupiter.api.Assertions; - -public final class JavaComponentConfigurationPropertyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JavaComponentConfigurationProperty model - = BinaryData.fromString("{\"propertyName\":\"ltn\",\"value\":\"dhqoawj\"}") - .toObject(JavaComponentConfigurationProperty.class); - Assertions.assertEquals("ltn", model.propertyName()); - Assertions.assertEquals("dhqoawj", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JavaComponentConfigurationProperty model - = new JavaComponentConfigurationProperty().withPropertyName("ltn").withValue("dhqoawj"); - model = BinaryData.fromObject(model).toObject(JavaComponentConfigurationProperty.class); - Assertions.assertEquals("ltn", model.propertyName()); - Assertions.assertEquals("dhqoawj", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentInnerTests.java deleted file mode 100644 index 3a1c3198ceca..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentInnerTests.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.fluent.models.JavaComponentInner; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class JavaComponentInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JavaComponentInner model = BinaryData.fromString( - "{\"properties\":{\"componentType\":\"SpringBootAdmin\",\"provisioningState\":\"Canceled\",\"configurations\":[{\"propertyName\":\"p\",\"value\":\"kdqzrdzsylo\"}],\"serviceBinds\":[{\"name\":\"rc\",\"serviceId\":\"ydmxzj\"},{\"name\":\"p\",\"serviceId\":\"aurkihcirlde\"},{\"name\":\"rdcoxnbkkj\",\"serviceId\":\"urnnqbnqbpiz\"},{\"name\":\"ltgrdogypxrxv\",\"serviceId\":\"ihwuhvctafsrbxrb\"}]},\"id\":\"li\",\"name\":\"wxihs\",\"type\":\"nxw\"}") - .toObject(JavaComponentInner.class); - Assertions.assertEquals(JavaComponentType.SPRING_BOOT_ADMIN, model.componentType()); - Assertions.assertEquals("p", model.configurations().get(0).propertyName()); - Assertions.assertEquals("kdqzrdzsylo", model.configurations().get(0).value()); - Assertions.assertEquals("rc", model.serviceBinds().get(0).name()); - Assertions.assertEquals("ydmxzj", model.serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JavaComponentInner model = new JavaComponentInner().withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) - .withConfigurations( - Arrays.asList(new JavaComponentConfigurationProperty().withPropertyName("p").withValue("kdqzrdzsylo"))) - .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("rc").withServiceId("ydmxzj"), - new JavaComponentServiceBind().withName("p").withServiceId("aurkihcirlde"), - new JavaComponentServiceBind().withName("rdcoxnbkkj").withServiceId("urnnqbnqbpiz"), - new JavaComponentServiceBind().withName("ltgrdogypxrxv").withServiceId("ihwuhvctafsrbxrb"))); - model = BinaryData.fromObject(model).toObject(JavaComponentInner.class); - Assertions.assertEquals(JavaComponentType.SPRING_BOOT_ADMIN, model.componentType()); - Assertions.assertEquals("p", model.configurations().get(0).propertyName()); - Assertions.assertEquals("kdqzrdzsylo", model.configurations().get(0).value()); - Assertions.assertEquals("rc", model.serviceBinds().get(0).name()); - Assertions.assertEquals("ydmxzj", model.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentPropertiesTests.java deleted file mode 100644 index a72e3d59057f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentPropertiesTests.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.fluent.models.JavaComponentProperties; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class JavaComponentPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JavaComponentProperties model = BinaryData.fromString( - "{\"componentType\":\"SpringCloudConfig\",\"provisioningState\":\"Succeeded\",\"configurations\":[{\"propertyName\":\"aklsbsbq\",\"value\":\"agwwrxaom\"}],\"serviceBinds\":[{\"name\":\"lrrcz\",\"serviceId\":\"k\"}]}") - .toObject(JavaComponentProperties.class); - Assertions.assertEquals(JavaComponentType.SPRING_CLOUD_CONFIG, model.componentType()); - Assertions.assertEquals("aklsbsbq", model.configurations().get(0).propertyName()); - Assertions.assertEquals("agwwrxaom", model.configurations().get(0).value()); - Assertions.assertEquals("lrrcz", model.serviceBinds().get(0).name()); - Assertions.assertEquals("k", model.serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JavaComponentProperties model - = new JavaComponentProperties().withComponentType(JavaComponentType.SPRING_CLOUD_CONFIG) - .withConfigurations(Arrays.asList( - new JavaComponentConfigurationProperty().withPropertyName("aklsbsbq").withValue("agwwrxaom"))) - .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("lrrcz").withServiceId("k"))); - model = BinaryData.fromObject(model).toObject(JavaComponentProperties.class); - Assertions.assertEquals(JavaComponentType.SPRING_CLOUD_CONFIG, model.componentType()); - Assertions.assertEquals("aklsbsbq", model.configurations().get(0).propertyName()); - Assertions.assertEquals("agwwrxaom", model.configurations().get(0).value()); - Assertions.assertEquals("lrrcz", model.serviceBinds().get(0).name()); - Assertions.assertEquals("k", model.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentServiceBindTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentServiceBindTests.java deleted file mode 100644 index 218d76e5d695..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentServiceBindTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import org.junit.jupiter.api.Assertions; - -public final class JavaComponentServiceBindTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JavaComponentServiceBind model = BinaryData.fromString("{\"name\":\"yueayfbpcmsp\",\"serviceId\":\"yrrueqth\"}") - .toObject(JavaComponentServiceBind.class); - Assertions.assertEquals("yueayfbpcmsp", model.name()); - Assertions.assertEquals("yrrueqth", model.serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JavaComponentServiceBind model - = new JavaComponentServiceBind().withName("yueayfbpcmsp").withServiceId("yrrueqth"); - model = BinaryData.fromObject(model).toObject(JavaComponentServiceBind.class); - Assertions.assertEquals("yueayfbpcmsp", model.name()); - Assertions.assertEquals("yrrueqth", model.serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCollectionTests.java deleted file mode 100644 index 3b76ca16ca1b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCollectionTests.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.JavaComponentInner; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; -import com.azure.resourcemanager.appcontainers.models.JavaComponentsCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class JavaComponentsCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JavaComponentsCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"componentType\":\"SpringBootAdmin\",\"provisioningState\":\"Failed\",\"configurations\":[{\"propertyName\":\"jwuive\",\"value\":\"cgyee\"}],\"serviceBinds\":[{\"name\":\"qbpsmg\",\"serviceId\":\"guamlj\"}]},\"id\":\"rgmsplzga\",\"name\":\"fcshh\",\"type\":\"new\"},{\"properties\":{\"componentType\":\"SpringCloudConfig\",\"provisioningState\":\"Succeeded\",\"configurations\":[{\"propertyName\":\"nxrjkixtwbtaoy\",\"value\":\"yghs\"}],\"serviceBinds\":[{\"name\":\"lhkgmnsghp\",\"serviceId\":\"cphdrwjjkhvyo\"}]},\"id\":\"c\",\"name\":\"u\",\"type\":\"vxnqmhrpqpd\"}],\"nextLink\":\"mkoisqcssf\"}") - .toObject(JavaComponentsCollection.class); - Assertions.assertEquals(JavaComponentType.SPRING_BOOT_ADMIN, model.value().get(0).componentType()); - Assertions.assertEquals("jwuive", model.value().get(0).configurations().get(0).propertyName()); - Assertions.assertEquals("cgyee", model.value().get(0).configurations().get(0).value()); - Assertions.assertEquals("qbpsmg", model.value().get(0).serviceBinds().get(0).name()); - Assertions.assertEquals("guamlj", model.value().get(0).serviceBinds().get(0).serviceId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JavaComponentsCollection model - = new JavaComponentsCollection() - .withValue( - Arrays - .asList( - new JavaComponentInner().withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) - .withConfigurations(Arrays.asList(new JavaComponentConfigurationProperty() - .withPropertyName("jwuive").withValue("cgyee"))) - .withServiceBinds(Arrays - .asList(new JavaComponentServiceBind().withName("qbpsmg").withServiceId("guamlj"))), - new JavaComponentInner().withComponentType(JavaComponentType.SPRING_CLOUD_CONFIG) - .withConfigurations(Arrays.asList(new JavaComponentConfigurationProperty() - .withPropertyName("nxrjkixtwbtaoy").withValue("yghs"))) - .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("lhkgmnsghp") - .withServiceId("cphdrwjjkhvyo"))))); - model = BinaryData.fromObject(model).toObject(JavaComponentsCollection.class); - Assertions.assertEquals(JavaComponentType.SPRING_BOOT_ADMIN, model.value().get(0).componentType()); - Assertions.assertEquals("jwuive", model.value().get(0).configurations().get(0).propertyName()); - Assertions.assertEquals("cgyee", model.value().get(0).configurations().get(0).value()); - Assertions.assertEquals("qbpsmg", model.value().get(0).serviceBinds().get(0).name()); - Assertions.assertEquals("guamlj", model.value().get(0).serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateMockTests.java deleted file mode 100644 index 746ef359e6b3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.JavaComponent; -import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; -import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; -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 JavaComponentsCreateOrUpdateMockTests { - @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\":{\"componentType\":\"SpringCloudEureka\",\"provisioningState\":\"Succeeded\",\"configurations\":[{\"propertyName\":\"wmmkfq\",\"value\":\"iqulwwtrjmeq\"},{\"propertyName\":\"yhzok\",\"value\":\"yuoh\"},{\"propertyName\":\"nsnaajphmp\",\"value\":\"jnglpwsad\"},{\"propertyName\":\"jsumxpezcoio\",\"value\":\"rmfqzwq\"}],\"serviceBinds\":[{\"name\":\"eedcnwmywx\",\"serviceId\":\"zkvemy\"},{\"name\":\"pczaqpqif\",\"serviceId\":\"m\"},{\"name\":\"rwtx\",\"serviceId\":\"isamonatniz\"}]},\"id\":\"r\",\"name\":\"qsqjghrmthsplwst\",\"type\":\"xsrgxfqpan\"}"; - - 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)); - - JavaComponent response = manager.javaComponents().define("tpjfojiunrlshxuk") - .withExistingManagedEnvironment("misvpztd", "vykpxkqe") - .withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) - .withConfigurations( - Arrays.asList(new JavaComponentConfigurationProperty().withPropertyName("oancdrco").withValue("vx"), - new JavaComponentConfigurationProperty().withPropertyName("dxonckbn").withValue("lfxlupibaqzizxzp"), - new JavaComponentConfigurationProperty().withPropertyName("eghlw").withValue("ogvgfklqiyn"), - new JavaComponentConfigurationProperty().withPropertyName("eqelsb").withValue("dstrkzxsgtz"))) - .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("rds").withServiceId("vpimyndnoxa"), - new JavaComponentServiceBind().withName("rqaqotn").withServiceId("xolousdv"), - new JavaComponentServiceBind().withName("ptqmawzjdrpiz").withServiceId("l"))) - .create(); - - Assertions.assertEquals(JavaComponentType.SPRING_CLOUD_EUREKA, response.componentType()); - Assertions.assertEquals("wmmkfq", response.configurations().get(0).propertyName()); - Assertions.assertEquals("iqulwwtrjmeq", response.configurations().get(0).value()); - Assertions.assertEquals("eedcnwmywx", response.serviceBinds().get(0).name()); - Assertions.assertEquals("zkvemy", response.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetWithResponseMockTests.java deleted file mode 100644 index bf495efd54f7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetWithResponseMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.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.JavaComponent; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; -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 JavaComponentsGetWithResponseMockTests { - @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\":{\"componentType\":\"SpringCloudEureka\",\"provisioningState\":\"Canceled\",\"configurations\":[{\"propertyName\":\"sc\",\"value\":\"ydzjemexm\"},{\"propertyName\":\"kvmuwrxlniwmcp\",\"value\":\"rdlhvdvmiphbe\"},{\"propertyName\":\"qjzmhkdcl\",\"value\":\"roczfmuner\"}],\"serviceBinds\":[{\"name\":\"xzs\",\"serviceId\":\"zezbzu\"},{\"name\":\"dlevzskejcgw\",\"serviceId\":\"gqkstyecupyu\"},{\"name\":\"p\",\"serviceId\":\"davsjcfmazpz\"},{\"name\":\"wuzvcmcokxize\",\"serviceId\":\"vfrjwu\"}]},\"id\":\"o\",\"name\":\"zvajbvbnkrdem\",\"type\":\"idackzidgzwdyd\"}"; - - 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)); - - JavaComponent response = manager.javaComponents() - .getWithResponse("zqazvb", "arkptgongruatsyi", "sjqhenigbeqngu", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(JavaComponentType.SPRING_CLOUD_EUREKA, response.componentType()); - Assertions.assertEquals("sc", response.configurations().get(0).propertyName()); - Assertions.assertEquals("ydzjemexm", response.configurations().get(0).value()); - Assertions.assertEquals("xzs", response.serviceBinds().get(0).name()); - Assertions.assertEquals("zezbzu", response.serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListMockTests.java deleted file mode 100644 index b1d025f1f7e8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.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.JavaComponent; -import com.azure.resourcemanager.appcontainers.models.JavaComponentType; -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 JavaComponentsListMockTests { - @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\":[{\"properties\":{\"componentType\":\"SpringCloudConfig\",\"provisioningState\":\"InProgress\",\"configurations\":[{\"propertyName\":\"rshzzbgullcxiqqz\",\"value\":\"oxdu\"},{\"propertyName\":\"amglrouig\",\"value\":\"fivjqterdqqigdy\"}],\"serviceBinds\":[{\"name\":\"p\",\"serviceId\":\"rwqirvtktyhhmvf\"},{\"name\":\"apj\",\"serviceId\":\"odmkrrwepgqv\"},{\"name\":\"kqlujqgira\",\"serviceId\":\"lyvxchp\"}]},\"id\":\"ctsfaeuhwwsknst\",\"name\":\"zuzhasup\",\"type\":\"lppdpgz\"}]}"; - - 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.javaComponents().list("oq", "dedecfiwh", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(JavaComponentType.SPRING_CLOUD_CONFIG, response.iterator().next().componentType()); - Assertions.assertEquals("rshzzbgullcxiqqz", response.iterator().next().configurations().get(0).propertyName()); - Assertions.assertEquals("oxdu", response.iterator().next().configurations().get(0).value()); - Assertions.assertEquals("p", response.iterator().next().serviceBinds().get(0).name()); - Assertions.assertEquals("rwqirvtktyhhmvf", response.iterator().next().serviceBinds().get(0).serviceId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationManualTriggerConfigTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationManualTriggerConfigTests.java deleted file mode 100644 index d038c4d341ef..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationManualTriggerConfigTests.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.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\":666781891,\"parallelism\":385989453}") - .toObject(JobConfigurationManualTriggerConfig.class); - Assertions.assertEquals(666781891, model.replicaCompletionCount()); - Assertions.assertEquals(385989453, model.parallelism()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobConfigurationManualTriggerConfig model = new JobConfigurationManualTriggerConfig() - .withReplicaCompletionCount(666781891).withParallelism(385989453); - model = BinaryData.fromObject(model).toObject(JobConfigurationManualTriggerConfig.class); - Assertions.assertEquals(666781891, model.replicaCompletionCount()); - Assertions.assertEquals(385989453, 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 b510e6f962db..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationScheduleTriggerConfigTests.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.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\":530591598,\"cronExpression\":\"rds\",\"parallelism\":1544209565}") - .toObject(JobConfigurationScheduleTriggerConfig.class); - Assertions.assertEquals(530591598, model.replicaCompletionCount()); - Assertions.assertEquals("rds", model.cronExpression()); - Assertions.assertEquals(1544209565, model.parallelism()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobConfigurationScheduleTriggerConfig model = new JobConfigurationScheduleTriggerConfig() - .withReplicaCompletionCount(530591598).withCronExpression("rds").withParallelism(1544209565); - model = BinaryData.fromObject(model).toObject(JobConfigurationScheduleTriggerConfig.class); - Assertions.assertEquals(530591598, model.replicaCompletionCount()); - Assertions.assertEquals("rds", model.cronExpression()); - Assertions.assertEquals(1544209565, 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 a21e9edc9774..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionBaseInnerTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionBaseInner; -import org.junit.jupiter.api.Assertions; - -public final class JobExecutionBaseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobExecutionBaseInner model - = BinaryData.fromString("{\"name\":\"olvdnd\",\"id\":\"auo\"}").toObject(JobExecutionBaseInner.class); - Assertions.assertEquals("olvdnd", model.name()); - Assertions.assertEquals("auo", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobExecutionBaseInner model = new JobExecutionBaseInner().withName("olvdnd").withId("auo"); - model = BinaryData.fromObject(model).toObject(JobExecutionBaseInner.class); - Assertions.assertEquals("olvdnd", model.name()); - Assertions.assertEquals("auo", 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 6dd1b13a2971..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionInnerTests.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code 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.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVar; -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\":\"herngb\",\"id\":\"juahokqto\",\"type\":\"auxofshfph\",\"properties\":{\"status\":\"Unknown\",\"startTime\":\"2021-02-08T14:31:19Z\",\"endTime\":\"2021-11-07T16:30:06Z\",\"template\":{\"containers\":[{\"image\":\"ywhslwkojpllndnp\",\"name\":\"rpqaf\",\"command\":[\"gsnnf\"],\"args\":[\"tefypococtfjgti\"],\"env\":[{},{}],\"resources\":{\"cpu\":43.561702255466116,\"memory\":\"urmlmuo\",\"ephemeralStorage\":\"lbau\"}}],\"initContainers\":[{\"image\":\"ionszonwp\",\"name\":\"ajinnixjawrtmjfj\",\"command\":[\"cxlzhcoxovnekh\",\"nlusfnrd\",\"jxtxrdc\",\"tjvidt\"],\"args\":[\"puslvyj\"],\"env\":[{},{},{},{}],\"resources\":{\"cpu\":39.025050688905914,\"memory\":\"iziesfuughtuq\",\"ephemeralStorage\":\"cjxeygt\"}},{\"image\":\"xu\",\"name\":\"buew\",\"command\":[\"wnjlxu\"],\"args\":[\"wpusxjbaqehg\",\"dohzjq\"],\"env\":[{},{}],\"resources\":{\"cpu\":77.02751783750413,\"memory\":\"bxncnwfepbnw\",\"ephemeralStorage\":\"m\"}},{\"image\":\"gcgbjb\",\"name\":\"lfgtdysnaquflqbc\",\"command\":[\"amz\",\"rwd\",\"qzeqyjleziunjxdf\"],\"args\":[\"tkw\",\"eg\"],\"env\":[{},{}],\"resources\":{\"cpu\":57.4131663862715,\"memory\":\"qa\",\"ephemeralStorage\":\"jvpilguooqja\"}}]}}}") - .toObject(JobExecutionInner.class); - Assertions.assertEquals("herngb", model.name()); - Assertions.assertEquals("juahokqto", model.id()); - Assertions.assertEquals("auxofshfph", model.type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-08T14:31:19Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-07T16:30:06Z"), model.endTime()); - Assertions.assertEquals("ywhslwkojpllndnp", model.template().containers().get(0).image()); - Assertions.assertEquals("rpqaf", model.template().containers().get(0).name()); - Assertions.assertEquals("gsnnf", model.template().containers().get(0).command().get(0)); - Assertions.assertEquals("tefypococtfjgti", model.template().containers().get(0).args().get(0)); - Assertions.assertEquals(43.561702255466116D, model.template().containers().get(0).resources().cpu()); - Assertions.assertEquals("urmlmuo", model.template().containers().get(0).resources().memory()); - Assertions.assertEquals("ionszonwp", model.template().initContainers().get(0).image()); - Assertions.assertEquals("ajinnixjawrtmjfj", model.template().initContainers().get(0).name()); - Assertions.assertEquals("cxlzhcoxovnekh", model.template().initContainers().get(0).command().get(0)); - Assertions.assertEquals("puslvyj", model.template().initContainers().get(0).args().get(0)); - Assertions.assertEquals(39.025050688905914D, model.template().initContainers().get(0).resources().cpu()); - Assertions.assertEquals("iziesfuughtuq", model.template().initContainers().get(0).resources().memory()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobExecutionInner model - = new JobExecutionInner().withName("herngb").withId("juahokqto").withType("auxofshfph") - .withStartTime(OffsetDateTime.parse("2021-02-08T14:31:19Z")).withEndTime( - OffsetDateTime.parse("2021-11-07T16:30:06Z")) - .withTemplate( - new JobExecutionTemplate() - .withContainers( - Arrays.asList(new JobExecutionContainer().withImage("ywhslwkojpllndnp").withName("rpqaf") - .withCommand(Arrays.asList("gsnnf")).withArgs(Arrays.asList("tefypococtfjgti")) - .withEnv(Arrays.asList(new EnvironmentVar(), new EnvironmentVar())) - .withResources(new ContainerResources().withCpu(43.561702255466116D) - .withMemory("urmlmuo")))) - .withInitContainers(Arrays.asList( - new JobExecutionContainer().withImage("ionszonwp").withName("ajinnixjawrtmjfj") - .withCommand(Arrays.asList("cxlzhcoxovnekh", "nlusfnrd", "jxtxrdc", "tjvidt")) - .withArgs(Arrays.asList("puslvyj")) - .withEnv(Arrays.asList(new EnvironmentVar(), new EnvironmentVar(), new EnvironmentVar(), - new EnvironmentVar())) - .withResources( - new ContainerResources().withCpu(39.025050688905914D).withMemory("iziesfuughtuq")), - new JobExecutionContainer().withImage("xu").withName("buew") - .withCommand(Arrays.asList("wnjlxu")).withArgs(Arrays.asList("wpusxjbaqehg", "dohzjq")) - .withEnv(Arrays.asList(new EnvironmentVar(), new EnvironmentVar())).withResources( - new ContainerResources().withCpu(77.02751783750413D).withMemory("bxncnwfepbnw")), - new JobExecutionContainer().withImage("gcgbjb").withName("lfgtdysnaquflqbc") - .withCommand(Arrays.asList("amz", "rwd", "qzeqyjleziunjxdf")) - .withArgs(Arrays.asList("tkw", "eg")) - .withEnv(Arrays.asList(new EnvironmentVar(), new EnvironmentVar())) - .withResources(new ContainerResources().withCpu(57.4131663862715D).withMemory("qa"))))); - model = BinaryData.fromObject(model).toObject(JobExecutionInner.class); - Assertions.assertEquals("herngb", model.name()); - Assertions.assertEquals("juahokqto", model.id()); - Assertions.assertEquals("auxofshfph", model.type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-08T14:31:19Z"), model.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-07T16:30:06Z"), model.endTime()); - Assertions.assertEquals("ywhslwkojpllndnp", model.template().containers().get(0).image()); - Assertions.assertEquals("rpqaf", model.template().containers().get(0).name()); - Assertions.assertEquals("gsnnf", model.template().containers().get(0).command().get(0)); - Assertions.assertEquals("tefypococtfjgti", model.template().containers().get(0).args().get(0)); - Assertions.assertEquals(43.561702255466116D, model.template().containers().get(0).resources().cpu()); - Assertions.assertEquals("urmlmuo", model.template().containers().get(0).resources().memory()); - Assertions.assertEquals("ionszonwp", model.template().initContainers().get(0).image()); - Assertions.assertEquals("ajinnixjawrtmjfj", model.template().initContainers().get(0).name()); - Assertions.assertEquals("cxlzhcoxovnekh", model.template().initContainers().get(0).command().get(0)); - Assertions.assertEquals("puslvyj", model.template().initContainers().get(0).args().get(0)); - Assertions.assertEquals(39.025050688905914D, model.template().initContainers().get(0).resources().cpu()); - Assertions.assertEquals("iziesfuughtuq", model.template().initContainers().get(0).resources().memory()); - } -} 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 7c1ebb65d5d7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteMockTests.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.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("reyxelyicghf", "rufssjyg", 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 973a22a95154..000000000000 --- 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\":\"gnnbzrtf\",\"id\":\"dzuubjtvgjsxm\",\"type\":\"jjvavdpww\",\"properties\":{\"status\":\"Degraded\",\"startTime\":\"2021-08-09T18:08:13Z\",\"endTime\":\"2021-10-21T08:59:09Z\",\"template\":{\"containers\":[{\"image\":\"ofw\",\"name\":\"m\",\"command\":[\"cauwazcgwdfriwg\",\"bjpozokscvgllixd\",\"byfg\",\"ewqkjvxprwpxs\"],\"args\":[\"utxlcskltezu\"],\"env\":[{},{}],\"resources\":{}},{\"image\":\"lfb\",\"name\":\"dc\",\"command\":[\"srtmdylperpiltt\"],\"args\":[\"czfcmfpfbod\",\"tresr\"],\"env\":[{},{},{}],\"resources\":{}}],\"initContainers\":[{\"image\":\"ft\",\"name\":\"ivmuqkevzgjyp\",\"command\":[\"xmpdxxzetww\",\"jwotnxlkfhglhrf\"],\"args\":[\"wecr\"],\"env\":[{},{},{}],\"resources\":{}},{\"image\":\"selqxov\",\"name\":\"qibukklvzrl\",\"command\":[\"ccmetjsczivfqb\"],\"args\":[\"sdsyenzsie\",\"scplhyvd\",\"xlyzkxit\"],\"env\":[{},{},{},{}],\"resources\":{}},{\"image\":\"svkolru\",\"name\":\"ovmozsayebraz\",\"command\":[\"pzbtzuyk\",\"kipfsdyepf\",\"ocmbezacf\",\"ztgaz\"],\"args\":[\"ejgaaokct\"],\"env\":[{},{}],\"resources\":{}}]}}}]}"; - - 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("cy", "yzlwhbwzjnufzrf", "m", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("gnnbzrtf", response.iterator().next().name()); - Assertions.assertEquals("dzuubjtvgjsxm", response.iterator().next().id()); - Assertions.assertEquals("jjvavdpww", response.iterator().next().type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-09T18:08:13Z"), response.iterator().next().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-21T08:59:09Z"), response.iterator().next().endTime()); - Assertions.assertEquals("ofw", response.iterator().next().template().containers().get(0).image()); - Assertions.assertEquals("m", response.iterator().next().template().containers().get(0).name()); - Assertions.assertEquals("cauwazcgwdfriwg", - response.iterator().next().template().containers().get(0).command().get(0)); - Assertions.assertEquals("utxlcskltezu", - response.iterator().next().template().containers().get(0).args().get(0)); - Assertions.assertEquals("ft", response.iterator().next().template().initContainers().get(0).image()); - Assertions.assertEquals("ivmuqkevzgjyp", response.iterator().next().template().initContainers().get(0).name()); - Assertions.assertEquals("xmpdxxzetww", - response.iterator().next().template().initContainers().get(0).command().get(0)); - Assertions.assertEquals("wecr", response.iterator().next().template().initContainers().get(0).args().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorWithResponseMockTests.java deleted file mode 100644 index b6bcb58964d0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorWithResponseMockTests.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.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 JobsGetDetectorWithResponseMockTests { - @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\":\"hbuubpy\",\"name\":\"wtjoxz\",\"description\":\"wfqchvcz\",\"author\":\"j\",\"category\":\"cta\",\"supportTopicList\":[{\"id\":\"rtpqpemhz\",\"pesId\":\"krepdqhqyhwqwem\"},{\"id\":\"qabckmzeoxin\",\"pesId\":\"re\"}],\"analysisTypes\":[\"whlpuzjpceezn\",\"angp\",\"bfaxyxzlbc\"],\"type\":\"hm\",\"score\":3.0061007},\"dataset\":[{\"table\":{\"tableName\":\"ndktxfv\",\"columns\":[{},{},{},{}],\"rows\":[\"dataqgpkrie\"]},\"renderingProperties\":{\"type\":1132775916,\"title\":\"xx\",\"description\":\"wzkyf\",\"isVisible\":true}},{\"table\":{\"tableName\":\"wxeiicrmpepk\",\"columns\":[{},{},{},{}],\"rows\":[\"dataxijvskwsdgkjgyac\"]},\"renderingProperties\":{\"type\":1775384365,\"title\":\"kwefc\",\"description\":\"inwoqartwyxq\",\"isVisible\":false}},{\"table\":{\"tableName\":\"vatdavuqmcbymsf\",\"columns\":[{},{}],\"rows\":[\"datauvjezcjumvps\",\"datamioyo\"]},\"renderingProperties\":{\"type\":671724843,\"title\":\"iqwnnraclibbfq\",\"description\":\"pkl\",\"isVisible\":false}},{\"table\":{\"tableName\":\"nhautwukexzgpmnm\",\"columns\":[{},{},{},{}],\"rows\":[\"dataqilwgdfpfqfpcvs\",\"dataclg\",\"datarvwerfwxbsmtb\"]},\"renderingProperties\":{\"type\":273842551,\"title\":\"hci\",\"description\":\"wdv\",\"isVisible\":true}}],\"status\":{\"message\":\"kqhs\",\"statusId\":811287506},\"dataProviderMetadata\":{\"providerName\":\"wpq\",\"propertyBag\":[{\"name\":\"uwyqwdq\",\"value\":\"mghg\"},{\"name\":\"z\",\"value\":\"lujkhn\"},{\"name\":\"mrnkfmkhcqtwml\",\"value\":\"jnqtqe\"},{\"name\":\"j\",\"value\":\"vragpokddx\"}]}},\"id\":\"hhkvguavtptbk\",\"name\":\"wkqyns\",\"type\":\"gbvoffbkk\"}"; - - 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.jobs() - .getDetectorWithResponse("qayfl", "iyu", "snuudtelvhyibdr", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("whlpuzjpceezn", response.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("ndktxfv", response.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(1132775916, response.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("xx", response.properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("wzkyf", response.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, response.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("kqhs", response.properties().status().message()); - Assertions.assertEquals(811287506, response.properties().status().statusId()); - Assertions.assertEquals("wpq", response.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("uwyqwdq", response.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("mghg", response.properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsWithResponseMockTests.java deleted file mode 100644 index 9efe3b6bc09f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsWithResponseMockTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.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.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 JobsListDetectorsWithResponseMockTests { - @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\":[{\"properties\":{\"metadata\":{\"id\":\"hdklmvetatl\",\"name\":\"fqoixwgiksbbvt\",\"description\":\"xrpo\",\"author\":\"phchgjtnhtukfaci\",\"category\":\"bfntumeezbxvq\",\"supportTopicList\":[{},{},{},{}],\"analysisTypes\":[\"wcgasgom\",\"mjzwx\"],\"type\":\"govsxpwwzt\",\"score\":71.73476},\"dataset\":[{},{},{},{}],\"status\":{\"message\":\"gfredmlscg\",\"statusId\":836747859},\"dataProviderMetadata\":{\"providerName\":\"na\",\"propertyBag\":[{},{},{}]}},\"id\":\"wazhpabaco\",\"name\":\"lyotg\",\"type\":\"wsxnsrqor\"},{\"properties\":{\"metadata\":{\"id\":\"mv\",\"name\":\"bxeetqujxcxxqn\",\"description\":\"qjkedwqurc\",\"author\":\"jmrvvxwjongz\",\"category\":\"hqqrsilcch\",\"supportTopicList\":[{},{}],\"analysisTypes\":[\"ansbvriaqg\",\"tojrulfucte\",\"rthcfjzh\",\"lyubqjrostvrjeq\"],\"type\":\"z\",\"score\":80.793976},\"dataset\":[{},{},{},{}],\"status\":{\"message\":\"rxalxrdha\",\"statusId\":1408690933},\"dataProviderMetadata\":{\"providerName\":\"sn\",\"propertyBag\":[{},{},{},{}]}},\"id\":\"a\",\"name\":\"iwkkvya\",\"type\":\"xkvvcs\"},{\"properties\":{\"metadata\":{\"id\":\"uvdjkqxetqm\",\"name\":\"ivrjjxnwxdc\",\"description\":\"ojxl\",\"author\":\"z\",\"category\":\"pgfquwzpwiibelwc\",\"supportTopicList\":[{},{}],\"analysisTypes\":[\"bpjxljtxbusqtb\"],\"type\":\"niuisdz\",\"score\":80.91173},\"dataset\":[{},{}],\"status\":{\"message\":\"agsecnadbuw\",\"statusId\":1642935539},\"dataProviderMetadata\":{\"providerName\":\"llmqiyne\",\"propertyBag\":[{},{}]}},\"id\":\"lnkkiiwvmtumxpym\",\"name\":\"jfuaxroqvqpilrgu\",\"type\":\"canlduwzorxs\"},{\"properties\":{\"metadata\":{\"id\":\"qk\",\"name\":\"ymxkqvfqepdx\",\"description\":\"tuubwyvpjb\",\"author\":\"cpj\",\"category\":\"uqgixex\",\"supportTopicList\":[{},{}],\"analysisTypes\":[\"wljavhuerkjddvrg\",\"iegftc\",\"biiftksdwgdnk\"],\"type\":\"gmwdh\",\"score\":87.856026},\"dataset\":[{},{}],\"status\":{\"message\":\"ldbglzout\",\"statusId\":1388435389},\"dataProviderMetadata\":{\"providerName\":\"zeka\",\"propertyBag\":[{},{}]}},\"id\":\"zg\",\"name\":\"norbjgmnzjot\",\"type\":\"mrxkhlobvv\"}],\"nextLink\":\"hvhd\"}"; - - 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.jobs().listDetectorsWithResponse("w", "ae", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("wcgasgom", response.value().get(0).properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("gfredmlscg", response.value().get(0).properties().status().message()); - Assertions.assertEquals(836747859, response.value().get(0).properties().status().statusId()); - Assertions.assertEquals("na", response.value().get(0).properties().dataProviderMetadata().providerName()); - } -} 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 c392a95255ff..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionMockTests.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.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("jsvlpg", "dnw", "ehaqidoyzltgio", 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 a5924215bfa8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsMockTests.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.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.ContainerAppJobExecutions; -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 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\":\"cyheqwbpqqncj\",\"id\":\"khjoz\",\"type\":\"mcwmbup\",\"properties\":{\"status\":\"Failed\",\"startTime\":\"2021-04-23T03:13:25Z\",\"endTime\":\"2021-08-31T23:28:22Z\",\"template\":{\"containers\":[{},{},{},{}],\"initContainers\":[{},{},{}]}}},{\"name\":\"bsvs\",\"id\":\"ieswhddzydisn\",\"type\":\"pywyjlnld\",\"properties\":{\"status\":\"Succeeded\",\"startTime\":\"2021-02-22T08:36:21Z\",\"endTime\":\"2021-08-08T07:22:04Z\",\"template\":{\"containers\":[{},{}],\"initContainers\":[{}]}}},{\"name\":\"zjihweebiphr\",\"id\":\"cjwqw\",\"type\":\"sratjhdhzyb\",\"properties\":{\"status\":\"Stopped\",\"startTime\":\"2021-04-15T18:17:15Z\",\"endTime\":\"2021-09-02T11:19:23Z\",\"template\":{\"containers\":[{},{},{},{}],\"initContainers\":[{},{}]}}}],\"nextLink\":\"v\"}"; - - 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("qoqpepiaeap", "sergdtpe", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("cyheqwbpqqncj", response.value().get(0).name()); - Assertions.assertEquals("khjoz", response.value().get(0).id()); - Assertions.assertEquals("mcwmbup", response.value().get(0).type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-04-23T03:13:25Z"), response.value().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-08-31T23:28:22Z"), 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 4b359efc6ac8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JwtClaimChecksTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JwtClaimChecks; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class JwtClaimChecksTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JwtClaimChecks model = BinaryData - .fromString("{\"allowedGroups\":[\"klj\",\"vbqid\"],\"allowedClientApplications\":[\"jzyulpk\",\"dj\"]}") - .toObject(JwtClaimChecks.class); - Assertions.assertEquals("klj", model.allowedGroups().get(0)); - Assertions.assertEquals("jzyulpk", model.allowedClientApplications().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JwtClaimChecks model = new JwtClaimChecks().withAllowedGroups(Arrays.asList("klj", "vbqid")) - .withAllowedClientApplications(Arrays.asList("jzyulpk", "dj")); - model = BinaryData.fromObject(model).toObject(JwtClaimChecks.class); - Assertions.assertEquals("klj", model.allowedGroups().get(0)); - Assertions.assertEquals("jzyulpk", 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 7e5a7723aab2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/KedaConfigurationTests.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.KedaConfiguration; - -public final class KedaConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KedaConfiguration model - = BinaryData.fromString("{\"version\":\"rylniofrzg\"}").toObject(KedaConfiguration.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KedaConfiguration model = new KedaConfiguration(); - model = BinaryData.fromObject(model).toObject(KedaConfiguration.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ListUsagesResultTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ListUsagesResultTests.java deleted file mode 100644 index b17b79c25492..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ListUsagesResultTests.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.UsageInner; -import com.azure.resourcemanager.appcontainers.models.ListUsagesResult; -import com.azure.resourcemanager.appcontainers.models.UsageName; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ListUsagesResultTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ListUsagesResult model = BinaryData.fromString( - "{\"value\":[{\"currentValue\":1.2442172,\"limit\":34.942795,\"name\":{\"value\":\"j\",\"localizedValue\":\"cmyfqipgxhnpo\"}}],\"nextLink\":\"qwcabvnui\"}") - .toObject(ListUsagesResult.class); - Assertions.assertEquals(1.2442172f, model.value().get(0).currentValue()); - Assertions.assertEquals(34.942795f, model.value().get(0).limit()); - Assertions.assertEquals("j", model.value().get(0).name().value()); - Assertions.assertEquals("cmyfqipgxhnpo", model.value().get(0).name().localizedValue()); - Assertions.assertEquals("qwcabvnui", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ListUsagesResult model = new ListUsagesResult() - .withValue(Arrays.asList(new UsageInner().withCurrentValue(1.2442172f).withLimit(34.942795f) - .withName(new UsageName().withValue("j").withLocalizedValue("cmyfqipgxhnpo")))) - .withNextLink("qwcabvnui"); - model = BinaryData.fromObject(model).toObject(ListUsagesResult.class); - Assertions.assertEquals(1.2442172f, model.value().get(0).currentValue()); - Assertions.assertEquals(34.942795f, model.value().get(0).limit()); - Assertions.assertEquals("j", model.value().get(0).name().value()); - Assertions.assertEquals("cmyfqipgxhnpo", model.value().get(0).name().localizedValue()); - Assertions.assertEquals("qwcabvnui", model.nextLink()); - } -} 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 c33d27beef8e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginRoutesTests.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.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\":\"qvpkvlrxnjeaseip\"}").toObject(LoginRoutes.class); - Assertions.assertEquals("qvpkvlrxnjeaseip", model.logoutEndpoint()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LoginRoutes model = new LoginRoutes().withLogoutEndpoint("qvpkvlrxnjeaseip"); - model = BinaryData.fromObject(model).toObject(LoginRoutes.class); - Assertions.assertEquals("qvpkvlrxnjeaseip", 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 5a453060b946..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginScopesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.LoginScopes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LoginScopesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LoginScopes model = BinaryData.fromString("{\"scopes\":[\"exhd\",\"xibqeojnx\"]}").toObject(LoginScopes.class); - Assertions.assertEquals("exhd", model.scopes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LoginScopes model = new LoginScopes().withScopes(Arrays.asList("exhd", "xibqeojnx")); - model = BinaryData.fromObject(model).toObject(LoginScopes.class); - Assertions.assertEquals("exhd", model.scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogsConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogsConfigurationTests.java deleted file mode 100644 index 8398ff1f9b15..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LogsConfigurationTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.LogsConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LogsConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LogsConfiguration model - = BinaryData.fromString("{\"destinations\":[\"ebwtswb\"]}").toObject(LogsConfiguration.class); - Assertions.assertEquals("ebwtswb", model.destinations().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LogsConfiguration model = new LogsConfiguration().withDestinations(Arrays.asList("ebwtswb")); - model = BinaryData.fromObject(model).toObject(LogsConfiguration.class); - Assertions.assertEquals("ebwtswb", model.destinations().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatePatchTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatePatchTests.java deleted file mode 100644 index 6bfd34f59036..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatePatchTests.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.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\":{\"jmucftby\":\"mtrwah\"}}").toObject(ManagedCertificatePatch.class); - Assertions.assertEquals("mtrwah", model.tags().get("jmucftby")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedCertificatePatch model = new ManagedCertificatePatch().withTags(mapOf("jmucftby", "mtrwah")); - model = BinaryData.fromObject(model).toObject(ManagedCertificatePatch.class); - Assertions.assertEquals("mtrwah", model.tags().get("jmucftby")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteWithResponseMockTests.java deleted file mode 100644 index 73c1963e9591..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.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("zaahzbhuroolkoli", "hhmo", "usuzgfjzcvaaxo", - 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 6f878ae0bd15..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorWithResponseMockTests.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.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\":\"nazku\",\"name\":\"drey\",\"description\":\"whsetwwjwzzqs\",\"author\":\"zuukykcyqhyqq\",\"category\":\"dcykeyst\",\"supportTopicList\":[{\"id\":\"pazdazgbsqgp\",\"pesId\":\"q\"}],\"analysisTypes\":[\"tmdpvozglqjbknlz\",\"lctzeyowmndcovd\",\"zqauxzan\"],\"type\":\"kvfruwkudr\",\"score\":66.552605},\"dataset\":[{\"table\":{\"tableName\":\"dqyemebunaucm\",\"columns\":[{},{},{}],\"rows\":[\"dataeemmjauwcgx\"]},\"renderingProperties\":{\"type\":1976462334,\"title\":\"aitranizerw\",\"description\":\"dasmxu\",\"isVisible\":true}},{\"table\":{\"tableName\":\"gfcoc\",\"columns\":[{},{}],\"rows\":[\"dataiylfmpztrau\",\"datasvhl\",\"datadculregp\"]},\"renderingProperties\":{\"type\":1371553792,\"title\":\"hvrztnvg\",\"description\":\"hqrdgrtwmewjzlpy\",\"isVisible\":false}},{\"table\":{\"tableName\":\"zwjcaye\",\"columns\":[{},{}],\"rows\":[\"datansyby\",\"datapolwzrghsrlei\"]},\"renderingProperties\":{\"type\":1125068139,\"title\":\"jfncjwvuagfqw\",\"description\":\"tngvmreuptrklz\",\"isVisible\":true}}],\"status\":{\"message\":\"wo\",\"statusId\":1419456371},\"dataProviderMetadata\":{\"providerName\":\"aghm\",\"propertyBag\":[{\"name\":\"lslrcigtzjc\",\"value\":\"xqlaps\"},{\"name\":\"sovyxpavidnievw\",\"value\":\"cvvy\"},{\"name\":\"slpuxgcbdsva\",\"value\":\"nptw\"},{\"name\":\"kx\",\"value\":\"azwu\"}]}},\"id\":\"yqvnjobfe\",\"name\":\"hldiuhzzgqlm\",\"type\":\"aewzgiudjp\"}"; - - 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("ygnxcgjtfrnqukt", "fnslnlrxsmy", "trwntfmtbgw", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("tmdpvozglqjbknlz", response.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("dqyemebunaucm", response.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(1976462334, response.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("aitranizerw", response.properties().dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("dasmxu", response.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, response.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("wo", response.properties().status().message()); - Assertions.assertEquals(1419456371, response.properties().status().statusId()); - Assertions.assertEquals("aghm", response.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("lslrcigtzjc", - response.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("xqlaps", response.properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsWithResponseMockTests.java deleted file mode 100644 index 975abe0dd0c4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsWithResponseMockTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.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.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 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\":[{\"properties\":{\"metadata\":{\"id\":\"qpmbhyqg\",\"name\":\"rmmttjxop\",\"description\":\"erhsmvgohtw\",\"author\":\"qilrixysfn\",\"category\":\"sqywwwmhkru\",\"supportTopicList\":[{},{},{}],\"analysisTypes\":[\"ympmlqoin\",\"zduewihapfjii\"],\"type\":\"jdiq\",\"score\":12.614834},\"dataset\":[{}],\"status\":{\"message\":\"cl\",\"statusId\":1765036901},\"dataProviderMetadata\":{\"providerName\":\"sbw\",\"propertyBag\":[{},{}]}},\"id\":\"bv\",\"name\":\"ipbwxgooo\",\"type\":\"zp\"},{\"properties\":{\"metadata\":{\"id\":\"s\",\"name\":\"knpdgzigjsu\",\"description\":\"whgsaodkww\",\"author\":\"afoctohz\",\"category\":\"quvwsxbgn\",\"supportTopicList\":[{},{},{},{}],\"analysisTypes\":[\"qchoadhrsxqv\",\"vspabdsrgfajgl\",\"rsubklrxhjnl\"],\"type\":\"etjdvqydieqqkwa\",\"score\":70.96507},\"dataset\":[{}],\"status\":{\"message\":\"zxoebwgjxb\",\"statusId\":315596375},\"dataProviderMetadata\":{\"providerName\":\"aupwtzvpaklo\",\"propertyBag\":[{},{},{},{}]}},\"id\":\"zrpejpl\",\"name\":\"s\",\"type\":\"nbtttkgsuxu\"},{\"properties\":{\"metadata\":{\"id\":\"gkp\",\"name\":\"boy\",\"description\":\"ebhuhkslgwlokhu\",\"author\":\"ijyzcqypzqzufgsy\",\"category\":\"jyvdwtfxptpqayam\",\"supportTopicList\":[{}],\"analysisTypes\":[\"ybmx\"],\"type\":\"xocuullojkpoyhgw\",\"score\":2.738905},\"dataset\":[{},{},{},{}],\"status\":{\"message\":\"dljzgdyrc\",\"statusId\":1586962716},\"dataProviderMetadata\":{\"providerName\":\"gzlrqhbj\",\"propertyBag\":[{},{},{},{}]}},\"id\":\"dxwbsfpyxxtj\",\"name\":\"flecominxojjl\",\"type\":\"xxdhilzzdzzqjm\"},{\"properties\":{\"metadata\":{\"id\":\"y\",\"name\":\"ribqlotokh\",\"description\":\"wtaznkcqw\",\"author\":\"wjyofgwhnkbtl\",\"category\":\"jssmctsnldkpwo\",\"supportTopicList\":[{},{},{}],\"analysisTypes\":[\"bxbteogfgfiijry\",\"wlefksxqceazfpxg\",\"m\",\"vzvluyq\"],\"type\":\"ios\",\"score\":85.90183},\"dataset\":[{},{},{}],\"status\":{\"message\":\"fppuacvfye\",\"statusId\":970206060},\"dataProviderMetadata\":{\"providerName\":\"x\",\"propertyBag\":[{},{},{}]}},\"id\":\"soy\",\"name\":\"hpvtyqftteh\",\"type\":\"pboujs\"}],\"nextLink\":\"fvvdshxcdedsue\"}"; - - 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("sqwudohzilfmnli", "psimsf", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("ympmlqoin", response.value().get(0).properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("cl", response.value().get(0).properties().status().message()); - Assertions.assertEquals(1765036901, response.value().get(0).properties().status().statusId()); - Assertions.assertEquals("sbw", response.value().get(0).properties().dataProviderMetadata().providerName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerAuthenticationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerAuthenticationTests.java deleted file mode 100644 index 5e7b39d3ab48..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerAuthenticationTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; -import com.azure.resourcemanager.appcontainers.models.Mtls; -import org.junit.jupiter.api.Assertions; - -public final class ManagedEnvironmentPropertiesPeerAuthenticationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedEnvironmentPropertiesPeerAuthentication model = BinaryData.fromString("{\"mtls\":{\"enabled\":true}}") - .toObject(ManagedEnvironmentPropertiesPeerAuthentication.class); - Assertions.assertEquals(true, model.mtls().enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedEnvironmentPropertiesPeerAuthentication model - = new ManagedEnvironmentPropertiesPeerAuthentication().withMtls(new Mtls().withEnabled(true)); - model = BinaryData.fromObject(model).toObject(ManagedEnvironmentPropertiesPeerAuthentication.class); - Assertions.assertEquals(true, model.mtls().enabled()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListMockTests.java deleted file mode 100644 index a43d612fdc73..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListMockTests.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.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.Usage; -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 ManagedEnvironmentUsagesListMockTests { - @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\":[{\"currentValue\":74.240906,\"limit\":50.552414,\"name\":{\"value\":\"wki\",\"localizedValue\":\"dgfhbssdpje\"}}]}"; - - 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.managedEnvironmentUsages().list("zdnckidbj", "glhzqp", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(74.240906f, response.iterator().next().currentValue()); - Assertions.assertEquals(50.552414f, response.iterator().next().limit()); - Assertions.assertEquals("wki", response.iterator().next().name().value()); - Assertions.assertEquals("dgfhbssdpje", response.iterator().next().name().localizedValue()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.java deleted file mode 100644 index 3c7163e40cc6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.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.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("yimyccgrvk", "xzznnui", 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 12409f1e9082..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesMockTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.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\":1874096637,\"maximumCount\":1667611376,\"currentCount\":883857471},\"id\":\"eumexmjbxc\",\"name\":\"ccwkqmtx\",\"type\":\"p\"}]}"; - - 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("dekotjgxieqfkyf", "iwvjaqupbyyn", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(1874096637, response.iterator().next().properties().minimumCount()); - Assertions.assertEquals(1667611376, response.iterator().next().properties().maximumCount()); - Assertions.assertEquals(883857471, 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 d4138b04f453..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.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("mqgisnion", "tb", "dr", - com.azure.core.util.Context.NONE); - - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.java deleted file mode 100644 index e805a0ba86c5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedServiceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedServiceIdentity model = BinaryData.fromString( - "{\"principalId\":\"1bfb3b12-d3c4-4b35-8f47-4176368e6e5c\",\"tenantId\":\"ed1e4bcc-472b-48f8-9f19-4d0991ab0086\",\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"wgxhn\":{\"principalId\":\"028db3d9-1340-449d-bdff-b678a2ee278d\",\"clientId\":\"51e4a008-5b03-4c2d-a0c0-31398ef4c4c6\"},\"x\":{\"principalId\":\"202c75aa-8c8e-4276-b9e6-e3384332734e\",\"clientId\":\"b9b508e5-b6db-42b9-bdce-4f77c2ba9a4d\"}}}") - .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedServiceIdentity model = new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("wgxhn", new UserAssignedIdentity(), "x", new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MetricsConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MetricsConfigurationTests.java deleted file mode 100644 index 6a5c0030e0bb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MetricsConfigurationTests.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.MetricsConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class MetricsConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - MetricsConfiguration model - = BinaryData.fromString("{\"destinations\":[\"fmd\",\"ragegi\",\"vcjfelisdjubggb\"]}") - .toObject(MetricsConfiguration.class); - Assertions.assertEquals("fmd", model.destinations().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - MetricsConfiguration model - = new MetricsConfiguration().withDestinations(Arrays.asList("fmd", "ragegi", "vcjfelisdjubggb")); - model = BinaryData.fromObject(model).toObject(MetricsConfiguration.class); - Assertions.assertEquals("fmd", model.destinations().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MtlsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MtlsTests.java deleted file mode 100644 index f78edccfaf21..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MtlsTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Mtls; -import org.junit.jupiter.api.Assertions; - -public final class MtlsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Mtls model = BinaryData.fromString("{\"enabled\":true}").toObject(Mtls.class); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Mtls model = new Mtls().withEnabled(true); - model = BinaryData.fromObject(model).toObject(Mtls.class); - Assertions.assertEquals(true, model.enabled()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilityWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index 42a8af4b2451..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.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\":false,\"reason\":\"AlreadyExists\",\"message\":\"htvsnvl\"}"; - - 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("isjm", "kkhmwdmdlgyqixok", - new CheckNameAvailabilityRequest().withName("jawh").withType("gnqfqqdlcvmyol"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, response.reason()); - Assertions.assertEquals("htvsnvl", response.message()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NfsAzureFilePropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NfsAzureFilePropertiesTests.java deleted file mode 100644 index ca4bf2448f51..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NfsAzureFilePropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AccessMode; -import com.azure.resourcemanager.appcontainers.models.NfsAzureFileProperties; -import org.junit.jupiter.api.Assertions; - -public final class NfsAzureFilePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - NfsAzureFileProperties model - = BinaryData.fromString("{\"server\":\"qplpvmjc\",\"accessMode\":\"ReadWrite\",\"shareName\":\"bidyv\"}") - .toObject(NfsAzureFileProperties.class); - Assertions.assertEquals("qplpvmjc", model.server()); - Assertions.assertEquals(AccessMode.READ_WRITE, model.accessMode()); - Assertions.assertEquals("bidyv", model.shareName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - NfsAzureFileProperties model = new NfsAzureFileProperties().withServer("qplpvmjc") - .withAccessMode(AccessMode.READ_WRITE).withShareName("bidyv"); - model = BinaryData.fromObject(model).toObject(NfsAzureFileProperties.class); - Assertions.assertEquals("qplpvmjc", model.server()); - Assertions.assertEquals(AccessMode.READ_WRITE, model.accessMode()); - Assertions.assertEquals("bidyv", model.shareName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java deleted file mode 100644 index 1dd4cbc2e2c6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Nonce; -import org.junit.jupiter.api.Assertions; - -public final class NonceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Nonce model = BinaryData.fromString("{\"validateNonce\":true,\"nonceExpirationInterval\":\"asxazjpqyegualhb\"}") - .toObject(Nonce.class); - Assertions.assertEquals(true, model.validateNonce()); - Assertions.assertEquals("asxazjpqyegualhb", model.nonceExpirationInterval()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Nonce model = new Nonce().withValidateNonce(true).withNonceExpirationInterval("asxazjpqyegualhb"); - model = BinaryData.fromObject(model).toObject(Nonce.class); - Assertions.assertEquals(true, model.validateNonce()); - Assertions.assertEquals("asxazjpqyegualhb", 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 1364879d004a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectLoginTests.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.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\":\"nfnbacfionlebxe\",\"scopes\":[\"tzxdpnqbqqwx\",\"jfeallnwsub\"]}") - .toObject(OpenIdConnectLogin.class); - Assertions.assertEquals("nfnbacfionlebxe", model.nameClaimType()); - Assertions.assertEquals("tzxdpnqbqqwx", model.scopes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OpenIdConnectLogin model = new OpenIdConnectLogin().withNameClaimType("nfnbacfionlebxe") - .withScopes(Arrays.asList("tzxdpnqbqqwx", "jfeallnwsub")); - model = BinaryData.fromObject(model).toObject(OpenIdConnectLogin.class); - Assertions.assertEquals("nfnbacfionlebxe", model.nameClaimType()); - Assertions.assertEquals("tzxdpnqbqqwx", 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 6550d7f15bdc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDetailInnerTests.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.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\":\"xff\",\"isDataAction\":true,\"display\":{\"provider\":\"fbkgozxwopdby\",\"resource\":\"izqaclnapxbiyg\",\"operation\":\"gjkn\",\"description\":\"mfcttux\"},\"origin\":\"yilflqoiquvrehmr\"}") - .toObject(OperationDetailInner.class); - Assertions.assertEquals("xff", model.name()); - Assertions.assertEquals(true, model.isDataAction()); - Assertions.assertEquals("fbkgozxwopdby", model.display().provider()); - Assertions.assertEquals("izqaclnapxbiyg", model.display().resource()); - Assertions.assertEquals("gjkn", model.display().operation()); - Assertions.assertEquals("mfcttux", model.display().description()); - Assertions.assertEquals("yilflqoiquvrehmr", model.origin()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDetailInner model = new OperationDetailInner() - .withName("xff").withIsDataAction(true).withDisplay(new OperationDisplay().withProvider("fbkgozxwopdby") - .withResource("izqaclnapxbiyg").withOperation("gjkn").withDescription("mfcttux")) - .withOrigin("yilflqoiquvrehmr"); - model = BinaryData.fromObject(model).toObject(OperationDetailInner.class); - Assertions.assertEquals("xff", model.name()); - Assertions.assertEquals(true, model.isDataAction()); - Assertions.assertEquals("fbkgozxwopdby", model.display().provider()); - Assertions.assertEquals("izqaclnapxbiyg", model.display().resource()); - Assertions.assertEquals("gjkn", model.display().operation()); - Assertions.assertEquals("mfcttux", model.display().description()); - Assertions.assertEquals("yilflqoiquvrehmr", 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 3e8cd630a35e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDisplayTests.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.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\":\"hvsujztc\",\"resource\":\"tqjtwhauu\",\"operation\":\"prnjletlxsmr\",\"description\":\"do\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("hvsujztc", model.provider()); - Assertions.assertEquals("tqjtwhauu", model.resource()); - Assertions.assertEquals("prnjletlxsmr", model.operation()); - Assertions.assertEquals("do", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = new OperationDisplay().withProvider("hvsujztc").withResource("tqjtwhauu") - .withOperation("prnjletlxsmr").withDescription("do"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("hvsujztc", model.provider()); - Assertions.assertEquals("tqjtwhauu", model.resource()); - Assertions.assertEquals("prnjletlxsmr", model.operation()); - Assertions.assertEquals("do", 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 24e344e5df60..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationsListMockTests.java +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.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\":\"b\",\"isDataAction\":true,\"display\":{\"provider\":\"dylytcovq\",\"resource\":\"usrf\",\"operation\":\"d\",\"description\":\"fxnxml\"},\"origin\":\"uoswkjmdih\"}]}"; - - 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("b", response.iterator().next().name()); - Assertions.assertEquals(true, response.iterator().next().isDataAction()); - Assertions.assertEquals("dylytcovq", response.iterator().next().display().provider()); - Assertions.assertEquals("usrf", response.iterator().next().display().resource()); - Assertions.assertEquals("d", response.iterator().next().display().operation()); - Assertions.assertEquals("fxnxml", response.iterator().next().display().description()); - Assertions.assertEquals("uoswkjmdih", response.iterator().next().origin()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PreBuildStepTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PreBuildStepTests.java deleted file mode 100644 index e49fc44d4e06..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/PreBuildStepTests.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.HttpGet; -import com.azure.resourcemanager.appcontainers.models.PreBuildStep; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class PreBuildStepTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - PreBuildStep model = BinaryData.fromString( - "{\"description\":\"iexpbtgiwbwo\",\"scripts\":[\"ashrt\",\"tkcnqxwb\"],\"httpGet\":{\"url\":\"kulpiujwaasi\",\"fileName\":\"i\",\"headers\":[\"yuq\",\"rpqlp\",\"wcciuqgbdbu\"]}}") - .toObject(PreBuildStep.class); - Assertions.assertEquals("iexpbtgiwbwo", model.description()); - Assertions.assertEquals("ashrt", model.scripts().get(0)); - Assertions.assertEquals("kulpiujwaasi", model.httpGet().url()); - Assertions.assertEquals("i", model.httpGet().fileName()); - Assertions.assertEquals("yuq", model.httpGet().headers().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - PreBuildStep model = new PreBuildStep().withDescription("iexpbtgiwbwo") - .withScripts(Arrays.asList("ashrt", "tkcnqxwb")).withHttpGet(new HttpGet().withUrl("kulpiujwaasi") - .withFileName("i").withHeaders(Arrays.asList("yuq", "rpqlp", "wcciuqgbdbu"))); - model = BinaryData.fromObject(model).toObject(PreBuildStep.class); - Assertions.assertEquals("iexpbtgiwbwo", model.description()); - Assertions.assertEquals("ashrt", model.scripts().get(0)); - Assertions.assertEquals("kulpiujwaasi", model.httpGet().url()); - Assertions.assertEquals("i", model.httpGet().fileName()); - Assertions.assertEquals("yuq", model.httpGet().headers().get(0)); - } -} 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 ed980d566da1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaCollectionInnerTests.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.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ReplicaCollectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicaCollectionInner model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-02-06T14:48:02Z\",\"runningState\":\"NotRunning\",\"runningStateDetails\":\"qovekqvgqou\",\"containers\":[{\"name\":\"mpjw\",\"containerId\":\"vqikfxcvhrfsphu\",\"ready\":true,\"started\":true,\"restartCount\":95880088,\"runningState\":\"Terminated\",\"runningStateDetails\":\"sqczkvyklxubyj\",\"logStreamEndpoint\":\"fmmfblcqcu\",\"execEndpoint\":\"gqibrtalmetttw\"},{\"name\":\"slqxi\",\"containerId\":\"rmooizqse\",\"ready\":false,\"started\":true,\"restartCount\":719616130,\"runningState\":\"Terminated\",\"runningStateDetails\":\"zhyrpeto\",\"logStreamEndpoint\":\"bjoxs\",\"execEndpoint\":\"vnh\"},{\"name\":\"brqnkkzjcjb\",\"containerId\":\"gaehvvibrxjjst\",\"ready\":false,\"started\":false,\"restartCount\":774286462,\"runningState\":\"Waiting\",\"runningStateDetails\":\"tmo\",\"logStreamEndpoint\":\"klf\",\"execEndpoint\":\"dgfcwqmp\"}],\"initContainers\":[{\"name\":\"xzhemjyh\",\"containerId\":\"uj\",\"ready\":false,\"started\":true,\"restartCount\":1064188609,\"runningState\":\"Running\",\"runningStateDetails\":\"ulkb\",\"logStreamEndpoint\":\"pfajnjwltlwtjj\",\"execEndpoint\":\"ktalhsnvkcdmxz\"},{\"name\":\"oaimlnw\",\"containerId\":\"aomylwea\",\"ready\":true,\"started\":false,\"restartCount\":1226042956,\"runningState\":\"Running\",\"runningStateDetails\":\"npjhlfzswpchwahf\",\"logStreamEndpoint\":\"usnfepgfewet\",\"execEndpoint\":\"yxgncxykxhdjhli\"},{\"name\":\"bcxf\",\"containerId\":\"cporxvxcjz\",\"ready\":false,\"started\":true,\"restartCount\":444626662,\"runningState\":\"Waiting\",\"runningStateDetails\":\"qscjavftjuh\",\"logStreamEndpoint\":\"azkmtgguwp\",\"execEndpoint\":\"r\"}]},\"id\":\"civmmg\",\"name\":\"f\",\"type\":\"fiwrxgkn\"}]}") - .toObject(ReplicaCollectionInner.class); - Assertions.assertEquals("mpjw", model.value().get(0).containers().get(0).name()); - Assertions.assertEquals("vqikfxcvhrfsphu", model.value().get(0).containers().get(0).containerId()); - Assertions.assertEquals(true, model.value().get(0).containers().get(0).ready()); - Assertions.assertEquals(true, model.value().get(0).containers().get(0).started()); - Assertions.assertEquals(95880088, model.value().get(0).containers().get(0).restartCount()); - Assertions.assertEquals("xzhemjyh", model.value().get(0).initContainers().get(0).name()); - Assertions.assertEquals("uj", model.value().get(0).initContainers().get(0).containerId()); - Assertions.assertEquals(false, model.value().get(0).initContainers().get(0).ready()); - Assertions.assertEquals(true, model.value().get(0).initContainers().get(0).started()); - Assertions.assertEquals(1064188609, model.value().get(0).initContainers().get(0).restartCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaCollectionInner model = new ReplicaCollectionInner().withValue(Arrays.asList(new ReplicaInner() - .withContainers(Arrays.asList( - new ReplicaContainer().withName("mpjw").withContainerId("vqikfxcvhrfsphu").withReady(true) - .withStarted(true).withRestartCount(95880088), - new ReplicaContainer().withName("slqxi").withContainerId("rmooizqse").withReady(false).withStarted(true) - .withRestartCount(719616130), - new ReplicaContainer().withName("brqnkkzjcjb").withContainerId("gaehvvibrxjjst").withReady(false) - .withStarted(false).withRestartCount(774286462))) - .withInitContainers(Arrays.asList( - new ReplicaContainer().withName("xzhemjyh").withContainerId("uj").withReady(false).withStarted(true) - .withRestartCount(1064188609), - new ReplicaContainer().withName("oaimlnw").withContainerId("aomylwea").withReady(true) - .withStarted(false).withRestartCount(1226042956), - new ReplicaContainer().withName("bcxf").withContainerId("cporxvxcjz").withReady(false).withStarted(true) - .withRestartCount(444626662))))); - model = BinaryData.fromObject(model).toObject(ReplicaCollectionInner.class); - Assertions.assertEquals("mpjw", model.value().get(0).containers().get(0).name()); - Assertions.assertEquals("vqikfxcvhrfsphu", model.value().get(0).containers().get(0).containerId()); - Assertions.assertEquals(true, model.value().get(0).containers().get(0).ready()); - Assertions.assertEquals(true, model.value().get(0).containers().get(0).started()); - Assertions.assertEquals(95880088, model.value().get(0).containers().get(0).restartCount()); - Assertions.assertEquals("xzhemjyh", model.value().get(0).initContainers().get(0).name()); - Assertions.assertEquals("uj", model.value().get(0).initContainers().get(0).containerId()); - Assertions.assertEquals(false, model.value().get(0).initContainers().get(0).ready()); - Assertions.assertEquals(true, model.value().get(0).initContainers().get(0).started()); - Assertions.assertEquals(1064188609, model.value().get(0).initContainers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.java deleted file mode 100644 index 6a77fa5d344a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.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.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\":\"isofieypefojyqd\",\"containerId\":\"u\",\"ready\":false,\"started\":true,\"restartCount\":1554312221,\"runningState\":\"Terminated\",\"runningStateDetails\":\"hihlhzdsqtzbs\",\"logStreamEndpoint\":\"nowc\",\"execEndpoint\":\"fgmvecactxmwo\"}") - .toObject(ReplicaContainer.class); - Assertions.assertEquals("isofieypefojyqd", model.name()); - Assertions.assertEquals("u", model.containerId()); - Assertions.assertEquals(false, model.ready()); - Assertions.assertEquals(true, model.started()); - Assertions.assertEquals(1554312221, model.restartCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaContainer model = new ReplicaContainer().withName("isofieypefojyqd").withContainerId("u") - .withReady(false).withStarted(true).withRestartCount(1554312221); - model = BinaryData.fromObject(model).toObject(ReplicaContainer.class); - Assertions.assertEquals("isofieypefojyqd", model.name()); - Assertions.assertEquals("u", model.containerId()); - Assertions.assertEquals(false, model.ready()); - Assertions.assertEquals(true, model.started()); - Assertions.assertEquals(1554312221, 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 55bccfb6fde7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaInnerTests.java +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.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-08-12T09:55:05Z\",\"runningState\":\"NotRunning\",\"runningStateDetails\":\"iglaecx\",\"containers\":[{\"name\":\"cokpv\",\"containerId\":\"lqtmldgxob\",\"ready\":false,\"started\":false,\"restartCount\":563418466,\"runningState\":\"Waiting\",\"runningStateDetails\":\"ayzri\",\"logStreamEndpoint\":\"hya\",\"execEndpoint\":\"vjlboxqvk\"}],\"initContainers\":[{\"name\":\"ho\",\"containerId\":\"ynhdwdigum\",\"ready\":false,\"started\":true,\"restartCount\":745752113,\"runningState\":\"Waiting\",\"runningStateDetails\":\"jazysdzhezwwvaiq\",\"logStreamEndpoint\":\"vv\",\"execEndpoint\":\"nk\"}]},\"id\":\"hqyikvy\",\"name\":\"auy\",\"type\":\"vluwmncsttij\"}") - .toObject(ReplicaInner.class); - Assertions.assertEquals("cokpv", model.containers().get(0).name()); - Assertions.assertEquals("lqtmldgxob", model.containers().get(0).containerId()); - Assertions.assertEquals(false, model.containers().get(0).ready()); - Assertions.assertEquals(false, model.containers().get(0).started()); - Assertions.assertEquals(563418466, model.containers().get(0).restartCount()); - Assertions.assertEquals("ho", model.initContainers().get(0).name()); - Assertions.assertEquals("ynhdwdigum", model.initContainers().get(0).containerId()); - Assertions.assertEquals(false, model.initContainers().get(0).ready()); - Assertions.assertEquals(true, model.initContainers().get(0).started()); - Assertions.assertEquals(745752113, model.initContainers().get(0).restartCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaInner model = new ReplicaInner() - .withContainers(Arrays.asList(new ReplicaContainer().withName("cokpv").withContainerId("lqtmldgxob") - .withReady(false).withStarted(false).withRestartCount(563418466))) - .withInitContainers(Arrays.asList(new ReplicaContainer().withName("ho").withContainerId("ynhdwdigum") - .withReady(false).withStarted(true).withRestartCount(745752113))); - model = BinaryData.fromObject(model).toObject(ReplicaInner.class); - Assertions.assertEquals("cokpv", model.containers().get(0).name()); - Assertions.assertEquals("lqtmldgxob", model.containers().get(0).containerId()); - Assertions.assertEquals(false, model.containers().get(0).ready()); - Assertions.assertEquals(false, model.containers().get(0).started()); - Assertions.assertEquals(563418466, model.containers().get(0).restartCount()); - Assertions.assertEquals("ho", model.initContainers().get(0).name()); - Assertions.assertEquals("ynhdwdigum", model.initContainers().get(0).containerId()); - Assertions.assertEquals(false, model.initContainers().get(0).ready()); - Assertions.assertEquals(true, model.initContainers().get(0).started()); - Assertions.assertEquals(745752113, model.initContainers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.java deleted file mode 100644 index 38f70a8c368a..000000000000 --- 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\":\"2021-04-05T16:52:36Z\",\"runningState\":\"Unknown\",\"runningStateDetails\":\"ekrsgs\",\"containers\":[{\"name\":\"uzqgnjdgkynsc\",\"containerId\":\"qhzvhxnkomt\",\"ready\":false,\"started\":false,\"restartCount\":1449469351,\"runningState\":\"Running\",\"runningStateDetails\":\"xz\",\"logStreamEndpoint\":\"ihfrbbcevqa\",\"execEndpoint\":\"ltd\"},{\"name\":\"fkqojpy\",\"containerId\":\"gtrd\",\"ready\":false,\"started\":false,\"restartCount\":2043504503,\"runningState\":\"Terminated\",\"runningStateDetails\":\"m\",\"logStreamEndpoint\":\"nysuxmprafwgckh\",\"execEndpoint\":\"xvd\"},{\"name\":\"fwafqrouda\",\"containerId\":\"avehhrvkbunzo\",\"ready\":true,\"started\":true,\"restartCount\":2097383102,\"runningState\":\"Terminated\",\"runningStateDetails\":\"yxcdyuibhmfdnbzy\",\"logStreamEndpoint\":\"f\",\"execEndpoint\":\"cjnaeoisrvhmgor\"}],\"initContainers\":[{\"name\":\"is\",\"containerId\":\"w\",\"ready\":true,\"started\":false,\"restartCount\":157711526,\"runningState\":\"Waiting\",\"runningStateDetails\":\"vxilcbt\",\"logStreamEndpoint\":\"hnze\",\"execEndpoint\":\"xtjjfzqlqhycav\"},{\"name\":\"ggxdb\",\"containerId\":\"smieknlra\",\"ready\":true,\"started\":true,\"restartCount\":1541326221,\"runningState\":\"Waiting\",\"runningStateDetails\":\"dwqf\",\"logStreamEndpoint\":\"lyr\",\"execEndpoint\":\"iagtc\"},{\"name\":\"ocqwogfnzjvus\",\"containerId\":\"ld\",\"ready\":true,\"started\":false,\"restartCount\":1126537021,\"runningState\":\"Waiting\",\"runningStateDetails\":\"tkad\",\"logStreamEndpoint\":\"s\",\"execEndpoint\":\"nbtgkbugrjqctoj\"}]}") - .toObject(ReplicaProperties.class); - Assertions.assertEquals("uzqgnjdgkynsc", model.containers().get(0).name()); - Assertions.assertEquals("qhzvhxnkomt", model.containers().get(0).containerId()); - Assertions.assertEquals(false, model.containers().get(0).ready()); - Assertions.assertEquals(false, model.containers().get(0).started()); - Assertions.assertEquals(1449469351, model.containers().get(0).restartCount()); - Assertions.assertEquals("is", model.initContainers().get(0).name()); - Assertions.assertEquals("w", model.initContainers().get(0).containerId()); - Assertions.assertEquals(true, model.initContainers().get(0).ready()); - Assertions.assertEquals(false, model.initContainers().get(0).started()); - Assertions.assertEquals(157711526, model.initContainers().get(0).restartCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaProperties model = new ReplicaProperties() - .withContainers(Arrays.asList( - new ReplicaContainer().withName("uzqgnjdgkynsc").withContainerId("qhzvhxnkomt").withReady(false) - .withStarted(false).withRestartCount(1449469351), - new ReplicaContainer().withName("fkqojpy").withContainerId("gtrd").withReady(false).withStarted(false) - .withRestartCount(2043504503), - new ReplicaContainer().withName("fwafqrouda").withContainerId("avehhrvkbunzo").withReady(true) - .withStarted(true).withRestartCount(2097383102))) - .withInitContainers(Arrays.asList( - new ReplicaContainer().withName("is").withContainerId("w").withReady(true).withStarted(false) - .withRestartCount(157711526), - new ReplicaContainer().withName("ggxdb").withContainerId("smieknlra").withReady(true).withStarted(true) - .withRestartCount(1541326221), - new ReplicaContainer().withName("ocqwogfnzjvus").withContainerId("ld").withReady(true) - .withStarted(false).withRestartCount(1126537021))); - model = BinaryData.fromObject(model).toObject(ReplicaProperties.class); - Assertions.assertEquals("uzqgnjdgkynsc", model.containers().get(0).name()); - Assertions.assertEquals("qhzvhxnkomt", model.containers().get(0).containerId()); - Assertions.assertEquals(false, model.containers().get(0).ready()); - Assertions.assertEquals(false, model.containers().get(0).started()); - Assertions.assertEquals(1449469351, model.containers().get(0).restartCount()); - Assertions.assertEquals("is", model.initContainers().get(0).name()); - Assertions.assertEquals("w", model.initContainers().get(0).containerId()); - Assertions.assertEquals(true, model.initContainers().get(0).ready()); - Assertions.assertEquals(false, model.initContainers().get(0).started()); - Assertions.assertEquals(157711526, model.initContainers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersGetCustomDomainVerificationIdWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersGetCustomDomainVerificationIdWithResponseMockTests.java deleted file mode 100644 index d9d0c35ff1ee..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersGetCustomDomainVerificationIdWithResponseMockTests.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.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.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 ResourceProvidersGetCustomDomainVerificationIdWithResponseMockTests { - @Test - public void testGetCustomDomainVerificationIdWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "\"zolgjzmicuydocc\""; - - 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)); - - String response = manager.resourceProviders() - .getCustomDomainVerificationIdWithResponse(com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("zolgjzmicuydocc", response); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersJobExecutionWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersJobExecutionWithResponseMockTests.java deleted file mode 100644 index ca30f71ae269..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersJobExecutionWithResponseMockTests.java +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.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.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 ResourceProvidersJobExecutionWithResponseMockTests { - @Test - public void testJobExecutionWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr - = "{\"name\":\"iutg\",\"id\":\"mkahpqha\",\"type\":\"ntacih\",\"properties\":{\"status\":\"Unknown\",\"startTime\":\"2021-02-15T03:50:34Z\",\"endTime\":\"2021-11-24T08:50:55Z\",\"template\":{\"containers\":[{\"image\":\"mvlbhikeaqgrv\",\"name\":\"omxp\",\"command\":[\"tsdfjyieso\",\"wiqbuoutm\"],\"args\":[\"gleofjsbgbw\",\"zvdajfwnncf\",\"aciq\"],\"env\":[{},{},{},{}],\"resources\":{}}],\"initContainers\":[{\"image\":\"qlwixvtbougu\",\"name\":\"n\",\"command\":[\"gjttbasualapdlnd\"],\"args\":[\"qb\",\"ixv\",\"lwynpbbfqvzfj\",\"spugzfeuzjljmph\"],\"env\":[{},{},{}],\"resources\":{}}]}}}"; - - 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)); - - JobExecution response = manager.resourceProviders() - .jobExecutionWithResponse("gkqzkcyzmffngdyf", "ixrhl", "qvhoej", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("iutg", response.name()); - Assertions.assertEquals("mkahpqha", response.id()); - Assertions.assertEquals("ntacih", response.type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-15T03:50:34Z"), response.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-11-24T08:50:55Z"), response.endTime()); - Assertions.assertEquals("mvlbhikeaqgrv", response.template().containers().get(0).image()); - Assertions.assertEquals("omxp", response.template().containers().get(0).name()); - Assertions.assertEquals("tsdfjyieso", response.template().containers().get(0).command().get(0)); - Assertions.assertEquals("gleofjsbgbw", response.template().containers().get(0).args().get(0)); - Assertions.assertEquals("qlwixvtbougu", response.template().initContainers().get(0).image()); - Assertions.assertEquals("n", response.template().initContainers().get(0).name()); - Assertions.assertEquals("gjttbasualapdlnd", response.template().initContainers().get(0).command().get(0)); - Assertions.assertEquals("qb", response.template().initContainers().get(0).args().get(0)); - } -} 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 6bd5dcca4d05..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionCollectionTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -import com.azure.resourcemanager.appcontainers.models.RevisionCollection; -import java.util.Arrays; - -public final class RevisionCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RevisionCollection model = BinaryData.fromString( - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-08-08T16:05:05Z\",\"lastActiveTime\":\"2021-11-22T09:46:17Z\",\"fqdn\":\"rjfut\",\"template\":{\"revisionSuffix\":\"ebjvewzcjzn\",\"terminationGracePeriodSeconds\":7534826156141275141,\"initContainers\":[{},{},{},{}],\"containers\":[{},{},{},{}],\"scale\":{\"minReplicas\":1437675806,\"maxReplicas\":1356605173,\"rules\":[{},{},{}]},\"volumes\":[{},{}],\"serviceBinds\":[{},{},{},{}]},\"active\":false,\"replicas\":240161872,\"trafficWeight\":279681197,\"provisioningError\":\"ziuxxpshnee\",\"healthState\":\"Healthy\",\"provisioningState\":\"Provisioning\",\"runningState\":\"Failed\"},\"id\":\"ubkwdle\",\"name\":\"rds\",\"type\":\"tujbazpju\"},{\"properties\":{\"createdTime\":\"2021-04-13T05:15:14Z\",\"lastActiveTime\":\"2021-04-06T17:16:51Z\",\"fqdn\":\"lnorwmdu\",\"template\":{\"revisionSuffix\":\"klvxwmyg\",\"terminationGracePeriodSeconds\":6535644343996923938,\"initContainers\":[{},{}],\"containers\":[{},{},{},{}],\"scale\":{\"minReplicas\":1044665061,\"maxReplicas\":1565134020,\"rules\":[{}]},\"volumes\":[{},{},{},{}],\"serviceBinds\":[{},{}]},\"active\":false,\"replicas\":1689782344,\"trafficWeight\":1959517954,\"provisioningError\":\"xconfozauors\",\"healthState\":\"Healthy\",\"provisioningState\":\"Provisioning\",\"runningState\":\"Degraded\"},\"id\":\"lhlv\",\"name\":\"uuepzlrphwzsoldw\",\"type\":\"yuqdu\"},{\"properties\":{\"createdTime\":\"2020-12-22T02:15:52Z\",\"lastActiveTime\":\"2021-05-15T23:33:47Z\",\"fqdn\":\"rbior\",\"template\":{\"revisionSuffix\":\"lywjhh\",\"terminationGracePeriodSeconds\":6322848214394065275,\"initContainers\":[{}],\"containers\":[{},{},{}],\"scale\":{\"minReplicas\":759547890,\"maxReplicas\":601340793,\"rules\":[{}]},\"volumes\":[{},{},{}],\"serviceBinds\":[{},{}]},\"active\":false,\"replicas\":75081100,\"trafficWeight\":133601107,\"provisioningError\":\"euzaof\",\"healthState\":\"Healthy\",\"provisioningState\":\"Failed\",\"runningState\":\"Stopped\"},\"id\":\"s\",\"name\":\"gdotcubiipuipwo\",\"type\":\"onmacjekniz\"}],\"nextLink\":\"qvci\"}") - .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())); - model = BinaryData.fromObject(model).toObject(RevisionCollection.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ServiceTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ServiceTests.java deleted file mode 100644 index be1ebe2aee33..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ServiceTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Service; -import org.junit.jupiter.api.Assertions; - -public final class ServiceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Service model = BinaryData.fromString("{\"type\":\"yqiatkzwp\"}").toObject(Service.class); - Assertions.assertEquals("yqiatkzwp", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Service model = new Service().withType("yqiatkzwp"); - model = BinaryData.fromObject(model).toObject(Service.class); - Assertions.assertEquals("yqiatkzwp", model.type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpConnectionPoolTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpConnectionPoolTests.java deleted file mode 100644 index 525f953e5e6e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpConnectionPoolTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.TcpConnectionPool; -import org.junit.jupiter.api.Assertions; - -public final class TcpConnectionPoolTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TcpConnectionPool model - = BinaryData.fromString("{\"maxConnections\":171596164}").toObject(TcpConnectionPool.class); - Assertions.assertEquals(171596164, model.maxConnections()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TcpConnectionPool model = new TcpConnectionPool().withMaxConnections(171596164); - model = BinaryData.fromObject(model).toObject(TcpConnectionPool.class); - Assertions.assertEquals(171596164, model.maxConnections()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpRetryPolicyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpRetryPolicyTests.java deleted file mode 100644 index aa0e1f0e2019..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpRetryPolicyTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.TcpRetryPolicy; -import org.junit.jupiter.api.Assertions; - -public final class TcpRetryPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TcpRetryPolicy model - = BinaryData.fromString("{\"maxConnectAttempts\":56034680}").toObject(TcpRetryPolicy.class); - Assertions.assertEquals(56034680, model.maxConnectAttempts()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TcpRetryPolicy model = new TcpRetryPolicy().withMaxConnectAttempts(56034680); - model = BinaryData.fromObject(model).toObject(TcpRetryPolicy.class); - Assertions.assertEquals(56034680, model.maxConnectAttempts()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TimeoutPolicyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TimeoutPolicyTests.java deleted file mode 100644 index 22186455269f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TimeoutPolicyTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.TimeoutPolicy; -import org.junit.jupiter.api.Assertions; - -public final class TimeoutPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TimeoutPolicy model = BinaryData - .fromString("{\"responseTimeoutInSeconds\":2068674986,\"connectionTimeoutInSeconds\":974822937}") - .toObject(TimeoutPolicy.class); - Assertions.assertEquals(2068674986, model.responseTimeoutInSeconds()); - Assertions.assertEquals(974822937, model.connectionTimeoutInSeconds()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TimeoutPolicy model - = new TimeoutPolicy().withResponseTimeoutInSeconds(2068674986).withConnectionTimeoutInSeconds(974822937); - model = BinaryData.fromObject(model).toObject(TimeoutPolicy.class); - Assertions.assertEquals(2068674986, model.responseTimeoutInSeconds()); - Assertions.assertEquals(974822937, model.connectionTimeoutInSeconds()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TracesConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TracesConfigurationTests.java deleted file mode 100644 index 8d85d6589f16..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TracesConfigurationTests.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.TracesConfiguration; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class TracesConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TracesConfiguration model - = BinaryData.fromString("{\"destinations\":[\"b\",\"kbwvqvxkdiv\"]}").toObject(TracesConfiguration.class); - Assertions.assertEquals("b", model.destinations().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TracesConfiguration model = new TracesConfiguration().withDestinations(Arrays.asList("b", "kbwvqvxkdiv")); - model = BinaryData.fromObject(model).toObject(TracesConfiguration.class); - Assertions.assertEquals("b", model.destinations().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TrafficWeightTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TrafficWeightTests.java deleted file mode 100644 index df9886348ed7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TrafficWeightTests.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.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\":\"ipaslthaqfxssmwu\",\"weight\":1363759065,\"latestRevision\":false,\"label\":\"ezpdrhneu\"}") - .toObject(TrafficWeight.class); - Assertions.assertEquals("ipaslthaqfxssmwu", model.revisionName()); - Assertions.assertEquals(1363759065, model.weight()); - Assertions.assertEquals(false, model.latestRevision()); - Assertions.assertEquals("ezpdrhneu", model.label()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrafficWeight model = new TrafficWeight().withRevisionName("ipaslthaqfxssmwu").withWeight(1363759065) - .withLatestRevision(false).withLabel("ezpdrhneu"); - model = BinaryData.fromObject(model).toObject(TrafficWeight.class); - Assertions.assertEquals("ipaslthaqfxssmwu", model.revisionName()); - Assertions.assertEquals(1363759065, model.weight()); - Assertions.assertEquals(false, model.latestRevision()); - Assertions.assertEquals("ezpdrhneu", model.label()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageInnerTests.java deleted file mode 100644 index 250fabac5c5c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageInnerTests.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.UsageInner; -import com.azure.resourcemanager.appcontainers.models.UsageName; -import org.junit.jupiter.api.Assertions; - -public final class UsageInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UsageInner model = BinaryData.fromString( - "{\"currentValue\":41.70743,\"limit\":12.357182,\"name\":{\"value\":\"aswlp\",\"localizedValue\":\"gm\"}}") - .toObject(UsageInner.class); - Assertions.assertEquals(41.70743f, model.currentValue()); - Assertions.assertEquals(12.357182f, model.limit()); - Assertions.assertEquals("aswlp", model.name().value()); - Assertions.assertEquals("gm", model.name().localizedValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UsageInner model = new UsageInner().withCurrentValue(41.70743f).withLimit(12.357182f) - .withName(new UsageName().withValue("aswlp").withLocalizedValue("gm")); - model = BinaryData.fromObject(model).toObject(UsageInner.class); - Assertions.assertEquals(41.70743f, model.currentValue()); - Assertions.assertEquals(12.357182f, model.limit()); - Assertions.assertEquals("aswlp", model.name().value()); - Assertions.assertEquals("gm", model.name().localizedValue()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageNameTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageNameTests.java deleted file mode 100644 index 5ee591e9b914..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsageNameTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.UsageName; -import org.junit.jupiter.api.Assertions; - -public final class UsageNameTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UsageName model = BinaryData.fromString("{\"value\":\"fjlrxwtoauk\",\"localizedValue\":\"kvci\"}") - .toObject(UsageName.class); - Assertions.assertEquals("fjlrxwtoauk", model.value()); - Assertions.assertEquals("kvci", model.localizedValue()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UsageName model = new UsageName().withValue("fjlrxwtoauk").withLocalizedValue("kvci"); - model = BinaryData.fromObject(model).toObject(UsageName.class); - Assertions.assertEquals("fjlrxwtoauk", model.value()); - Assertions.assertEquals("kvci", model.localizedValue()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsagesListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsagesListMockTests.java deleted file mode 100644 index be338c6aa16a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UsagesListMockTests.java +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.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.Usage; -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 UsagesListMockTests { - @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\":[{\"currentValue\":38.23954,\"limit\":32.95426,\"name\":{\"value\":\"zmuhbcak\",\"localizedValue\":\"hokhoitwhrjsdmm\"}}]}"; - - 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.usages().list("dyhi", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(38.23954f, response.iterator().next().currentValue()); - Assertions.assertEquals(32.95426f, response.iterator().next().limit()); - Assertions.assertEquals("zmuhbcak", response.iterator().next().name().value()); - Assertions.assertEquals("hokhoitwhrjsdmm", response.iterator().next().name().localizedValue()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.java deleted file mode 100644 index 5da71dfdc512..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.java +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; - -public final class UserAssignedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAssignedIdentity model = BinaryData.fromString( - "{\"principalId\":\"be8f935b-e984-46cf-8757-d39bf7c7af37\",\"clientId\":\"92f0cebe-72c5-4e0f-b455-000fbc84bb04\"}") - .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 12418ae3f365..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VnetConfigurationTests.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.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\":\"n\",\"dockerBridgeCidr\":\"ujeickp\",\"platformReservedCidr\":\"cpopmxel\",\"platformReservedDnsIP\":\"clt\"}") - .toObject(VnetConfiguration.class); - Assertions.assertEquals(true, model.internal()); - Assertions.assertEquals("n", model.infrastructureSubnetId()); - Assertions.assertEquals("ujeickp", model.dockerBridgeCidr()); - Assertions.assertEquals("cpopmxel", model.platformReservedCidr()); - Assertions.assertEquals("clt", model.platformReservedDnsIp()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VnetConfiguration model = new VnetConfiguration().withInternal(true).withInfrastructureSubnetId("n") - .withDockerBridgeCidr("ujeickp").withPlatformReservedCidr("cpopmxel").withPlatformReservedDnsIp("clt"); - model = BinaryData.fromObject(model).toObject(VnetConfiguration.class); - Assertions.assertEquals(true, model.internal()); - Assertions.assertEquals("n", model.infrastructureSubnetId()); - Assertions.assertEquals("ujeickp", model.dockerBridgeCidr()); - Assertions.assertEquals("cpopmxel", model.platformReservedCidr()); - Assertions.assertEquals("clt", 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 abae444926e6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeMountTests.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.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\":\"svfycxzbfv\",\"mountPath\":\"wvrvmtg\",\"subPath\":\"ppyostronzmyhgf\"}") - .toObject(VolumeMount.class); - Assertions.assertEquals("svfycxzbfv", model.volumeName()); - Assertions.assertEquals("wvrvmtg", model.mountPath()); - Assertions.assertEquals("ppyostronzmyhgf", model.subPath()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeMount model - = new VolumeMount().withVolumeName("svfycxzbfv").withMountPath("wvrvmtg").withSubPath("ppyostronzmyhgf"); - model = BinaryData.fromObject(model).toObject(VolumeMount.class); - Assertions.assertEquals("svfycxzbfv", model.volumeName()); - Assertions.assertEquals("wvrvmtg", model.mountPath()); - Assertions.assertEquals("ppyostronzmyhgf", model.subPath()); - } -} 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 f10ba612b21b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesCollectionTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.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\":792139303,\"maximumCount\":1099107522,\"currentCount\":381107449},\"id\":\"yrneizjcpeo\",\"name\":\"khnmgbrou\",\"type\":\"ddbhf\"}],\"nextLink\":\"fpazjzoywjxhpd\"}") - .toObject(WorkloadProfileStatesCollection.class); - Assertions.assertEquals(792139303, model.value().get(0).properties().minimumCount()); - Assertions.assertEquals(1099107522, model.value().get(0).properties().maximumCount()); - Assertions.assertEquals(381107449, 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(792139303).withMaximumCount(1099107522).withCurrentCount(381107449)))); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesCollection.class); - Assertions.assertEquals(792139303, model.value().get(0).properties().minimumCount()); - Assertions.assertEquals(1099107522, model.value().get(0).properties().maximumCount()); - Assertions.assertEquals(381107449, 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 59f33bc2b768..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesInnerTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.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\":1181873760,\"maximumCount\":796854695,\"currentCount\":314959325},\"id\":\"qwtehtuevr\",\"name\":\"rljyoogwxhnsdu\",\"type\":\"gwbsreurf\"}") - .toObject(WorkloadProfileStatesInner.class); - Assertions.assertEquals(1181873760, model.properties().minimumCount()); - Assertions.assertEquals(796854695, model.properties().maximumCount()); - Assertions.assertEquals(314959325, model.properties().currentCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfileStatesInner model - = new WorkloadProfileStatesInner().withProperties(new WorkloadProfileStatesProperties() - .withMinimumCount(1181873760).withMaximumCount(796854695).withCurrentCount(314959325)); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesInner.class); - Assertions.assertEquals(1181873760, model.properties().minimumCount()); - Assertions.assertEquals(796854695, model.properties().maximumCount()); - Assertions.assertEquals(314959325, 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 224a756c1c66..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesPropertiesTests.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.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\":669436660,\"maximumCount\":2008330964,\"currentCount\":571851575}") - .toObject(WorkloadProfileStatesProperties.class); - Assertions.assertEquals(669436660, model.minimumCount()); - Assertions.assertEquals(2008330964, model.maximumCount()); - Assertions.assertEquals(571851575, model.currentCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfileStatesProperties model = new WorkloadProfileStatesProperties().withMinimumCount(669436660) - .withMaximumCount(2008330964).withCurrentCount(571851575); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesProperties.class); - Assertions.assertEquals(669436660, model.minimumCount()); - Assertions.assertEquals(2008330964, model.maximumCount()); - Assertions.assertEquals(571851575, 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 6e315d4788a6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileTests.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.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\":\"igkxkbsazga\",\"workloadProfileType\":\"gacyrcmjdmspo\",\"minimumCount\":361382788,\"maximumCount\":283706298}") - .toObject(WorkloadProfile.class); - Assertions.assertEquals("igkxkbsazga", model.name()); - Assertions.assertEquals("gacyrcmjdmspo", model.workloadProfileType()); - Assertions.assertEquals(361382788, model.minimumCount()); - Assertions.assertEquals(283706298, model.maximumCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfile model = new WorkloadProfile().withName("igkxkbsazga").withWorkloadProfileType("gacyrcmjdmspo") - .withMinimumCount(361382788).withMaximumCount(283706298); - model = BinaryData.fromObject(model).toObject(WorkloadProfile.class); - Assertions.assertEquals("igkxkbsazga", model.name()); - Assertions.assertEquals("gacyrcmjdmspo", model.workloadProfileType()); - Assertions.assertEquals(361382788, model.minimumCount()); - Assertions.assertEquals(283706298, model.maximumCount()); - } -}