diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md index 15db313586c7..2a879f9e9b74 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.5 (Unreleased) +## 1.0.0-beta.1 (2022-12-05) + +- Azure Resource Manager ContainerAppsApi client library for Java. This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Package tag package-2022-10. 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 a02875ec8d5d..465c6ad8c7e1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md @@ -2,7 +2,7 @@ Azure Resource Manager ContainerAppsApi client library for Java. -This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Package tag package-preview-2022-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Package tag package-2022-10. 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.4 + 1.0.0-beta.5 ``` [//]: # ({x-version-update-end}) @@ -41,19 +41,19 @@ Various documentation is available to help you get started Azure Management Libraries require a `TokenCredential` implementation for authentication and an `HttpClient` implementation for HTTP client. -[Azure Identity][azure_identity] package and [Azure Core Netty HTTP][azure_core_http_netty] package provide the default implementation. +[Azure Identity][azure_identity] and [Azure Core Netty HTTP][azure_core_http_netty] packages provide the default implementation. ### Authentication -By default, Azure Active Directory token authentication depends on correct configure of following environment variables. +By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. - `AZURE_CLIENT_ID` for Azure client ID. - `AZURE_TENANT_ID` for Azure tenant ID. - `AZURE_CLIENT_SECRET` or `AZURE_CLIENT_CERTIFICATE_PATH` for client secret or client certificate. -In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`. +In addition, Azure subscription ID can be configured via `AZURE_SUBSCRIPTION_ID` environment variable. -With above configuration, `azure` client can be authenticated by following code: +With above configuration, `azure` client can be authenticated using the following code: ```java AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE); @@ -83,13 +83,13 @@ See [API design][design] for general introduction on design and key concepts on ## Contributing -For details on contributing to this repository, see the [contributing guide](https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md). +For details on contributing to this repository, see the [contributing guide][cg]. -1. Fork it -1. Create your feature branch (`git checkout -b my-new-feature`) -1. Commit your changes (`git commit -am 'Add some feature'`) -1. Push to the branch (`git push origin my-new-feature`) -1. Create new Pull Request +This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit . + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. + +This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For more information see the [Code of Conduct FAQ][coc_faq] or contact with any additional questions or comments. [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS @@ -100,3 +100,6 @@ For details on contributing to this repository, see the [contributing guide](htt [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty [authenticate]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/AUTH.md [design]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/resourcemanager/docs/DESIGN.md +[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md +[coc]: https://opensource.microsoft.com/codeofconduct/ +[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md index a72d4197cf51..8cbdf5196573 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md @@ -147,7 +147,7 @@ import com.azure.core.util.Context; /** Samples for AvailableWorkloadProfiles Get. */ public final class AvailableWorkloadProfilesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AvailableWorkloadProfiles_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/AvailableWorkloadProfiles_Get.json */ /** * Sample code: BillingMeters_Get. @@ -168,7 +168,7 @@ import com.azure.core.util.Context; /** Samples for BillingMeters Get. */ public final class BillingMetersGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/BillingMeters_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/BillingMeters_Get.json */ /** * Sample code: BillingMeters_Get. @@ -184,12 +184,14 @@ public final class BillingMetersGetSamples { ### Certificates_CreateOrUpdate ```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; import com.azure.resourcemanager.appcontainers.models.CertificateProperties; /** Samples for Certificates CreateOrUpdate. */ public final class CertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Certificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. @@ -200,14 +202,17 @@ public final class CertificatesCreateOrUpdateSamples { com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .certificates() - .define("certificate-firendly-name") - .withRegion("East US") - .withExistingManagedEnvironment("examplerg", "testcontainerenv") - .withProperties( - new CertificateProperties() - .withPassword("private key password") - .withValue("PFX-or-PEM-blob".getBytes())) - .create(); + .createOrUpdateWithResponse( + "examplerg", + "testcontainerenv", + "certificate-firendly-name", + new CertificateInner() + .withLocation("East US") + .withProperties( + new CertificateProperties() + .withPassword("fakeTokenPlaceholder") + .withValue("Y2VydA==".getBytes())), + Context.NONE); } } ``` @@ -220,7 +225,7 @@ import com.azure.core.util.Context; /** Samples for Certificates Delete. */ public final class CertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Certificate_Delete.json */ /** * Sample code: Delete Certificate. @@ -243,7 +248,7 @@ import com.azure.core.util.Context; /** Samples for Certificates Get. */ public final class CertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Certificate_Get.json */ /** * Sample code: Get Certificate. @@ -266,7 +271,7 @@ import com.azure.core.util.Context; /** Samples for Certificates List. */ public final class CertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_ListByManagedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Certificates_ListByManagedEnvironment.json */ /** * Sample code: List Certificates by Managed Environment. @@ -284,14 +289,14 @@ public final class CertificatesListSamples { ```java import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.models.Certificate; +import com.azure.resourcemanager.appcontainers.models.CertificatePatch; import java.util.HashMap; import java.util.Map; /** Samples for Certificates Update. */ public final class CertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Certificates_Patch.json */ /** * Sample code: Patch Certificate. @@ -299,12 +304,14 @@ public final class CertificatesUpdateSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - Certificate resource = - manager - .certificates() - .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE) - .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + manager + .certificates() + .updateWithResponse( + "examplerg", + "testcontainerenv", + "certificate-firendly-name", + new CertificatePatch().withTags(mapOf("tag1", "value1", "tag2", "value2")), + Context.NONE); } @SuppressWarnings("unchecked") @@ -329,7 +336,7 @@ import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReque /** Samples for ConnectedEnvironments CheckNameAvailability. */ public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. @@ -355,11 +362,13 @@ public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { ```java import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; +import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; +import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; /** Samples for ConnectedEnvironments CreateOrUpdate. */ public final class ConnectedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create kube environments. @@ -372,14 +381,19 @@ public final class ConnectedEnvironmentsCreateOrUpdateSamples { .define("testenv") .withRegion("East US") .withExistingResourceGroup("examplerg") + .withExtendedLocation( + new ExtendedLocation() + .withName( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) .withStaticIp("1.2.3.4") .withDaprAIConnectionString( "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") .withCustomDomainConfiguration( new CustomDomainConfiguration() .withDnsSuffix("www.my-name.com") - .withCertificateValue("PFX-or-PEM-blob".getBytes()) - .withCertificatePassword("private key password".getBytes())) + .withCertificateValue("Y2VydA==".getBytes()) + .withCertificatePassword("fakeTokenPlaceholder")) .create(); } } @@ -393,7 +407,7 @@ import com.azure.core.util.Context; /** Samples for ConnectedEnvironments Delete. */ public final class ConnectedEnvironmentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_Delete.json */ /** * Sample code: Delete connected environment by connectedEnvironmentName. @@ -415,7 +429,7 @@ import com.azure.core.util.Context; /** Samples for ConnectedEnvironments GetByResourceGroup. */ public final class ConnectedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_Get.json */ /** * Sample code: Get connected environment by connectedEnvironmentName. @@ -437,7 +451,7 @@ import com.azure.core.util.Context; /** Samples for ConnectedEnvironments List. */ public final class ConnectedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_ListBySubscription.json */ /** * Sample code: List connected environments by subscription. @@ -459,7 +473,7 @@ import com.azure.core.util.Context; /** Samples for ConnectedEnvironments ListByResourceGroup. */ public final class ConnectedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. @@ -481,7 +495,7 @@ import com.azure.core.util.Context; /** Samples for ConnectedEnvironments Update. */ public final class ConnectedEnvironmentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_Patch.json */ /** * Sample code: Patch Managed Environment. @@ -498,14 +512,12 @@ public final class ConnectedEnvironmentsUpdateSamples { ### ConnectedEnvironmentsCertificates_CreateOrUpdate ```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; import com.azure.resourcemanager.appcontainers.models.CertificateProperties; /** Samples for ConnectedEnvironmentsCertificates CreateOrUpdate. */ public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. @@ -516,17 +528,12 @@ public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .connectedEnvironmentsCertificates() - .createOrUpdateWithResponse( - "examplerg", - "testcontainerenv", - "certificate-firendly-name", - new CertificateInner() - .withLocation("East US") - .withProperties( - new CertificateProperties() - .withPassword("private key password") - .withValue("PFX-or-PEM-blob".getBytes())), - Context.NONE); + .define("certificate-firendly-name") + .withRegion("East US") + .withExistingConnectedEnvironment("examplerg", "testcontainerenv") + .withProperties( + new CertificateProperties().withPassword("fakeTokenPlaceholder").withValue("Y2VydA==".getBytes())) + .create(); } } ``` @@ -539,7 +546,7 @@ import com.azure.core.util.Context; /** Samples for ConnectedEnvironmentsCertificates Delete. */ public final class ConnectedEnvironmentsCertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsCertificate_Delete.json */ /** * Sample code: Delete Certificate. @@ -562,7 +569,7 @@ import com.azure.core.util.Context; /** Samples for ConnectedEnvironmentsCertificates Get. */ public final class ConnectedEnvironmentsCertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsCertificate_Get.json */ /** * Sample code: Get Certificate. @@ -585,7 +592,7 @@ import com.azure.core.util.Context; /** Samples for ConnectedEnvironmentsCertificates List. */ public final class ConnectedEnvironmentsCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json */ /** * Sample code: List Certificates by Connected Environment. @@ -603,14 +610,14 @@ public final class ConnectedEnvironmentsCertificatesListSamples { ```java import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; +import com.azure.resourcemanager.appcontainers.models.Certificate; import java.util.HashMap; import java.util.Map; /** Samples for ConnectedEnvironmentsCertificates Update. */ public final class ConnectedEnvironmentsCertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsCertificates_Patch.json */ /** * Sample code: Patch Certificate. @@ -618,14 +625,12 @@ public final class ConnectedEnvironmentsCertificatesUpdateSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsCertificates() - .updateWithResponse( - "examplerg", - "testcontainerenv", - "certificate-firendly-name", - new CertificatePatch().withTags(mapOf("tag1", "value1", "tag2", "value2")), - Context.NONE); + Certificate resource = + manager + .connectedEnvironmentsCertificates() + .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @SuppressWarnings("unchecked") @@ -644,8 +649,6 @@ public final class ConnectedEnvironmentsCertificatesUpdateSamples { ### ConnectedEnvironmentsDaprComponents_CreateOrUpdate ```java -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; import com.azure.resourcemanager.appcontainers.models.DaprMetadata; import com.azure.resourcemanager.appcontainers.models.Secret; import java.util.Arrays; @@ -653,7 +656,7 @@ import java.util.Arrays; /** Samples for ConnectedEnvironmentsDaprComponents CreateOrUpdate. */ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json */ /** * Sample code: Create or update dapr component. @@ -664,25 +667,22 @@ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .connectedEnvironmentsDaprComponents() - .createOrUpdateWithResponse( - "examplerg", - "myenvironment", - "reddog", - new DaprComponentInner() - .withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) - .withMetadata( - Arrays - .asList( - new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("masterkey"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")), - Context.NONE); + .define("reddog") + .withExistingConnectedEnvironment("examplerg", "myenvironment") + .withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) + .withMetadata( + Arrays + .asList( + new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .create(); } } ``` @@ -695,7 +695,7 @@ import com.azure.core.util.Context; /** Samples for ConnectedEnvironmentsDaprComponents Delete. */ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsDaprComponents_Delete.json */ /** * Sample code: Delete dapr component. @@ -718,7 +718,7 @@ import com.azure.core.util.Context; /** Samples for ConnectedEnvironmentsDaprComponents Get. */ public final class ConnectedEnvironmentsDaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsDaprComponents_Get.json */ /** * Sample code: Get Dapr Component. @@ -741,7 +741,7 @@ import com.azure.core.util.Context; /** Samples for ConnectedEnvironmentsDaprComponents List. */ public final class ConnectedEnvironmentsDaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsDaprComponents_List.json */ /** * Sample code: List Dapr Components. @@ -762,7 +762,7 @@ import com.azure.core.util.Context; /** Samples for ConnectedEnvironmentsDaprComponents ListSecrets. */ public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -788,7 +788,7 @@ import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorag /** Samples for ConnectedEnvironmentsStorages CreateOrUpdate. */ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. @@ -806,7 +806,7 @@ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { .withAzureFile( new AzureFileProperties() .withAccountName("account1") - .withAccountKey("key") + .withAccountKey("fakeTokenPlaceholder") .withAccessMode(AccessMode.READ_ONLY) .withShareName("share1"))) .create(); @@ -822,7 +822,7 @@ import com.azure.core.util.Context; /** Samples for ConnectedEnvironmentsStorages Delete. */ public final class ConnectedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. @@ -844,7 +844,7 @@ import com.azure.core.util.Context; /** Samples for ConnectedEnvironmentsStorages Get. */ public final class ConnectedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage properties by subscription. @@ -866,7 +866,7 @@ import com.azure.core.util.Context; /** Samples for ConnectedEnvironmentsStorages List. */ public final class ConnectedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. @@ -893,10 +893,12 @@ import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; import com.azure.resourcemanager.appcontainers.models.ContainerResources; +import com.azure.resourcemanager.appcontainers.models.CorsPolicy; import com.azure.resourcemanager.appcontainers.models.CustomDomain; import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; import com.azure.resourcemanager.appcontainers.models.Dapr; import com.azure.resourcemanager.appcontainers.models.Ingress; +import com.azure.resourcemanager.appcontainers.models.IngressClientCertificateMode; import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; import com.azure.resourcemanager.appcontainers.models.InitContainer; import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; @@ -914,7 +916,7 @@ import java.util.Map; /** Samples for ContainerApps CreateOrUpdate. */ public final class ContainerAppsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App. @@ -971,7 +973,16 @@ public final class ContainerAppsCreateOrUpdateSamples { .withDescription( "Allowing all IP's within the subnet below to access containerapp") .withIpAddressRange("192.168.1.1/8") - .withAction(Action.ALLOW)))) + .withAction(Action.ALLOW))) + .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))) .withDapr( new Dapr() .withEnabled(true) @@ -1033,7 +1044,7 @@ public final class ContainerAppsCreateOrUpdateSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_TcpApp_CreateOrUpdate.json */ /** * Sample code: Create or Update Tcp App. @@ -1114,7 +1125,7 @@ import com.azure.core.util.Context; /** Samples for ContainerApps Delete. */ public final class ContainerAppsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_Delete.json */ /** * Sample code: Delete Container App. @@ -1135,7 +1146,7 @@ import com.azure.core.util.Context; /** Samples for ContainerApps GetAuthToken. */ public final class ContainerAppsGetAuthTokenSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_GetAuthToken.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_GetAuthToken.json */ /** * Sample code: Get Container App Auth Token. @@ -1157,7 +1168,7 @@ import com.azure.core.util.Context; /** Samples for ContainerApps GetByResourceGroup. */ public final class ContainerAppsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. @@ -1178,7 +1189,7 @@ import com.azure.core.util.Context; /** Samples for ContainerApps List. */ public final class ContainerAppsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_ListBySubscription.json */ /** * Sample code: List Container Apps by subscription. @@ -1200,7 +1211,7 @@ import com.azure.core.util.Context; /** Samples for ContainerApps ListByResourceGroup. */ public final class ContainerAppsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_ListByResourceGroup.json */ /** * Sample code: List Container Apps by resource group. @@ -1222,7 +1233,7 @@ import com.azure.core.util.Context; /** Samples for ContainerApps ListCustomHostnameAnalysis. */ public final class ContainerAppsListCustomHostnameAnalysisSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_ListCustomHostNameAnalysis.json */ /** * Sample code: Analyze Custom Hostname. @@ -1245,7 +1256,7 @@ import com.azure.core.util.Context; /** Samples for ContainerApps ListSecrets. */ public final class ContainerAppsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -1263,12 +1274,12 @@ public final class ContainerAppsListSecretsSamples { ```java import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; import com.azure.resourcemanager.appcontainers.models.Action; import com.azure.resourcemanager.appcontainers.models.AppProtocol; import com.azure.resourcemanager.appcontainers.models.BindingType; import com.azure.resourcemanager.appcontainers.models.Configuration; import com.azure.resourcemanager.appcontainers.models.Container; +import com.azure.resourcemanager.appcontainers.models.ContainerApp; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; @@ -1292,7 +1303,7 @@ import java.util.Map; /** Samples for ContainerApps Update. */ public final class ContainerAppsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_Patch.json */ /** * Sample code: Patch Container App. @@ -1300,113 +1311,108 @@ public final class ContainerAppsUpdateSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void patchContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerApps() - .update( - "rg", - "testcontainerApp0", - new ContainerAppInner() - .withLocation("East US") - .withTags(mapOf("tag1", "value1", "tag2", "value2")) - .withConfiguration( - new Configuration() - .withIngress( - new Ingress() - .withExternal(true) - .withTargetPort(3000) - .withTraffic( - Arrays - .asList( - new TrafficWeight() - .withRevisionName("testcontainerApp0-ab1234") - .withWeight(100) - .withLabel("production"))) - .withCustomDomains( - Arrays - .asList( - new CustomDomain() - .withName("www.my-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), - new CustomDomain() - .withName("www.my-other-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) - .withIpSecurityRestrictions( - Arrays - .asList( - new IpSecurityRestrictionRule() - .withName("Allow work IP A subnet") - .withDescription( - "Allowing all IP's within the subnet below to access" - + " containerapp") - .withIpAddressRange("192.168.1.1/32") - .withAction(Action.ALLOW), - new IpSecurityRestrictionRule() - .withName("Allow work IP B subnet") - .withDescription( - "Allowing all IP's within the subnet below to access" - + " containerapp") - .withIpAddressRange("192.168.1.1/8") - .withAction(Action.ALLOW)))) - .withDapr( - new Dapr() - .withEnabled(true) - .withAppProtocol(AppProtocol.HTTP) - .withAppPort(3000) - .withHttpReadBufferSize(30) - .withHttpMaxRequestSize(10) - .withLogLevel(LogLevel.DEBUG) - .withEnableApiLogging(true)) - .withMaxInactiveRevisions(10)) - .withTemplate( - new Template() - .withInitContainers( + ContainerApp resource = + manager.containerApps().getByResourceGroupWithResponse("rg", "testcontainerApp0", Context.NONE).getValue(); + resource + .update() + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withConfiguration( + new Configuration() + .withIngress( + new Ingress() + .withExternal(true) + .withTargetPort(3000) + .withTraffic( Arrays .asList( - new InitContainer() - .withImage("repo/testcontainerApp0:v4") - .withName("testinitcontainerApp0") - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers( + new TrafficWeight() + .withRevisionName("testcontainerApp0-ab1234") + .withWeight(100) + .withLabel("production"))) + .withCustomDomains( Arrays .asList( - new Container() - .withImage("repo/testcontainerApp0:v1") - .withName("testcontainerApp0") - .withProbes( - Arrays - .asList( - new ContainerAppProbe() - .withHttpGet( - new ContainerAppProbeHttpGet() - .withHttpHeaders( - Arrays - .asList( - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header") - .withValue("Awesome"))) - .withPath("/health") - .withPort(8080)) - .withInitialDelaySeconds(3) - .withPeriodSeconds(3) - .withType(Type.LIVENESS))))) - .withScale( - new Scale() - .withMinReplicas(1) - .withMaxReplicas(5) - .withRules( + 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)))) + .withDapr( + new Dapr() + .withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30) + .withHttpMaxRequestSize(10) + .withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withMaxInactiveRevisions(10)) + .withTemplate( + new Template() + .withInitContainers( + Arrays + .asList( + new InitContainer() + .withImage("repo/testcontainerApp0:v4") + .withName("testinitcontainerApp0") + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers( + Arrays + .asList( + new Container() + .withImage("repo/testcontainerApp0:v1") + .withName("testcontainerApp0") + .withProbes( Arrays .asList( - new ScaleRule() - .withName("httpscalingrule") - .withCustom( - new CustomScaleRule() - .withType("http") - .withMetadata(mapOf("concurrentRequests", "50"))))))), - Context.NONE); + 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"))))))) + .apply(); } @SuppressWarnings("unchecked") @@ -1435,7 +1441,7 @@ import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActio /** Samples for ContainerAppsAuthConfigs CreateOrUpdate. */ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/AuthConfigs_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App AuthConfig. @@ -1456,7 +1462,9 @@ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { .withFacebook( new Facebook() .withRegistration( - new AppRegistration().withAppId("123").withAppSecretSettingName("facebook-secret")))) + new AppRegistration() + .withAppId("123") + .withAppSecretSettingName("fakeTokenPlaceholder")))) .create(); } } @@ -1470,7 +1478,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsAuthConfigs Delete. */ public final class ContainerAppsAuthConfigsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/AuthConfigs_Delete.json */ /** * Sample code: Delete Container App AuthConfig. @@ -1494,7 +1502,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsAuthConfigs Get. */ public final class ContainerAppsAuthConfigsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/AuthConfigs_Get.json */ /** * Sample code: Get Container App's AuthConfig. @@ -1518,7 +1526,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsAuthConfigs ListByContainerApp. */ public final class ContainerAppsAuthConfigsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/AuthConfigs_ListByContainer.json */ /** * Sample code: List Auth Configs by Container Apps. @@ -1540,7 +1548,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsDiagnostics GetDetector. */ public final class ContainerAppsDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerAppsDiagnostics_Get.json */ /** * Sample code: Get Container App's diagnostics info. @@ -1565,7 +1573,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsDiagnostics GetRevision. */ public final class ContainerAppsDiagnosticsGetRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. @@ -1589,7 +1597,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsDiagnostics GetRoot. */ public final class ContainerAppsDiagnosticsGetRootSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. @@ -1610,7 +1618,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsDiagnostics ListDetectors. */ public final class ContainerAppsDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerAppsDiagnostics_List.json */ /** * Sample code: Get the list of available diagnostics for a given Container App. @@ -1634,7 +1642,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsDiagnostics ListRevisions. */ public final class ContainerAppsDiagnosticsListRevisionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. @@ -1656,7 +1664,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsRevisionReplicas GetReplica. */ public final class ContainerAppsRevisionReplicasGetReplicaSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Replicas_Get.json */ /** * Sample code: Get Container App's revision replica. @@ -1681,7 +1689,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsRevisionReplicas ListReplicas. */ public final class ContainerAppsRevisionReplicasListReplicasSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Replicas_List.json */ /** * Sample code: List Container App's replicas. @@ -1705,7 +1713,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsRevisions ActivateRevision. */ public final class ContainerAppsRevisionsActivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Activate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_Activate.json */ /** * Sample code: Activate Container App's revision. @@ -1729,7 +1737,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsRevisions DeactivateRevision. */ public final class ContainerAppsRevisionsDeactivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Deactivate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_Deactivate.json */ /** * Sample code: Deactivate Container App's revision. @@ -1753,7 +1761,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsRevisions GetRevision. */ public final class ContainerAppsRevisionsGetRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. @@ -1777,7 +1785,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsRevisions ListRevisions. */ public final class ContainerAppsRevisionsListRevisionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. @@ -1799,7 +1807,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsRevisions RestartRevision. */ public final class ContainerAppsRevisionsRestartRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Restart.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_Restart.json */ /** * Sample code: Restart Container App's revision. @@ -1825,7 +1833,7 @@ import com.azure.resourcemanager.appcontainers.models.RegistryInfo; /** Samples for ContainerAppsSourceControls CreateOrUpdate. */ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/SourceControls_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App SourceControl. @@ -1846,11 +1854,11 @@ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { new RegistryInfo() .withRegistryUrl("xwang971reg.azurecr.io") .withRegistryUsername("xwang971reg") - .withRegistryPassword("")) + .withRegistryPassword("fakeTokenPlaceholder")) .withAzureCredentials( new AzureCredentials() .withClientId("") - .withClientSecret("") + .withClientSecret("fakeTokenPlaceholder") .withTenantId("")) .withContextPath("./") .withImage("image/tag")) @@ -1867,7 +1875,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsSourceControls Delete. */ public final class ContainerAppsSourceControlsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/SourceControls_Delete.json */ /** * Sample code: Delete Container App SourceControl. @@ -1889,7 +1897,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsSourceControls Get. */ public final class ContainerAppsSourceControlsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/SourceControls_Get.json */ /** * Sample code: Get Container App's SourceControl. @@ -1913,7 +1921,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsSourceControls ListByContainerApp. */ public final class ContainerAppsSourceControlsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/SourceControls_ListByContainer.json */ /** * Sample code: List App's Source Controls. @@ -1929,6 +1937,8 @@ public final class ContainerAppsSourceControlsListByContainerAppSamples { ### DaprComponents_CreateOrUpdate ```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; import com.azure.resourcemanager.appcontainers.models.DaprMetadata; import com.azure.resourcemanager.appcontainers.models.Secret; import java.util.Arrays; @@ -1936,7 +1946,7 @@ import java.util.Arrays; /** Samples for DaprComponents CreateOrUpdate. */ public final class DaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_CreateOrUpdate_Secrets.json */ /** * Sample code: Create or update dapr component with secrets. @@ -1947,26 +1957,29 @@ public final class DaprComponentsCreateOrUpdateSamples { com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .daprComponents() - .define("reddog") - .withExistingManagedEnvironment("examplerg", "myenvironment") - .withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) - .withMetadata( - Arrays - .asList( - new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("masterkey"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")) - .create(); + .createOrUpdateWithResponse( + "examplerg", + "myenvironment", + "reddog", + new DaprComponentInner() + .withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) + .withMetadata( + Arrays + .asList( + new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")), + Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json */ /** * Sample code: Create or update dapr component with secret store component. @@ -1977,22 +1990,25 @@ public final class DaprComponentsCreateOrUpdateSamples { com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .daprComponents() - .define("reddog") - .withExistingManagedEnvironment("examplerg", "myenvironment") - .withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecretStoreComponent("my-secret-store") - .withMetadata( - Arrays - .asList( - new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("masterkey"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")) - .create(); + .createOrUpdateWithResponse( + "examplerg", + "myenvironment", + "reddog", + new DaprComponentInner() + .withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecretStoreComponent("fakeTokenPlaceholder") + .withMetadata( + Arrays + .asList( + new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")), + Context.NONE); } } ``` @@ -2005,7 +2021,7 @@ import com.azure.core.util.Context; /** Samples for DaprComponents Delete. */ public final class DaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_Delete.json */ /** * Sample code: Delete dapr component. @@ -2026,7 +2042,7 @@ import com.azure.core.util.Context; /** Samples for DaprComponents Get. */ public final class DaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_Get_SecretStoreComponent.json */ /** * Sample code: Get Dapr Component with secret store component. @@ -2039,7 +2055,7 @@ public final class DaprComponentsGetSamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_Secrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_Get_Secrets.json */ /** * Sample code: Get Dapr Component with secrets. @@ -2061,7 +2077,7 @@ import com.azure.core.util.Context; /** Samples for DaprComponents List. */ public final class DaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_List.json */ /** * Sample code: List Dapr Components. @@ -2082,7 +2098,7 @@ import com.azure.core.util.Context; /** Samples for DaprComponents ListSecrets. */ public final class DaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -2104,7 +2120,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironmentDiagnostics GetDetector. */ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironmentDiagnostics_Get.json */ /** * Sample code: Get diagnostic data for a managed environments. @@ -2129,7 +2145,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironmentDiagnostics ListDetectors. */ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironmentDiagnostics_List.json */ /** * Sample code: Get the list of available diagnostic data for a managed environments. @@ -2162,7 +2178,7 @@ import java.util.Arrays; /** Samples for ManagedEnvironments CreateOrUpdate. */ public final class ManagedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create environments. @@ -2175,6 +2191,7 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { .define("testcontainerenv") .withRegion("East US") .withExistingResourceGroup("examplerg") + .withKind("serverless") .withSku(new EnvironmentSkuProperties().withName(SkuName.PREMIUM)) .withDaprAIConnectionString( "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") @@ -2187,13 +2204,13 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { .withAppLogsConfiguration( new AppLogsConfiguration() .withLogAnalyticsConfiguration( - new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("string"))) + new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("fakeTokenPlaceholder"))) .withZoneRedundant(true) .withCustomDomainConfiguration( new CustomDomainConfiguration() .withDnsSuffix("www.my-name.com") - .withCertificateValue("PFX-or-PEM-blob".getBytes()) - .withCertificatePassword("private key password".getBytes())) + .withCertificateValue("Y2VydA==".getBytes()) + .withCertificatePassword("fakeTokenPlaceholder")) .withWorkloadProfiles( Arrays .asList( @@ -2222,7 +2239,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironments Delete. */ public final class ManagedEnvironmentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_Delete.json */ /** * Sample code: Delete environment by name. @@ -2244,7 +2261,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironments GetAuthToken. */ public final class ManagedEnvironmentsGetAuthTokenSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_GetAuthToken.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_GetAuthToken.json */ /** * Sample code: Get Managed Environment Auth Token. @@ -2266,7 +2283,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironments GetByResourceGroup. */ public final class ManagedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. @@ -2287,7 +2304,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironments List. */ public final class ManagedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_ListBySubscription.json */ /** * Sample code: List environments by subscription. @@ -2309,7 +2326,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironments ListByResourceGroup. */ public final class ManagedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. @@ -2331,7 +2348,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironments ListWorkloadProfileStates. */ public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_ListWorkloadProfileStates.json */ /** * Sample code: List environments by subscription. @@ -2349,14 +2366,14 @@ public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { ```java import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironment; import java.util.HashMap; import java.util.Map; /** Samples for ManagedEnvironments Update. */ public final class ManagedEnvironmentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_Patch.json */ /** * Sample code: Patch Managed Environment. @@ -2365,15 +2382,12 @@ public final class ManagedEnvironmentsUpdateSamples { */ public static void patchManagedEnvironment( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironments() - .update( - "examplerg", - "testcontainerenv", - new ManagedEnvironmentInner() - .withLocation("East US") - .withTags(mapOf("tag1", "value1", "tag2", "value2")), - Context.NONE); + ManagedEnvironment resource = + manager + .managedEnvironments() + .getByResourceGroupWithResponse("examplerg", "testcontainerenv", Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @SuppressWarnings("unchecked") @@ -2397,7 +2411,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironmentsDiagnostics GetRoot. */ public final class ManagedEnvironmentsDiagnosticsGetRootSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. @@ -2420,7 +2434,7 @@ import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorageP /** Samples for ManagedEnvironmentsStorages CreateOrUpdate. */ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. @@ -2438,7 +2452,7 @@ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { .withAzureFile( new AzureFileProperties() .withAccountName("account1") - .withAccountKey("key") + .withAccountKey("fakeTokenPlaceholder") .withAccessMode(AccessMode.READ_ONLY) .withShareName("share1"))) .create(); @@ -2454,7 +2468,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironmentsStorages Delete. */ public final class ManagedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. @@ -2476,7 +2490,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironmentsStorages Get. */ public final class ManagedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage properties by subscription. @@ -2498,7 +2512,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironmentsStorages List. */ public final class ManagedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. @@ -2521,7 +2535,7 @@ import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReque /** Samples for Namespaces CheckNameAvailability. */ public final class NamespacesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Certificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. @@ -2542,7 +2556,7 @@ public final class NamespacesCheckNameAvailabilitySamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_CheckNameAvailability.json */ /** * Sample code: ContainerApps_CheckNameAvailability. @@ -2570,7 +2584,7 @@ import com.azure.core.util.Context; /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Operations_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Operations_List.json */ /** * Sample code: List all operations. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml b/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml index 716dc194d784..760fc189ae26 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for ContainerAppsApi Management - This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-preview-2022-06. + 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-2022-10. 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 6af58a925aaf..6ef7dea26dc0 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 @@ -76,14 +76,24 @@ public final class ContainerAppsApiManager { private ContainerAppsAuthConfigs containerAppsAuthConfigs; + private AvailableWorkloadProfiles availableWorkloadProfiles; + + private BillingMeters billingMeters; + + private ConnectedEnvironments connectedEnvironments; + + private ConnectedEnvironmentsCertificates connectedEnvironmentsCertificates; + + private ConnectedEnvironmentsDaprComponents connectedEnvironmentsDaprComponents; + + private ConnectedEnvironmentsStorages connectedEnvironmentsStorages; + private ContainerApps containerApps; private ContainerAppsRevisions containerAppsRevisions; private ContainerAppsRevisionReplicas containerAppsRevisionReplicas; - private DaprComponents daprComponents; - private ContainerAppsDiagnostics containerAppsDiagnostics; private ManagedEnvironmentDiagnostics managedEnvironmentDiagnostics; @@ -98,22 +108,12 @@ public final class ContainerAppsApiManager { private Namespaces namespaces; + private DaprComponents daprComponents; + private ManagedEnvironmentsStorages managedEnvironmentsStorages; private ContainerAppsSourceControls containerAppsSourceControls; - private ConnectedEnvironments connectedEnvironments; - - private ConnectedEnvironmentsCertificates connectedEnvironmentsCertificates; - - private ConnectedEnvironmentsDaprComponents connectedEnvironmentsDaprComponents; - - private ConnectedEnvironmentsStorages connectedEnvironmentsStorages; - - private AvailableWorkloadProfiles availableWorkloadProfiles; - - private BillingMeters billingMeters; - private final ContainerAppsApiClient clientObject; private ContainerAppsApiManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -279,7 +279,7 @@ public ContainerAppsApiManager authenticate(TokenCredential credential, AzurePro .append("-") .append("com.azure.resourcemanager.appcontainers") .append("/") - .append("1.0.0-beta.4"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -349,6 +349,83 @@ public ContainerAppsAuthConfigs containerAppsAuthConfigs() { return containerAppsAuthConfigs; } + /** + * Gets the resource collection API of AvailableWorkloadProfiles. + * + * @return Resource collection API of AvailableWorkloadProfiles. + */ + public AvailableWorkloadProfiles availableWorkloadProfiles() { + if (this.availableWorkloadProfiles == null) { + this.availableWorkloadProfiles = + new AvailableWorkloadProfilesImpl(clientObject.getAvailableWorkloadProfiles(), this); + } + return availableWorkloadProfiles; + } + + /** + * Gets the resource collection API of BillingMeters. + * + * @return Resource collection API of BillingMeters. + */ + public BillingMeters billingMeters() { + if (this.billingMeters == null) { + this.billingMeters = new BillingMetersImpl(clientObject.getBillingMeters(), this); + } + return billingMeters; + } + + /** + * Gets the resource collection API of ConnectedEnvironments. It manages ConnectedEnvironment. + * + * @return Resource collection API of ConnectedEnvironments. + */ + public ConnectedEnvironments connectedEnvironments() { + if (this.connectedEnvironments == null) { + this.connectedEnvironments = new ConnectedEnvironmentsImpl(clientObject.getConnectedEnvironments(), this); + } + return connectedEnvironments; + } + + /** + * Gets the resource collection API of ConnectedEnvironmentsCertificates. It manages Certificate. + * + * @return Resource collection API of ConnectedEnvironmentsCertificates. + */ + public ConnectedEnvironmentsCertificates connectedEnvironmentsCertificates() { + if (this.connectedEnvironmentsCertificates == null) { + this.connectedEnvironmentsCertificates = + new ConnectedEnvironmentsCertificatesImpl(clientObject.getConnectedEnvironmentsCertificates(), this); + } + return connectedEnvironmentsCertificates; + } + + /** + * Gets the resource collection API of ConnectedEnvironmentsDaprComponents. It manages DaprComponent. + * + * @return Resource collection API of ConnectedEnvironmentsDaprComponents. + */ + public ConnectedEnvironmentsDaprComponents connectedEnvironmentsDaprComponents() { + if (this.connectedEnvironmentsDaprComponents == null) { + this.connectedEnvironmentsDaprComponents = + new ConnectedEnvironmentsDaprComponentsImpl( + clientObject.getConnectedEnvironmentsDaprComponents(), this); + } + return connectedEnvironmentsDaprComponents; + } + + /** + * Gets the resource collection API of ConnectedEnvironmentsStorages. It manages ConnectedEnvironmentStorage. + * + * @return Resource collection API of ConnectedEnvironmentsStorages. + */ + public ConnectedEnvironmentsStorages connectedEnvironmentsStorages() { + if (this.connectedEnvironmentsStorages == null) { + this.connectedEnvironmentsStorages = + new ConnectedEnvironmentsStoragesImpl(clientObject.getConnectedEnvironmentsStorages(), this); + } + return connectedEnvironmentsStorages; + } + /** * Gets the resource collection API of ContainerApps. It manages ContainerApp. * @@ -387,18 +464,6 @@ public ContainerAppsRevisionReplicas containerAppsRevisionReplicas() { return containerAppsRevisionReplicas; } - /** - * Gets the resource collection API of DaprComponents. It manages DaprComponent. - * - * @return Resource collection API of DaprComponents. - */ - public DaprComponents daprComponents() { - if (this.daprComponents == null) { - this.daprComponents = new DaprComponentsImpl(clientObject.getDaprComponents(), this); - } - return daprComponents; - } - /** * Gets the resource collection API of ContainerAppsDiagnostics. * @@ -463,7 +528,7 @@ public ManagedEnvironments managedEnvironments() { } /** - * Gets the resource collection API of Certificates. It manages Certificate. + * Gets the resource collection API of Certificates. * * @return Resource collection API of Certificates. */ @@ -486,6 +551,18 @@ public Namespaces namespaces() { return namespaces; } + /** + * Gets the resource collection API of DaprComponents. + * + * @return Resource collection API of DaprComponents. + */ + public DaprComponents daprComponents() { + if (this.daprComponents == null) { + this.daprComponents = new DaprComponentsImpl(clientObject.getDaprComponents(), this); + } + return daprComponents; + } + /** * Gets the resource collection API of ManagedEnvironmentsStorages. It manages ManagedEnvironmentStorage. * @@ -512,83 +589,6 @@ public ContainerAppsSourceControls containerAppsSourceControls() { return containerAppsSourceControls; } - /** - * Gets the resource collection API of ConnectedEnvironments. It manages ConnectedEnvironment. - * - * @return Resource collection API of ConnectedEnvironments. - */ - public ConnectedEnvironments connectedEnvironments() { - if (this.connectedEnvironments == null) { - this.connectedEnvironments = new ConnectedEnvironmentsImpl(clientObject.getConnectedEnvironments(), this); - } - return connectedEnvironments; - } - - /** - * Gets the resource collection API of ConnectedEnvironmentsCertificates. - * - * @return Resource collection API of ConnectedEnvironmentsCertificates. - */ - public ConnectedEnvironmentsCertificates connectedEnvironmentsCertificates() { - if (this.connectedEnvironmentsCertificates == null) { - this.connectedEnvironmentsCertificates = - new ConnectedEnvironmentsCertificatesImpl(clientObject.getConnectedEnvironmentsCertificates(), this); - } - return connectedEnvironmentsCertificates; - } - - /** - * Gets the resource collection API of ConnectedEnvironmentsDaprComponents. - * - * @return Resource collection API of ConnectedEnvironmentsDaprComponents. - */ - public ConnectedEnvironmentsDaprComponents connectedEnvironmentsDaprComponents() { - if (this.connectedEnvironmentsDaprComponents == null) { - this.connectedEnvironmentsDaprComponents = - new ConnectedEnvironmentsDaprComponentsImpl( - clientObject.getConnectedEnvironmentsDaprComponents(), this); - } - return connectedEnvironmentsDaprComponents; - } - - /** - * Gets the resource collection API of ConnectedEnvironmentsStorages. It manages ConnectedEnvironmentStorage. - * - * @return Resource collection API of ConnectedEnvironmentsStorages. - */ - public ConnectedEnvironmentsStorages connectedEnvironmentsStorages() { - if (this.connectedEnvironmentsStorages == null) { - this.connectedEnvironmentsStorages = - new ConnectedEnvironmentsStoragesImpl(clientObject.getConnectedEnvironmentsStorages(), this); - } - return connectedEnvironmentsStorages; - } - - /** - * Gets the resource collection API of AvailableWorkloadProfiles. - * - * @return Resource collection API of AvailableWorkloadProfiles. - */ - public AvailableWorkloadProfiles availableWorkloadProfiles() { - if (this.availableWorkloadProfiles == null) { - this.availableWorkloadProfiles = - new AvailableWorkloadProfilesImpl(clientObject.getAvailableWorkloadProfiles(), this); - } - return availableWorkloadProfiles; - } - - /** - * Gets the resource collection API of BillingMeters. - * - * @return Resource collection API of BillingMeters. - */ - public BillingMeters billingMeters() { - if (this.billingMeters == null) { - this.billingMeters = new BillingMetersImpl(clientObject.getBillingMeters(), this); - } - return billingMeters; - } - /** * @return Wrapped service client ContainerAppsApiClient providing direct access to the underlying auto-generated * API implementation, based on Azure REST API. 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 b7f2855529f3..b2bd26cb7155 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 @@ -51,6 +51,48 @@ public interface ContainerAppsApiClient { */ ContainerAppsAuthConfigsClient getContainerAppsAuthConfigs(); + /** + * Gets the AvailableWorkloadProfilesClient object to access its operations. + * + * @return the AvailableWorkloadProfilesClient object. + */ + AvailableWorkloadProfilesClient getAvailableWorkloadProfiles(); + + /** + * Gets the BillingMetersClient object to access its operations. + * + * @return the BillingMetersClient object. + */ + BillingMetersClient getBillingMeters(); + + /** + * Gets the ConnectedEnvironmentsClient object to access its operations. + * + * @return the ConnectedEnvironmentsClient object. + */ + ConnectedEnvironmentsClient getConnectedEnvironments(); + + /** + * Gets the ConnectedEnvironmentsCertificatesClient object to access its operations. + * + * @return the ConnectedEnvironmentsCertificatesClient object. + */ + ConnectedEnvironmentsCertificatesClient getConnectedEnvironmentsCertificates(); + + /** + * Gets the ConnectedEnvironmentsDaprComponentsClient object to access its operations. + * + * @return the ConnectedEnvironmentsDaprComponentsClient object. + */ + ConnectedEnvironmentsDaprComponentsClient getConnectedEnvironmentsDaprComponents(); + + /** + * Gets the ConnectedEnvironmentsStoragesClient object to access its operations. + * + * @return the ConnectedEnvironmentsStoragesClient object. + */ + ConnectedEnvironmentsStoragesClient getConnectedEnvironmentsStorages(); + /** * Gets the ContainerAppsClient object to access its operations. * @@ -72,13 +114,6 @@ public interface ContainerAppsApiClient { */ ContainerAppsRevisionReplicasClient getContainerAppsRevisionReplicas(); - /** - * Gets the DaprComponentsClient object to access its operations. - * - * @return the DaprComponentsClient object. - */ - DaprComponentsClient getDaprComponents(); - /** * Gets the ContainerAppsDiagnosticsClient object to access its operations. * @@ -128,6 +163,13 @@ public interface ContainerAppsApiClient { */ NamespacesClient getNamespaces(); + /** + * Gets the DaprComponentsClient object to access its operations. + * + * @return the DaprComponentsClient object. + */ + DaprComponentsClient getDaprComponents(); + /** * Gets the ManagedEnvironmentsStoragesClient object to access its operations. * @@ -141,46 +183,4 @@ public interface ContainerAppsApiClient { * @return the ContainerAppsSourceControlsClient object. */ ContainerAppsSourceControlsClient getContainerAppsSourceControls(); - - /** - * Gets the ConnectedEnvironmentsClient object to access its operations. - * - * @return the ConnectedEnvironmentsClient object. - */ - ConnectedEnvironmentsClient getConnectedEnvironments(); - - /** - * Gets the ConnectedEnvironmentsCertificatesClient object to access its operations. - * - * @return the ConnectedEnvironmentsCertificatesClient object. - */ - ConnectedEnvironmentsCertificatesClient getConnectedEnvironmentsCertificates(); - - /** - * Gets the ConnectedEnvironmentsDaprComponentsClient object to access its operations. - * - * @return the ConnectedEnvironmentsDaprComponentsClient object. - */ - ConnectedEnvironmentsDaprComponentsClient getConnectedEnvironmentsDaprComponents(); - - /** - * Gets the ConnectedEnvironmentsStoragesClient object to access its operations. - * - * @return the ConnectedEnvironmentsStoragesClient object. - */ - ConnectedEnvironmentsStoragesClient getConnectedEnvironmentsStorages(); - - /** - * Gets the AvailableWorkloadProfilesClient object to access its operations. - * - * @return the AvailableWorkloadProfilesClient object. - */ - AvailableWorkloadProfilesClient getAvailableWorkloadProfiles(); - - /** - * Gets the BillingMetersClient object to access its operations. - * - * @return the BillingMetersClient object. - */ - BillingMetersClient getBillingMeters(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsClient.java index bf77072df0af..1e82557b5b6b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsClient.java @@ -231,10 +231,10 @@ ContainerAppInner createOrUpdate( * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdate( + SyncPoller, ContainerAppInner> beginUpdate( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope); /** @@ -250,10 +250,10 @@ SyncPoller, Void> beginUpdate( * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdate( + SyncPoller, ContainerAppInner> beginUpdate( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context); /** @@ -268,9 +268,10 @@ SyncPoller, Void> beginUpdate( * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App. */ @ServiceMethod(returns = ReturnType.SINGLE) - void update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope); + ContainerAppInner update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope); /** * Update properties of a Container App @@ -285,9 +286,10 @@ SyncPoller, Void> beginUpdate( * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App. */ @ServiceMethod(returns = ReturnType.SINGLE) - void update( + ContainerAppInner update( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context); /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsClient.java index 12bb72b96036..b2aa7dd53430 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsClient.java @@ -260,10 +260,10 @@ ManagedEnvironmentInner createOrUpdate( * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdate( + SyncPoller, ManagedEnvironmentInner> beginUpdate( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); /** @@ -279,10 +279,10 @@ SyncPoller, Void> beginUpdate( * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginUpdate( + SyncPoller, ManagedEnvironmentInner> beginUpdate( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); /** @@ -297,9 +297,11 @@ SyncPoller, Void> beginUpdate( * @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 an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.SINGLE) - void update(String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); + ManagedEnvironmentInner update( + String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); /** * Update Managed Environment's properties. @@ -314,9 +316,10 @@ SyncPoller, Void> beginUpdate( * @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 an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.SINGLE) - void update( + ManagedEnvironmentInner update( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); /** 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 0f37c337d055..87acfc441084 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 @@ -209,6 +209,15 @@ public String latestRevisionName() { return this.innerProperties() == null ? null : this.innerProperties().latestRevisionName(); } + /** + * Get the latestReadyRevisionName property: Name of the latest ready revision of the Container App. + * + * @return the latestReadyRevisionName value. + */ + public String latestReadyRevisionName() { + return this.innerProperties() == null ? null : this.innerProperties().latestReadyRevisionName(); + } + /** * Get the latestRevisionFqdn property: Fully Qualified Domain 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 b4f8ae444a42..68eda7b7394c 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 @@ -44,6 +44,12 @@ public final class ContainerAppProperties { @JsonProperty(value = "latestRevisionName", access = JsonProperty.Access.WRITE_ONLY) private String latestRevisionName; + /* + * Name of the latest ready revision of the Container App. + */ + @JsonProperty(value = "latestReadyRevisionName", access = JsonProperty.Access.WRITE_ONLY) + private String latestReadyRevisionName; + /* * Fully Qualified Domain Name of the latest revision of the Container App. */ @@ -162,6 +168,15 @@ public String latestRevisionName() { return this.latestRevisionName; } + /** + * Get the latestReadyRevisionName property: Name of the latest ready revision of the Container App. + * + * @return the latestReadyRevisionName value. + */ + public String latestReadyRevisionName() { + return this.latestReadyRevisionName; + } + /** * Get the latestRevisionFqdn property: Fully Qualified Domain 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/DaprSecretsCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSecretsCollectionInner.java index 340ba9e1b5ac..72cdffb68801 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSecretsCollectionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSecretsCollectionInner.java @@ -6,7 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.util.logging.ClientLogger; -import com.azure.resourcemanager.appcontainers.models.Secret; +import com.azure.resourcemanager.appcontainers.models.DaprSecret; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; @@ -17,7 +17,7 @@ public final class DaprSecretsCollectionInner { * Collection of secrets used by a Dapr component */ @JsonProperty(value = "value", required = true) - private List value; + private List value; /** Creates an instance of DaprSecretsCollectionInner class. */ public DaprSecretsCollectionInner() { @@ -28,7 +28,7 @@ public DaprSecretsCollectionInner() { * * @return the value value. */ - public List value() { + public List value() { return this.value; } @@ -38,7 +38,7 @@ public List value() { * @param value the value value to set. * @return the DaprSecretsCollectionInner object itself. */ - public DaprSecretsCollectionInner withValue(List value) { + public DaprSecretsCollectionInner withValue(List value) { this.value = value; return this; } 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 a75d12a08e15..9206719587b8 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 @@ -20,6 +20,12 @@ /** An environment for hosting container apps. */ @Fluent public final class ManagedEnvironmentInner extends Resource { + /* + * Kind of the Environment. + */ + @JsonProperty(value = "kind") + private String kind; + /* * SKU properties of the Environment. */ @@ -42,6 +48,26 @@ public final class ManagedEnvironmentInner extends Resource { public ManagedEnvironmentInner() { } + /** + * Get the kind property: Kind of the Environment. + * + * @return the kind value. + */ + public String kind() { + return this.kind; + } + + /** + * Set the kind property: Kind of the Environment. + * + * @param kind the kind value to set. + * @return the ManagedEnvironmentInner object itself. + */ + public ManagedEnvironmentInner withKind(String kind) { + this.kind = kind; + return this; + } + /** * Get the sku property: SKU properties of the Environment. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesClientImpl.java index 8a3a3e3b2b10..121067742178 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesClientImpl.java @@ -57,7 +57,7 @@ public final class AvailableWorkloadProfilesClientImpl implements AvailableWorkl */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface AvailableWorkloadProfilesService { + public interface AvailableWorkloadProfilesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}" diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersClientImpl.java index 98f328927105..ca38979de6dc 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersClientImpl.java @@ -50,7 +50,7 @@ public final class BillingMetersClientImpl implements BillingMetersClient { */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface BillingMetersService { + public interface BillingMetersService { @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}/billingMeters") @ExpectedResponses({200}) diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificateImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificateImpl.java index 0e95dfc5f011..2c083dfc0e7c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificateImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificateImpl.java @@ -74,15 +74,15 @@ private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager( private String resourceGroupName; - private String environmentName; + private String connectedEnvironmentName; private String certificateName; private CertificatePatch updateCertificateEnvelope; - public CertificateImpl withExistingManagedEnvironment(String resourceGroupName, String environmentName) { + public CertificateImpl withExistingConnectedEnvironment(String resourceGroupName, String connectedEnvironmentName) { this.resourceGroupName = resourceGroupName; - this.environmentName = environmentName; + this.connectedEnvironmentName = connectedEnvironmentName; return this; } @@ -90,9 +90,9 @@ public Certificate create() { this.innerObject = serviceManager .serviceClient() - .getCertificates() + .getConnectedEnvironmentsCertificates() .createOrUpdateWithResponse( - resourceGroupName, environmentName, certificateName, this.innerModel(), Context.NONE) + resourceGroupName, connectedEnvironmentName, certificateName, this.innerModel(), Context.NONE) .getValue(); return this; } @@ -101,9 +101,9 @@ public Certificate create(Context context) { this.innerObject = serviceManager .serviceClient() - .getCertificates() + .getConnectedEnvironmentsCertificates() .createOrUpdateWithResponse( - resourceGroupName, environmentName, certificateName, this.innerModel(), context) + resourceGroupName, connectedEnvironmentName, certificateName, this.innerModel(), context) .getValue(); return this; } @@ -123,9 +123,13 @@ public Certificate apply() { this.innerObject = serviceManager .serviceClient() - .getCertificates() + .getConnectedEnvironmentsCertificates() .updateWithResponse( - resourceGroupName, environmentName, certificateName, updateCertificateEnvelope, Context.NONE) + resourceGroupName, + connectedEnvironmentName, + certificateName, + updateCertificateEnvelope, + Context.NONE) .getValue(); return this; } @@ -134,9 +138,9 @@ public Certificate apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getCertificates() + .getConnectedEnvironmentsCertificates() .updateWithResponse( - resourceGroupName, environmentName, certificateName, updateCertificateEnvelope, context) + resourceGroupName, connectedEnvironmentName, certificateName, updateCertificateEnvelope, context) .getValue(); return this; } @@ -146,7 +150,7 @@ public Certificate apply(Context context) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.environmentName = Utils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); + this.connectedEnvironmentName = Utils.getValueFromIdByName(innerObject.id(), "connectedEnvironments"); this.certificateName = Utils.getValueFromIdByName(innerObject.id(), "certificates"); } @@ -154,8 +158,8 @@ public Certificate refresh() { this.innerObject = serviceManager .serviceClient() - .getCertificates() - .getWithResponse(resourceGroupName, environmentName, certificateName, Context.NONE) + .getConnectedEnvironmentsCertificates() + .getWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, Context.NONE) .getValue(); return this; } @@ -164,8 +168,8 @@ public Certificate refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getCertificates() - .getWithResponse(resourceGroupName, environmentName, certificateName, context) + .getConnectedEnvironmentsCertificates() + .getWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, context) .getValue(); return this; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesClientImpl.java index b3ab88433a8d..a94614bf4a5b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesClientImpl.java @@ -60,7 +60,7 @@ public final class CertificatesClientImpl implements CertificatesClient { */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface CertificatesService { + public interface CertificatesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesImpl.java index 86498b92b8ee..9a24cb875758 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesImpl.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.appcontainers.fluent.CertificatesClient; import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; import com.azure.resourcemanager.appcontainers.models.Certificate; +import com.azure.resourcemanager.appcontainers.models.CertificatePatch; import com.azure.resourcemanager.appcontainers.models.Certificates; public final class CertificatesImpl implements Certificates { @@ -62,6 +63,38 @@ public Certificate get(String resourceGroupName, String environmentName, String } } + public Response createOrUpdateWithResponse( + String resourceGroupName, + String environmentName, + String certificateName, + CertificateInner certificateEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateWithResponse( + resourceGroupName, environmentName, certificateName, certificateEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CertificateImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Certificate createOrUpdate(String resourceGroupName, String environmentName, String certificateName) { + CertificateInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, environmentName, certificateName); + if (inner != null) { + return new CertificateImpl(inner, this.manager()); + } else { + return null; + } + } + public Response deleteWithResponse( String resourceGroupName, String environmentName, String certificateName, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, certificateName, context); @@ -71,116 +104,39 @@ public void delete(String resourceGroupName, String environmentName, String cert this.serviceClient().delete(resourceGroupName, environmentName, certificateName); } - public Certificate getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String certificateName = Utils.getValueFromIdByName(id, "certificates"); - if (certificateName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, certificateName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String certificateName = Utils.getValueFromIdByName(id, "certificates"); - if (certificateName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, certificateName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String certificateName = Utils.getValueFromIdByName(id, "certificates"); - if (certificateName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); + public Response updateWithResponse( + String resourceGroupName, + String environmentName, + String certificateName, + CertificatePatch certificateEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .updateWithResponse(resourceGroupName, environmentName, certificateName, certificateEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CertificateImpl(inner.getValue(), this.manager())); + } else { + return null; } - this.deleteWithResponse(resourceGroupName, environmentName, certificateName, Context.NONE); } - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String certificateName = Utils.getValueFromIdByName(id, "certificates"); - if (certificateName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); + public Certificate update( + String resourceGroupName, + String environmentName, + String certificateName, + CertificatePatch certificateEnvelope) { + CertificateInner inner = + this.serviceClient().update(resourceGroupName, environmentName, certificateName, certificateEnvelope); + if (inner != null) { + return new CertificateImpl(inner, this.manager()); + } else { + return null; } - return this.deleteWithResponse(resourceGroupName, environmentName, certificateName, context); } private CertificatesClient serviceClient() { @@ -190,8 +146,4 @@ private CertificatesClient serviceClient() { private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { return this.serviceManager; } - - public CertificateImpl define(String name) { - return new CertificateImpl(name, this.manager()); - } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java index 4b0c4f9f133e..d9e39127da08 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java @@ -66,7 +66,7 @@ public final class ConnectedEnvironmentsCertificatesClientImpl implements Connec */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ConnectedEnvironmentsCertificatesService { + public interface ConnectedEnvironmentsCertificatesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesImpl.java index 851e48480365..6c5a00ced3de 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesImpl.java @@ -12,7 +12,6 @@ import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsCertificatesClient; import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; import com.azure.resourcemanager.appcontainers.models.Certificate; -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsCertificates; public final class ConnectedEnvironmentsCertificatesImpl implements ConnectedEnvironmentsCertificates { @@ -64,39 +63,6 @@ public Certificate get(String resourceGroupName, String connectedEnvironmentName } } - public Response createOrUpdateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificateInner certificateEnvelope, - Context context) { - Response inner = - this - .serviceClient() - .createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new CertificateImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public Certificate createOrUpdate( - String resourceGroupName, String connectedEnvironmentName, String certificateName) { - CertificateInner inner = - this.serviceClient().createOrUpdate(resourceGroupName, connectedEnvironmentName, certificateName); - if (inner != null) { - return new CertificateImpl(inner, this.manager()); - } else { - return null; - } - } - public Response deleteWithResponse( String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context) { return this @@ -108,42 +74,122 @@ public void delete(String resourceGroupName, String connectedEnvironmentName, St this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, certificateName); } - public Response updateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificatePatch certificateEnvelope, - Context context) { - Response inner = - this - .serviceClient() - .updateWithResponse( - resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new CertificateImpl(inner.getValue(), this.manager())); - } else { - return null; + public Certificate getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } + String connectedEnvironmentName = Utils.getValueFromIdByName(id, "connectedEnvironments"); + if (connectedEnvironmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", + id))); + } + String certificateName = Utils.getValueFromIdByName(id, "certificates"); + if (certificateName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); + } + return this + .getWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, Context.NONE) + .getValue(); } - public Certificate update( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificatePatch certificateEnvelope) { - CertificateInner inner = - this - .serviceClient() - .update(resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope); - if (inner != null) { - return new CertificateImpl(inner, this.manager()); - } else { - return null; + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String connectedEnvironmentName = Utils.getValueFromIdByName(id, "connectedEnvironments"); + if (connectedEnvironmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", + id))); + } + String certificateName = Utils.getValueFromIdByName(id, "certificates"); + if (certificateName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); } + return this.getWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String connectedEnvironmentName = Utils.getValueFromIdByName(id, "connectedEnvironments"); + if (connectedEnvironmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", + id))); + } + String certificateName = Utils.getValueFromIdByName(id, "certificates"); + if (certificateName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); + } + this.deleteWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String connectedEnvironmentName = Utils.getValueFromIdByName(id, "connectedEnvironments"); + if (connectedEnvironmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", + id))); + } + String certificateName = Utils.getValueFromIdByName(id, "certificates"); + if (certificateName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'certificates'.", id))); + } + return this.deleteWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, context); } private ConnectedEnvironmentsCertificatesClient serviceClient() { @@ -153,4 +199,8 @@ private ConnectedEnvironmentsCertificatesClient serviceClient() { private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { return this.serviceManager; } + + public CertificateImpl define(String name) { + return new CertificateImpl(name, this.manager()); + } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsClientImpl.java index c19ba549ecf2..61e508e83b0f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsClientImpl.java @@ -68,7 +68,7 @@ public final class ConnectedEnvironmentsClientImpl implements ConnectedEnvironme */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ConnectedEnvironmentsService { + public interface ConnectedEnvironmentsService { @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/connectedEnvironments") @ExpectedResponses({200}) diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java index bb0656b535b8..265101bc18ac 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java @@ -66,7 +66,7 @@ public final class ConnectedEnvironmentsDaprComponentsClientImpl implements Conn */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ConnectedEnvironmentsDaprComponentsService { + public interface ConnectedEnvironmentsDaprComponentsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java index 14b9d452dbc3..a42732ed38b8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java @@ -67,44 +67,6 @@ public DaprComponent get(String resourceGroupName, String connectedEnvironmentNa } } - public Response createOrUpdateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String componentName, - DaprComponentInner daprComponentEnvelope, - Context context) { - Response inner = - this - .serviceClient() - .createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope, context); - if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), - new DaprComponentImpl(inner.getValue(), this.manager())); - } else { - return null; - } - } - - public DaprComponent createOrUpdate( - String resourceGroupName, - String connectedEnvironmentName, - String componentName, - DaprComponentInner daprComponentEnvelope) { - DaprComponentInner inner = - this - .serviceClient() - .createOrUpdate(resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope); - if (inner != null) { - return new DaprComponentImpl(inner, this.manager()); - } else { - return null; - } - } - public Response deleteWithResponse( String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { return this @@ -144,6 +106,128 @@ public DaprSecretsCollection listSecrets( } } + public DaprComponent getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String connectedEnvironmentName = Utils.getValueFromIdByName(id, "connectedEnvironments"); + if (connectedEnvironmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", + id))); + } + String componentName = Utils.getValueFromIdByName(id, "daprComponents"); + if (componentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); + } + return this + .getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String connectedEnvironmentName = Utils.getValueFromIdByName(id, "connectedEnvironments"); + if (connectedEnvironmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", + id))); + } + String componentName = Utils.getValueFromIdByName(id, "daprComponents"); + if (componentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); + } + return this.getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String connectedEnvironmentName = Utils.getValueFromIdByName(id, "connectedEnvironments"); + if (connectedEnvironmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", + id))); + } + String componentName = Utils.getValueFromIdByName(id, "daprComponents"); + if (componentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); + } + this.deleteWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String connectedEnvironmentName = Utils.getValueFromIdByName(id, "connectedEnvironments"); + if (connectedEnvironmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", + id))); + } + String componentName = Utils.getValueFromIdByName(id, "daprComponents"); + if (componentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); + } + return this.deleteWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); + } + private ConnectedEnvironmentsDaprComponentsClient serviceClient() { return this.innerClient; } @@ -151,4 +235,8 @@ private ConnectedEnvironmentsDaprComponentsClient serviceClient() { private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { return this.serviceManager; } + + public DaprComponentImpl define(String name) { + return new DaprComponentImpl(name, this.manager()); + } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java index b74dc46476d2..4d52f5e2c09c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java @@ -58,7 +58,7 @@ public final class ConnectedEnvironmentsStoragesClientImpl implements ConnectedE */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ConnectedEnvironmentsStoragesService { + public interface ConnectedEnvironmentsStoragesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" 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 26f5c8d21376..545ebe4c7a9f 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 @@ -84,6 +84,10 @@ public String latestRevisionName() { return this.innerModel().latestRevisionName(); } + public String latestReadyRevisionName() { + return this.innerModel().latestReadyRevisionName(); + } + public String latestRevisionFqdn() { return this.innerModel().latestRevisionFqdn(); } @@ -175,7 +179,7 @@ public ContainerApp apply() { serviceManager .serviceClient() .getContainerApps() - .createOrUpdate(resourceGroupName, containerAppName, this.innerModel(), Context.NONE); + .update(resourceGroupName, containerAppName, this.innerModel(), Context.NONE); return this; } @@ -184,7 +188,7 @@ public ContainerApp apply(Context context) { serviceManager .serviceClient() .getContainerApps() - .createOrUpdate(resourceGroupName, containerAppName, this.innerModel(), context); + .update(resourceGroupName, containerAppName, this.innerModel(), context); 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 ae4e2dfa8dc6..3f4a82655930 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 @@ -139,6 +139,78 @@ public ContainerAppsAuthConfigsClient getContainerAppsAuthConfigs() { return this.containerAppsAuthConfigs; } + /** The AvailableWorkloadProfilesClient object to access its operations. */ + private final AvailableWorkloadProfilesClient availableWorkloadProfiles; + + /** + * Gets the AvailableWorkloadProfilesClient object to access its operations. + * + * @return the AvailableWorkloadProfilesClient object. + */ + public AvailableWorkloadProfilesClient getAvailableWorkloadProfiles() { + return this.availableWorkloadProfiles; + } + + /** The BillingMetersClient object to access its operations. */ + private final BillingMetersClient billingMeters; + + /** + * Gets the BillingMetersClient object to access its operations. + * + * @return the BillingMetersClient object. + */ + public BillingMetersClient getBillingMeters() { + return this.billingMeters; + } + + /** The ConnectedEnvironmentsClient object to access its operations. */ + private final ConnectedEnvironmentsClient connectedEnvironments; + + /** + * Gets the ConnectedEnvironmentsClient object to access its operations. + * + * @return the ConnectedEnvironmentsClient object. + */ + public ConnectedEnvironmentsClient getConnectedEnvironments() { + return this.connectedEnvironments; + } + + /** The ConnectedEnvironmentsCertificatesClient object to access its operations. */ + private final ConnectedEnvironmentsCertificatesClient connectedEnvironmentsCertificates; + + /** + * Gets the ConnectedEnvironmentsCertificatesClient object to access its operations. + * + * @return the ConnectedEnvironmentsCertificatesClient object. + */ + public ConnectedEnvironmentsCertificatesClient getConnectedEnvironmentsCertificates() { + return this.connectedEnvironmentsCertificates; + } + + /** The ConnectedEnvironmentsDaprComponentsClient object to access its operations. */ + private final ConnectedEnvironmentsDaprComponentsClient connectedEnvironmentsDaprComponents; + + /** + * Gets the ConnectedEnvironmentsDaprComponentsClient object to access its operations. + * + * @return the ConnectedEnvironmentsDaprComponentsClient object. + */ + public ConnectedEnvironmentsDaprComponentsClient getConnectedEnvironmentsDaprComponents() { + return this.connectedEnvironmentsDaprComponents; + } + + /** The ConnectedEnvironmentsStoragesClient object to access its operations. */ + private final ConnectedEnvironmentsStoragesClient connectedEnvironmentsStorages; + + /** + * Gets the ConnectedEnvironmentsStoragesClient object to access its operations. + * + * @return the ConnectedEnvironmentsStoragesClient object. + */ + public ConnectedEnvironmentsStoragesClient getConnectedEnvironmentsStorages() { + return this.connectedEnvironmentsStorages; + } + /** The ContainerAppsClient object to access its operations. */ private final ContainerAppsClient containerApps; @@ -175,18 +247,6 @@ public ContainerAppsRevisionReplicasClient getContainerAppsRevisionReplicas() { return this.containerAppsRevisionReplicas; } - /** The DaprComponentsClient object to access its operations. */ - private final DaprComponentsClient daprComponents; - - /** - * Gets the DaprComponentsClient object to access its operations. - * - * @return the DaprComponentsClient object. - */ - public DaprComponentsClient getDaprComponents() { - return this.daprComponents; - } - /** The ContainerAppsDiagnosticsClient object to access its operations. */ private final ContainerAppsDiagnosticsClient containerAppsDiagnostics; @@ -271,6 +331,18 @@ public NamespacesClient getNamespaces() { return this.namespaces; } + /** The DaprComponentsClient object to access its operations. */ + private final DaprComponentsClient daprComponents; + + /** + * Gets the DaprComponentsClient object to access its operations. + * + * @return the DaprComponentsClient object. + */ + public DaprComponentsClient getDaprComponents() { + return this.daprComponents; + } + /** The ManagedEnvironmentsStoragesClient object to access its operations. */ private final ManagedEnvironmentsStoragesClient managedEnvironmentsStorages; @@ -295,78 +367,6 @@ public ContainerAppsSourceControlsClient getContainerAppsSourceControls() { return this.containerAppsSourceControls; } - /** The ConnectedEnvironmentsClient object to access its operations. */ - private final ConnectedEnvironmentsClient connectedEnvironments; - - /** - * Gets the ConnectedEnvironmentsClient object to access its operations. - * - * @return the ConnectedEnvironmentsClient object. - */ - public ConnectedEnvironmentsClient getConnectedEnvironments() { - return this.connectedEnvironments; - } - - /** The ConnectedEnvironmentsCertificatesClient object to access its operations. */ - private final ConnectedEnvironmentsCertificatesClient connectedEnvironmentsCertificates; - - /** - * Gets the ConnectedEnvironmentsCertificatesClient object to access its operations. - * - * @return the ConnectedEnvironmentsCertificatesClient object. - */ - public ConnectedEnvironmentsCertificatesClient getConnectedEnvironmentsCertificates() { - return this.connectedEnvironmentsCertificates; - } - - /** The ConnectedEnvironmentsDaprComponentsClient object to access its operations. */ - private final ConnectedEnvironmentsDaprComponentsClient connectedEnvironmentsDaprComponents; - - /** - * Gets the ConnectedEnvironmentsDaprComponentsClient object to access its operations. - * - * @return the ConnectedEnvironmentsDaprComponentsClient object. - */ - public ConnectedEnvironmentsDaprComponentsClient getConnectedEnvironmentsDaprComponents() { - return this.connectedEnvironmentsDaprComponents; - } - - /** The ConnectedEnvironmentsStoragesClient object to access its operations. */ - private final ConnectedEnvironmentsStoragesClient connectedEnvironmentsStorages; - - /** - * Gets the ConnectedEnvironmentsStoragesClient object to access its operations. - * - * @return the ConnectedEnvironmentsStoragesClient object. - */ - public ConnectedEnvironmentsStoragesClient getConnectedEnvironmentsStorages() { - return this.connectedEnvironmentsStorages; - } - - /** The AvailableWorkloadProfilesClient object to access its operations. */ - private final AvailableWorkloadProfilesClient availableWorkloadProfiles; - - /** - * Gets the AvailableWorkloadProfilesClient object to access its operations. - * - * @return the AvailableWorkloadProfilesClient object. - */ - public AvailableWorkloadProfilesClient getAvailableWorkloadProfiles() { - return this.availableWorkloadProfiles; - } - - /** The BillingMetersClient object to access its operations. */ - private final BillingMetersClient billingMeters; - - /** - * Gets the BillingMetersClient object to access its operations. - * - * @return the BillingMetersClient object. - */ - public BillingMetersClient getBillingMeters() { - return this.billingMeters; - } - /** * Initializes an instance of ContainerAppsApiClient client. * @@ -389,12 +389,17 @@ public BillingMetersClient getBillingMeters() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-06-01-preview"; + this.apiVersion = "2022-10-01"; this.containerAppsAuthConfigs = new ContainerAppsAuthConfigsClientImpl(this); + this.availableWorkloadProfiles = new AvailableWorkloadProfilesClientImpl(this); + this.billingMeters = new BillingMetersClientImpl(this); + this.connectedEnvironments = new ConnectedEnvironmentsClientImpl(this); + this.connectedEnvironmentsCertificates = new ConnectedEnvironmentsCertificatesClientImpl(this); + this.connectedEnvironmentsDaprComponents = new ConnectedEnvironmentsDaprComponentsClientImpl(this); + this.connectedEnvironmentsStorages = new ConnectedEnvironmentsStoragesClientImpl(this); this.containerApps = new ContainerAppsClientImpl(this); this.containerAppsRevisions = new ContainerAppsRevisionsClientImpl(this); this.containerAppsRevisionReplicas = new ContainerAppsRevisionReplicasClientImpl(this); - this.daprComponents = new DaprComponentsClientImpl(this); this.containerAppsDiagnostics = new ContainerAppsDiagnosticsClientImpl(this); this.managedEnvironmentDiagnostics = new ManagedEnvironmentDiagnosticsClientImpl(this); this.managedEnvironmentsDiagnostics = new ManagedEnvironmentsDiagnosticsClientImpl(this); @@ -402,14 +407,9 @@ public BillingMetersClient getBillingMeters() { this.managedEnvironments = new ManagedEnvironmentsClientImpl(this); this.certificates = new CertificatesClientImpl(this); this.namespaces = new NamespacesClientImpl(this); + this.daprComponents = new DaprComponentsClientImpl(this); this.managedEnvironmentsStorages = new ManagedEnvironmentsStoragesClientImpl(this); this.containerAppsSourceControls = new ContainerAppsSourceControlsClientImpl(this); - this.connectedEnvironments = new ConnectedEnvironmentsClientImpl(this); - this.connectedEnvironmentsCertificates = new ConnectedEnvironmentsCertificatesClientImpl(this); - this.connectedEnvironmentsDaprComponents = new ConnectedEnvironmentsDaprComponentsClientImpl(this); - this.connectedEnvironmentsStorages = new ConnectedEnvironmentsStoragesClientImpl(this); - this.availableWorkloadProfiles = new AvailableWorkloadProfilesClientImpl(this); - this.billingMeters = new BillingMetersClientImpl(this); } /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsClientImpl.java index 7af8a2bde9c4..de270ec3acb3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsClientImpl.java @@ -59,7 +59,7 @@ public final class ContainerAppsAuthConfigsClientImpl implements ContainerAppsAu */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ContainerAppsAuthConfigsService { + public interface ContainerAppsAuthConfigsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsClientImpl.java index 0aafa672aee8..175b2f8ec6ae 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsClientImpl.java @@ -69,7 +69,7 @@ public final class ContainerAppsClientImpl implements ContainerAppsClient { */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ContainerAppsService { + public interface ContainerAppsService { @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/containerApps") @ExpectedResponses({200}) @@ -143,7 +143,7 @@ Mono>> delete( @Patch( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" + "/{containerAppName}") - @ExpectedResponses({202}) + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono>> update( @HostParam("$host") String endpoint, @@ -1189,7 +1189,7 @@ public void delete(String resourceGroupName, String containerAppName, Context co * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return container App along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -1249,7 +1249,7 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return container App along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -1305,17 +1305,21 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateAsync( + private PollerFlux, ContainerAppInner> beginUpdateAsync( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { Mono>> mono = updateWithResponseAsync(resourceGroupName, containerAppName, containerAppEnvelope); return this .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + .getLroResult( + mono, + this.client.getHttpPipeline(), + ContainerAppInner.class, + ContainerAppInner.class, + this.client.getContext()); } /** @@ -1330,17 +1334,18 @@ private PollerFlux, Void> beginUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateAsync( + private PollerFlux, ContainerAppInner> beginUpdateAsync( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { context = this.client.mergeContext(context); Mono>> mono = updateWithResponseAsync(resourceGroupName, containerAppName, containerAppEnvelope, context); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + .getLroResult( + mono, this.client.getHttpPipeline(), ContainerAppInner.class, ContainerAppInner.class, context); } /** @@ -1354,10 +1359,10 @@ private PollerFlux, Void> beginUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdate( + public SyncPoller, ContainerAppInner> beginUpdate( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { return beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope).getSyncPoller(); } @@ -1374,10 +1379,10 @@ public SyncPoller, Void> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdate( + public SyncPoller, ContainerAppInner> beginUpdate( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { return beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context).getSyncPoller(); } @@ -1393,10 +1398,10 @@ public SyncPoller, Void> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return container App on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( + private Mono updateAsync( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { return beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope) .last() @@ -1415,10 +1420,10 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return container App on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( + private Mono updateAsync( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { return beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context) .last() @@ -1436,10 +1441,12 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { - updateAsync(resourceGroupName, containerAppName, containerAppEnvelope).block(); + public ContainerAppInner update( + String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { + return updateAsync(resourceGroupName, containerAppName, containerAppEnvelope).block(); } /** @@ -1454,11 +1461,12 @@ public void update(String resourceGroupName, String containerAppName, ContainerA * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void update( + public ContainerAppInner update( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { - updateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context).block(); + return updateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context).block(); } /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsClientImpl.java index fa0c2d32eb4a..7eda9e8c6737 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsClientImpl.java @@ -60,7 +60,7 @@ public final class ContainerAppsDiagnosticsClientImpl implements ContainerAppsDi */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ContainerAppsDiagnosticsService { + public interface ContainerAppsDiagnosticsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsImpl.java index 10d93f3c80fc..2487493c7ff6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsImpl.java @@ -86,15 +86,6 @@ public void delete(String resourceGroupName, String containerAppName, Context co this.serviceClient().delete(resourceGroupName, containerAppName, context); } - public void update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { - this.serviceClient().update(resourceGroupName, containerAppName, containerAppEnvelope); - } - - public void update( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { - this.serviceClient().update(resourceGroupName, containerAppName, containerAppEnvelope, context); - } - public Response listCustomHostnameAnalysisWithResponse( String resourceGroupName, String containerAppName, String customHostname, Context context) { Response inner = diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasClientImpl.java index 6b7ce6545dd6..838278de24ee 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasClientImpl.java @@ -55,7 +55,7 @@ public final class ContainerAppsRevisionReplicasClientImpl implements ContainerA */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ContainerAppsRevisionReplicasService { + public interface ContainerAppsRevisionReplicasService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsClientImpl.java index eb37e3d57d3a..d0bc07ba4ae1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsClientImpl.java @@ -57,7 +57,7 @@ public final class ContainerAppsRevisionsClientImpl implements ContainerAppsRevi */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ContainerAppsRevisionsService { + public interface ContainerAppsRevisionsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java index 2d24f2d839e3..e4681fb557bd 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java @@ -65,7 +65,7 @@ public final class ContainerAppsSourceControlsClientImpl implements ContainerApp */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ContainerAppsSourceControlsService { + public interface ContainerAppsSourceControlsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java index 0585f315609e..f4699fac8b92 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java @@ -97,13 +97,14 @@ private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager( private String resourceGroupName; - private String environmentName; + private String connectedEnvironmentName; private String componentName; - public DaprComponentImpl withExistingManagedEnvironment(String resourceGroupName, String environmentName) { + public DaprComponentImpl withExistingConnectedEnvironment( + String resourceGroupName, String connectedEnvironmentName) { this.resourceGroupName = resourceGroupName; - this.environmentName = environmentName; + this.connectedEnvironmentName = connectedEnvironmentName; return this; } @@ -111,9 +112,9 @@ public DaprComponent create() { this.innerObject = serviceManager .serviceClient() - .getDaprComponents() + .getConnectedEnvironmentsDaprComponents() .createOrUpdateWithResponse( - resourceGroupName, environmentName, componentName, this.innerModel(), Context.NONE) + resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), Context.NONE) .getValue(); return this; } @@ -122,9 +123,9 @@ public DaprComponent create(Context context) { this.innerObject = serviceManager .serviceClient() - .getDaprComponents() + .getConnectedEnvironmentsDaprComponents() .createOrUpdateWithResponse( - resourceGroupName, environmentName, componentName, this.innerModel(), context) + resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), context) .getValue(); return this; } @@ -143,9 +144,9 @@ public DaprComponent apply() { this.innerObject = serviceManager .serviceClient() - .getDaprComponents() + .getConnectedEnvironmentsDaprComponents() .createOrUpdateWithResponse( - resourceGroupName, environmentName, componentName, this.innerModel(), Context.NONE) + resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), Context.NONE) .getValue(); return this; } @@ -154,9 +155,9 @@ public DaprComponent apply(Context context) { this.innerObject = serviceManager .serviceClient() - .getDaprComponents() + .getConnectedEnvironmentsDaprComponents() .createOrUpdateWithResponse( - resourceGroupName, environmentName, componentName, this.innerModel(), context) + resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), context) .getValue(); return this; } @@ -167,7 +168,7 @@ public DaprComponent apply(Context context) { this.innerObject = innerObject; this.serviceManager = serviceManager; this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.environmentName = Utils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); + this.connectedEnvironmentName = Utils.getValueFromIdByName(innerObject.id(), "connectedEnvironments"); this.componentName = Utils.getValueFromIdByName(innerObject.id(), "daprComponents"); } @@ -175,8 +176,8 @@ public DaprComponent refresh() { this.innerObject = serviceManager .serviceClient() - .getDaprComponents() - .getWithResponse(resourceGroupName, environmentName, componentName, Context.NONE) + .getConnectedEnvironmentsDaprComponents() + .getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE) .getValue(); return this; } @@ -185,20 +186,22 @@ public DaprComponent refresh(Context context) { this.innerObject = serviceManager .serviceClient() - .getDaprComponents() - .getWithResponse(resourceGroupName, environmentName, componentName, context) + .getConnectedEnvironmentsDaprComponents() + .getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context) .getValue(); return this; } public Response listSecretsWithResponse(Context context) { return serviceManager - .daprComponents() - .listSecretsWithResponse(resourceGroupName, environmentName, componentName, context); + .connectedEnvironmentsDaprComponents() + .listSecretsWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); } public DaprSecretsCollection listSecrets() { - return serviceManager.daprComponents().listSecrets(resourceGroupName, environmentName, componentName); + return serviceManager + .connectedEnvironmentsDaprComponents() + .listSecrets(resourceGroupName, connectedEnvironmentName, componentName); } public DaprComponentImpl withComponentType(String componentType) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsClientImpl.java index 17ea587bad67..77a1262ca238 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsClientImpl.java @@ -60,7 +60,7 @@ public final class DaprComponentsClientImpl implements DaprComponentsClient { */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface DaprComponentsService { + public interface DaprComponentsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsImpl.java index 0be16fce3137..516bc044c8fe 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsImpl.java @@ -65,6 +65,44 @@ public DaprComponent get(String resourceGroupName, String environmentName, Strin } } + public Response createOrUpdateWithResponse( + String resourceGroupName, + String environmentName, + String componentName, + DaprComponentInner daprComponentEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateWithResponse( + resourceGroupName, environmentName, componentName, daprComponentEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DaprComponentImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DaprComponent createOrUpdate( + String resourceGroupName, + String environmentName, + String componentName, + DaprComponentInner daprComponentEnvelope) { + DaprComponentInner inner = + this + .serviceClient() + .createOrUpdate(resourceGroupName, environmentName, componentName, daprComponentEnvelope); + if (inner != null) { + return new DaprComponentImpl(inner, this.manager()); + } else { + return null; + } + } + public Response deleteWithResponse( String resourceGroupName, String environmentName, String componentName, Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, componentName, context); @@ -99,122 +137,6 @@ public DaprSecretsCollection listSecrets(String resourceGroupName, String enviro } } - public DaprComponent getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String componentName = Utils.getValueFromIdByName(id, "daprComponents"); - if (componentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, componentName, Context.NONE).getValue(); - } - - public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String componentName = Utils.getValueFromIdByName(id, "daprComponents"); - if (componentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - return this.getWithResponse(resourceGroupName, environmentName, componentName, context); - } - - public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String componentName = Utils.getValueFromIdByName(id, "daprComponents"); - if (componentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - this.deleteWithResponse(resourceGroupName, environmentName, componentName, Context.NONE); - } - - public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); - if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); - } - String environmentName = Utils.getValueFromIdByName(id, "managedEnvironments"); - if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String componentName = Utils.getValueFromIdByName(id, "daprComponents"); - if (componentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - return this.deleteWithResponse(resourceGroupName, environmentName, componentName, context); - } - private DaprComponentsClient serviceClient() { return this.innerClient; } @@ -222,8 +144,4 @@ private DaprComponentsClient serviceClient() { private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { return this.serviceManager; } - - public DaprComponentImpl define(String name) { - return new DaprComponentImpl(name, this.manager()); - } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSecretsCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSecretsCollectionImpl.java index e515816a4cfb..444784c197fe 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSecretsCollectionImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSecretsCollectionImpl.java @@ -5,8 +5,8 @@ package com.azure.resourcemanager.appcontainers.implementation; import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; +import com.azure.resourcemanager.appcontainers.models.DaprSecret; import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; -import com.azure.resourcemanager.appcontainers.models.Secret; import java.util.Collections; import java.util.List; @@ -22,8 +22,8 @@ public final class DaprSecretsCollectionImpl implements DaprSecretsCollection { this.serviceManager = serviceManager; } - public List value() { - List inner = this.innerModel().value(); + public List value() { + List inner = this.innerModel().value(); if (inner != null) { return Collections.unmodifiableList(inner); } else { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsClientImpl.java index 0ece0ae0eada..d80ef3ea1a5d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsClientImpl.java @@ -55,7 +55,7 @@ public final class ManagedEnvironmentDiagnosticsClientImpl implements ManagedEnv */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ManagedEnvironmentDiagnosticsService { + public interface ManagedEnvironmentDiagnosticsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" 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 9304a629fcf5..a11af83afbdd 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 @@ -52,6 +52,10 @@ public Map tags() { } } + public String kind() { + return this.innerModel().kind(); + } + public EnvironmentSkuProperties sku() { return this.innerModel().sku(); } @@ -176,7 +180,7 @@ public ManagedEnvironment apply() { serviceManager .serviceClient() .getManagedEnvironments() - .createOrUpdate(resourceGroupName, environmentName, this.innerModel(), Context.NONE); + .update(resourceGroupName, environmentName, this.innerModel(), Context.NONE); return this; } @@ -185,7 +189,7 @@ public ManagedEnvironment apply(Context context) { serviceManager .serviceClient() .getManagedEnvironments() - .createOrUpdate(resourceGroupName, environmentName, this.innerModel(), context); + .update(resourceGroupName, environmentName, this.innerModel(), context); return this; } @@ -243,6 +247,11 @@ public ManagedEnvironmentImpl withTags(Map tags) { return this; } + public ManagedEnvironmentImpl withKind(String kind) { + this.innerModel().withKind(kind); + return this; + } + public ManagedEnvironmentImpl withSku(EnvironmentSkuProperties sku) { this.innerModel().withSku(sku); return this; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsClientImpl.java index 2eeb567c9132..9aed93973746 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsClientImpl.java @@ -68,7 +68,7 @@ public final class ManagedEnvironmentsClientImpl implements ManagedEnvironmentsC */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ManagedEnvironmentsService { + public interface ManagedEnvironmentsService { @Headers({"Content-Type: application/json"}) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/managedEnvironments") @ExpectedResponses({200}) @@ -144,7 +144,7 @@ Mono>> delete( @Patch( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" + "/managedEnvironments/{environmentName}") - @ExpectedResponses({202}) + @ExpectedResponses({200, 202}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono>> update( @HostParam("$host") String endpoint, @@ -1281,7 +1281,8 @@ public void delete(String resourceGroupName, String environmentName, Context con * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return an environment for hosting container apps along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -1341,7 +1342,8 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response} on successful completion of {@link Mono}. + * @return an environment for hosting container apps along with {@link Response} on successful completion of {@link + * Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> updateWithResponseAsync( @@ -1400,17 +1402,21 @@ private Mono>> updateWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateAsync( + private PollerFlux, ManagedEnvironmentInner> beginUpdateAsync( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { Mono>> mono = updateWithResponseAsync(resourceGroupName, environmentName, environmentEnvelope); return this .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + .getLroResult( + mono, + this.client.getHttpPipeline(), + ManagedEnvironmentInner.class, + ManagedEnvironmentInner.class, + this.client.getContext()); } /** @@ -1425,10 +1431,10 @@ private PollerFlux, Void> beginUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link PollerFlux} for polling of long-running operation. + * @return the {@link PollerFlux} for polling of an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginUpdateAsync( + private PollerFlux, ManagedEnvironmentInner> beginUpdateAsync( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, @@ -1438,7 +1444,12 @@ private PollerFlux, Void> beginUpdateAsync( updateWithResponseAsync(resourceGroupName, environmentName, environmentEnvelope, context); return this .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + .getLroResult( + mono, + this.client.getHttpPipeline(), + ManagedEnvironmentInner.class, + ManagedEnvironmentInner.class, + context); } /** @@ -1452,10 +1463,10 @@ private PollerFlux, Void> beginUpdateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdate( + public SyncPoller, ManagedEnvironmentInner> beginUpdate( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { return beginUpdateAsync(resourceGroupName, environmentName, environmentEnvelope).getSyncPoller(); } @@ -1472,10 +1483,10 @@ public SyncPoller, Void> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link SyncPoller} for polling of long-running operation. + * @return the {@link SyncPoller} for polling of an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginUpdate( + public SyncPoller, ManagedEnvironmentInner> beginUpdate( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, @@ -1494,10 +1505,10 @@ public SyncPoller, Void> beginUpdate( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return an environment for hosting container apps on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( + private Mono updateAsync( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { return beginUpdateAsync(resourceGroupName, environmentName, environmentEnvelope) .last() @@ -1516,10 +1527,10 @@ private Mono updateAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return A {@link Mono} that completes when a successful response is received. + * @return an environment for hosting container apps on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( + private Mono updateAsync( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, @@ -1540,10 +1551,12 @@ private Mono updateAsync( * @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 an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void update(String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - updateAsync(resourceGroupName, environmentName, environmentEnvelope).block(); + public ManagedEnvironmentInner update( + String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { + return updateAsync(resourceGroupName, environmentName, environmentEnvelope).block(); } /** @@ -1558,14 +1571,15 @@ public void update(String resourceGroupName, String environmentName, ManagedEnvi * @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 an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void update( + public ManagedEnvironmentInner update( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context) { - updateAsync(resourceGroupName, environmentName, environmentEnvelope, context).block(); + return updateAsync(resourceGroupName, environmentName, environmentEnvelope, context).block(); } /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsClientImpl.java index 208603d33220..f8bfc998da93 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsClientImpl.java @@ -54,7 +54,7 @@ public final class ManagedEnvironmentsDiagnosticsClientImpl implements ManagedEn */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ManagedEnvironmentsDiagnosticsService { + public interface ManagedEnvironmentsDiagnosticsService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsImpl.java index 19aa83d705b5..80f706e9a89c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsImpl.java @@ -85,18 +85,6 @@ public void delete(String resourceGroupName, String environmentName, Context con this.serviceClient().delete(resourceGroupName, environmentName, context); } - public void update(String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - this.serviceClient().update(resourceGroupName, environmentName, environmentEnvelope); - } - - public void update( - String resourceGroupName, - String environmentName, - ManagedEnvironmentInner environmentEnvelope, - Context context) { - this.serviceClient().update(resourceGroupName, environmentName, environmentEnvelope, context); - } - public Response getAuthTokenWithResponse( String resourceGroupName, String environmentName, Context context) { Response inner = diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesClientImpl.java index ee07f227ead3..d5892a64eab3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesClientImpl.java @@ -56,7 +56,7 @@ public final class ManagedEnvironmentsStoragesClientImpl implements ManagedEnvir */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface ManagedEnvironmentsStoragesService { + public interface ManagedEnvironmentsStoragesService { @Headers({"Content-Type: application/json"}) @Get( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesClientImpl.java index 88bc0b2704a9..c682983cdc57 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesClientImpl.java @@ -52,7 +52,7 @@ public final class NamespacesClientImpl implements NamespacesClient { */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface NamespacesService { + public interface NamespacesService { @Headers({"Content-Type: application/json"}) @Post( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationsClientImpl.java index 951798c3d460..6f299e42cfed 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationsClientImpl.java @@ -55,7 +55,7 @@ public final class OperationsClientImpl implements OperationsClient { */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") - private interface OperationsService { + public interface OperationsService { @Headers({"Content-Type: application/json"}) @Get("/providers/Microsoft.App/operations") @ExpectedResponses({200}) diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificate.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificate.java index d54e84215e26..25177f50653f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificate.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificate.java @@ -122,13 +122,13 @@ interface WithLocation { /** The stage of the Certificate definition allowing to specify parent resource. */ interface WithParentResource { /** - * Specifies resourceGroupName, environmentName. + * Specifies resourceGroupName, connectedEnvironmentName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. + * @param connectedEnvironmentName Name of the Connected Environment. * @return the next definition stage. */ - WithCreate withExistingManagedEnvironment(String resourceGroupName, String environmentName); + WithCreate withExistingConnectedEnvironment(String resourceGroupName, String connectedEnvironmentName); } /** * The stage of the Certificate definition which contains all the minimum required properties for the resource diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificates.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificates.java index 7a068f3e8d0b..3604ca25aca7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificates.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificates.java @@ -7,6 +7,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; /** Resource collection API of Certificates. */ public interface Certificates { @@ -68,23 +69,29 @@ Response getWithResponse( Certificate get(String resourceGroupName, String environmentName, String certificateName); /** - * Deletes the specified Certificate. + * Create or Update a Certificate. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param certificateName Name of the Certificate. + * @param certificateEnvelope Certificate to be created or updated. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link + * Response}. */ - Response deleteWithResponse( - String resourceGroupName, String environmentName, String certificateName, Context context); + Response createOrUpdateWithResponse( + String resourceGroupName, + String environmentName, + String certificateName, + CertificateInner certificateEnvelope, + Context context); /** - * Deletes the specified Certificate. + * Create or Update a Certificate. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. @@ -93,63 +100,78 @@ Response deleteWithResponse( * @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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment. */ - void delete(String resourceGroupName, String environmentName, String certificateName); + Certificate createOrUpdate(String resourceGroupName, String environmentName, String certificateName); /** - * Get the specified Certificate. + * Deletes the specified Certificate. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param certificateName Name of the Certificate. + * @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 specified Certificate along with {@link Response}. + * @return the {@link Response}. */ - Certificate getById(String id); + Response deleteWithResponse( + String resourceGroupName, String environmentName, String certificateName, Context context); /** - * Get the specified Certificate. + * Deletes the specified Certificate. * - * @param id the resource ID. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param certificateName Name of the Certificate. * @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 specified Certificate along with {@link Response}. */ - Response getByIdWithResponse(String id, Context context); + void delete(String resourceGroupName, String environmentName, String certificateName); /** - * Deletes the specified Certificate. + * Update properties of a certificate + * + *

Patches a certificate. Currently only patching of tags is supported. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param certificateName Name of the Certificate. + * @param certificateEnvelope Properties of a certificate that need to be updated. + * @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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link + * Response}. */ - void deleteById(String id); + Response updateWithResponse( + String resourceGroupName, + String environmentName, + String certificateName, + CertificatePatch certificateEnvelope, + Context context); /** - * Deletes the specified Certificate. + * Update properties of a certificate * - * @param id the resource ID. - * @param context The context to associate with this operation. + *

Patches a certificate. Currently only patching of tags is supported. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param certificateName Name of the Certificate. + * @param certificateEnvelope Properties of a certificate that need to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new Certificate resource. - * - * @param name resource name. - * @return the first stage of the new Certificate definition. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. */ - Certificate.DefinitionStages.Blank define(String name); + Certificate update( + String resourceGroupName, String environmentName, String certificateName, CertificatePatch certificateEnvelope); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsCertificates.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsCertificates.java index e0277e08760b..86b766493166 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsCertificates.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsCertificates.java @@ -7,7 +7,6 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; /** Resource collection API of ConnectedEnvironmentsCertificates. */ public interface ConnectedEnvironmentsCertificates { @@ -69,29 +68,23 @@ Response getWithResponse( Certificate get(String resourceGroupName, String connectedEnvironmentName, String certificateName); /** - * Create or Update a Certificate. + * Deletes the specified Certificate. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Connected Environment. * @param certificateName Name of the Certificate. - * @param certificateEnvelope Certificate to be created or updated. * @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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response}. + * @return the {@link Response}. */ - Response createOrUpdateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificateInner certificateEnvelope, - Context context); + Response deleteWithResponse( + String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context); /** - * Create or Update a Certificate. + * Deletes the specified Certificate. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Connected Environment. @@ -100,81 +93,63 @@ Response createOrUpdateWithResponse( * @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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment. */ - Certificate createOrUpdate(String resourceGroupName, String connectedEnvironmentName, String certificateName); + void delete(String resourceGroupName, String connectedEnvironmentName, String certificateName); /** - * Deletes the specified Certificate. + * Get the specified Certificate. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param context The context to associate with this operation. + * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return the specified Certificate along with {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context); + Certificate getById(String id); /** - * Deletes the specified Certificate. + * Get the specified Certificate. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. + * @param id the resource ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Certificate along with {@link Response}. */ - void delete(String resourceGroupName, String connectedEnvironmentName, String certificateName); + Response getByIdWithResponse(String id, Context context); /** - * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. + * Deletes the specified Certificate. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. - * @param context The context to associate with this operation. + * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response}. */ - Response updateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificatePatch certificateEnvelope, - Context context); + void deleteById(String id); /** - * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. + * Deletes the specified Certificate. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the Connected Environment. - * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. + * @param id the resource ID. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new Certificate resource. + * + * @param name resource name. + * @return the first stage of the new Certificate definition. */ - Certificate update( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificatePatch certificateEnvelope); + Certificate.DefinitionStages.Blank define(String name); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsDaprComponents.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsDaprComponents.java index aa40ae8d3ec6..4e4afa80120f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsDaprComponents.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsDaprComponents.java @@ -7,7 +7,6 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; /** Resource collection API of ConnectedEnvironmentsDaprComponents. */ public interface ConnectedEnvironmentsDaprComponents { @@ -69,53 +68,40 @@ Response getWithResponse( DaprComponent get(String resourceGroupName, String connectedEnvironmentName, String componentName); /** - * Creates or updates a Dapr Component. + * Delete a Dapr Component. * - *

Creates or updates a Dapr Component in a connected environment. + *

Delete a Dapr Component from a connected environment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connected environment. * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component along with {@link Response}. + * @return the {@link Response}. */ - Response createOrUpdateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String componentName, - DaprComponentInner daprComponentEnvelope, - Context context); + Response deleteWithResponse( + String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); /** - * Creates or updates a Dapr Component. + * Delete a Dapr Component. * - *

Creates or updates a Dapr Component in a connected environment. + *

Delete a Dapr Component from a connected environment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connected environment. * @param componentName Name of the Dapr Component. - * @param daprComponentEnvelope Configuration details of the Dapr Component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component. */ - DaprComponent createOrUpdate( - String resourceGroupName, - String connectedEnvironmentName, - String componentName, - DaprComponentInner daprComponentEnvelope); + void delete(String resourceGroupName, String connectedEnvironmentName, String componentName); /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a connected environment. + * List secrets for a dapr component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connected environment. @@ -125,15 +111,13 @@ DaprComponent createOrUpdate( * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response}. */ - Response deleteWithResponse( + Response listSecretsWithResponse( String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a connected environment. + * List secrets for a dapr component. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connected environment. @@ -142,36 +126,68 @@ Response deleteWithResponse( * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr component Secrets Collection for ListSecrets Action. */ - void delete(String resourceGroupName, String connectedEnvironmentName, String componentName); + DaprSecretsCollection listSecrets(String resourceGroupName, String connectedEnvironmentName, String componentName); /** - * List secrets for a dapr component. + * Get a dapr component. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a dapr component along with {@link Response}. + */ + DaprComponent getById(String id); + + /** + * Get a dapr component. + * + * @param id the resource ID. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response}. + * @return a dapr component along with {@link Response}. */ - Response listSecretsWithResponse( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); + Response getByIdWithResponse(String id, Context context); /** - * List secrets for a dapr component. + * Delete a Dapr Component. * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param connectedEnvironmentName Name of the connected environment. - * @param componentName Name of the Dapr Component. + *

Delete a Dapr Component from a connected environment. + * + * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action. */ - DaprSecretsCollection listSecrets(String resourceGroupName, String connectedEnvironmentName, String componentName); + void deleteById(String id); + + /** + * Delete a Dapr Component. + * + *

Delete a Dapr Component from a connected environment. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new DaprComponent resource. + * + * @param name resource name. + * @return the first stage of the new DaprComponent definition. + */ + DaprComponent.DefinitionStages.Blank define(String name); } 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 58433c067706..eb625194c76c 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 @@ -106,6 +106,13 @@ public interface ContainerApp { */ String latestRevisionName(); + /** + * Gets the latestReadyRevisionName property: Name of the latest ready revision of the Container App. + * + * @return the latestReadyRevisionName value. + */ + String latestReadyRevisionName(); + /** * Gets the latestRevisionFqdn property: Fully Qualified Domain Name of the latest revision of the Container App. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApps.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApps.java index f7db26106a58..cf37503326c7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApps.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApps.java @@ -7,7 +7,6 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; /** Resource collection API of ContainerApps. */ public interface ContainerApps { @@ -109,38 +108,6 @@ Response getByResourceGroupWithResponse( */ void delete(String resourceGroupName, String containerAppName, Context context); - /** - * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope); - - /** - * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param containerAppEnvelope Properties of a Container App that need to be updated. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void update( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context); - /** * Analyzes a custom hostname for a Container App. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CorsPolicy.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CorsPolicy.java new file mode 100644 index 000000000000..1766d46a2fd2 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CorsPolicy.java @@ -0,0 +1,189 @@ +// Copyright (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; +import java.util.List; + +/** Cross-Origin-Resource-Sharing policy. */ +@Fluent +public final class CorsPolicy { + /* + * allowed origins + */ + @JsonProperty(value = "allowedOrigins", required = true) + private List allowedOrigins; + + /* + * allowed HTTP methods + */ + @JsonProperty(value = "allowedMethods") + private List allowedMethods; + + /* + * allowed HTTP headers + */ + @JsonProperty(value = "allowedHeaders") + private List allowedHeaders; + + /* + * expose HTTP headers + */ + @JsonProperty(value = "exposeHeaders") + private List exposeHeaders; + + /* + * max time client can cache the result + */ + @JsonProperty(value = "maxAge") + private Integer maxAge; + + /* + * allow credential or not + */ + @JsonProperty(value = "allowCredentials") + private Boolean allowCredentials; + + /** Creates an instance of CorsPolicy class. */ + public CorsPolicy() { + } + + /** + * Get the allowedOrigins property: allowed origins. + * + * @return the allowedOrigins value. + */ + public List allowedOrigins() { + return this.allowedOrigins; + } + + /** + * Set the allowedOrigins property: allowed origins. + * + * @param allowedOrigins the allowedOrigins value to set. + * @return the CorsPolicy object itself. + */ + public CorsPolicy withAllowedOrigins(List allowedOrigins) { + this.allowedOrigins = allowedOrigins; + return this; + } + + /** + * Get the allowedMethods property: allowed HTTP methods. + * + * @return the allowedMethods value. + */ + public List allowedMethods() { + return this.allowedMethods; + } + + /** + * Set the allowedMethods property: allowed HTTP methods. + * + * @param allowedMethods the allowedMethods value to set. + * @return the CorsPolicy object itself. + */ + public CorsPolicy withAllowedMethods(List allowedMethods) { + this.allowedMethods = allowedMethods; + return this; + } + + /** + * Get the allowedHeaders property: allowed HTTP headers. + * + * @return the allowedHeaders value. + */ + public List allowedHeaders() { + return this.allowedHeaders; + } + + /** + * Set the allowedHeaders property: allowed HTTP headers. + * + * @param allowedHeaders the allowedHeaders value to set. + * @return the CorsPolicy object itself. + */ + public CorsPolicy withAllowedHeaders(List allowedHeaders) { + this.allowedHeaders = allowedHeaders; + return this; + } + + /** + * Get the exposeHeaders property: expose HTTP headers. + * + * @return the exposeHeaders value. + */ + public List exposeHeaders() { + return this.exposeHeaders; + } + + /** + * Set the exposeHeaders property: expose HTTP headers. + * + * @param exposeHeaders the exposeHeaders value to set. + * @return the CorsPolicy object itself. + */ + public CorsPolicy withExposeHeaders(List exposeHeaders) { + this.exposeHeaders = exposeHeaders; + return this; + } + + /** + * Get the maxAge property: max time client can cache the result. + * + * @return the maxAge value. + */ + public Integer maxAge() { + return this.maxAge; + } + + /** + * Set the maxAge property: max time client can cache the result. + * + * @param maxAge the maxAge value to set. + * @return the CorsPolicy object itself. + */ + public CorsPolicy withMaxAge(Integer maxAge) { + this.maxAge = maxAge; + return this; + } + + /** + * Get the allowCredentials property: allow credential or not. + * + * @return the allowCredentials value. + */ + public Boolean allowCredentials() { + return this.allowCredentials; + } + + /** + * Set the allowCredentials property: allow credential or not. + * + * @param allowCredentials the allowCredentials value to set. + * @return the CorsPolicy object itself. + */ + public CorsPolicy withAllowCredentials(Boolean allowCredentials) { + this.allowCredentials = allowCredentials; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (allowedOrigins() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property allowedOrigins in model CorsPolicy")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(CorsPolicy.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomainConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomainConfiguration.java index 2c403bd755ed..f6d0f7c4eae5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomainConfiguration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomainConfiguration.java @@ -34,7 +34,7 @@ public final class CustomDomainConfiguration { * Certificate password */ @JsonProperty(value = "certificatePassword") - private byte[] certificatePassword; + private String certificatePassword; /* * Certificate expiration date. @@ -112,8 +112,8 @@ public CustomDomainConfiguration withCertificateValue(byte[] certificateValue) { * * @return the certificatePassword value. */ - public byte[] certificatePassword() { - return CoreUtils.clone(this.certificatePassword); + public String certificatePassword() { + return this.certificatePassword; } /** @@ -122,8 +122,8 @@ public byte[] certificatePassword() { * @param certificatePassword the certificatePassword value to set. * @return the CustomDomainConfiguration object itself. */ - public CustomDomainConfiguration withCertificatePassword(byte[] certificatePassword) { - this.certificatePassword = CoreUtils.clone(certificatePassword); + public CustomDomainConfiguration withCertificatePassword(String certificatePassword) { + this.certificatePassword = certificatePassword; return this; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java index b8d6168c573d..68a8bcd7018d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java @@ -122,13 +122,13 @@ interface Blank extends WithParentResource { /** The stage of the DaprComponent definition allowing to specify parent resource. */ interface WithParentResource { /** - * Specifies resourceGroupName, environmentName. + * Specifies resourceGroupName, connectedEnvironmentName. * * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. + * @param connectedEnvironmentName Name of the connected environment. * @return the next definition stage. */ - WithCreate withExistingManagedEnvironment(String resourceGroupName, String environmentName); + WithCreate withExistingConnectedEnvironment(String resourceGroupName, String connectedEnvironmentName); } /** * The stage of the DaprComponent definition which contains all the minimum required properties for the resource diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponents.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponents.java index 43295443f0f0..decfd9343fba 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponents.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponents.java @@ -7,6 +7,7 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; /** Resource collection API of DaprComponents. */ public interface DaprComponents { @@ -68,40 +69,53 @@ Response getWithResponse( DaprComponent get(String resourceGroupName, String environmentName, String componentName); /** - * Delete a Dapr Component. + * Creates or updates a Dapr Component. * - *

Delete a Dapr Component from a Managed Environment. + *

Creates or updates a Dapr Component in a Managed Environment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. + * @param daprComponentEnvelope Configuration details of the Dapr Component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. + * @return dapr Component along with {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context); + Response createOrUpdateWithResponse( + String resourceGroupName, + String environmentName, + String componentName, + DaprComponentInner daprComponentEnvelope, + Context context); /** - * Delete a Dapr Component. + * Creates or updates a Dapr Component. * - *

Delete a Dapr Component from a Managed Environment. + *

Creates or updates a Dapr Component in a Managed Environment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. + * @param daprComponentEnvelope Configuration details of the Dapr Component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr Component. */ - void delete(String resourceGroupName, String environmentName, String componentName); + DaprComponent createOrUpdate( + String resourceGroupName, + String environmentName, + String componentName, + DaprComponentInner daprComponentEnvelope); /** - * List secrets for a dapr component. + * Delete a Dapr Component. + * + *

Delete a Dapr Component from a Managed Environment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. @@ -111,13 +125,15 @@ Response deleteWithResponse( * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response}. + * @return the {@link Response}. */ - Response listSecretsWithResponse( + Response deleteWithResponse( String resourceGroupName, String environmentName, String componentName, Context context); /** - * List secrets for a dapr component. + * Delete a Dapr Component. + * + *

Delete a Dapr Component from a Managed Environment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. @@ -126,68 +142,36 @@ Response listSecretsWithResponse( * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection for ListSecrets Action. */ - DaprSecretsCollection listSecrets(String resourceGroupName, String environmentName, String componentName); - - /** - * Get a dapr component. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response}. - */ - DaprComponent getById(String id); + void delete(String resourceGroupName, String environmentName, String componentName); /** - * Get a dapr component. + * List secrets for a dapr component. * - * @param id the resource ID. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response}. - */ - Response getByIdWithResponse(String id, Context context); - - /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a Managed Environment. - * - * @param id the resource ID. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response}. */ - void deleteById(String id); + Response listSecretsWithResponse( + String resourceGroupName, String environmentName, String componentName, Context context); /** - * Delete a Dapr Component. - * - *

Delete a Dapr Component from a Managed Environment. + * List secrets for a dapr component. * - * @param id the resource ID. - * @param context The context to associate with this operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. - */ - Response deleteByIdWithResponse(String id, Context context); - - /** - * Begins definition for a new DaprComponent resource. - * - * @param name resource name. - * @return the first stage of the new DaprComponent definition. + * @return dapr component Secrets Collection for ListSecrets Action. */ - DaprComponent.DefinitionStages.Blank define(String name); + DaprSecretsCollection listSecrets(String resourceGroupName, String environmentName, String componentName); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecret.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecret.java new file mode 100644 index 000000000000..54d093bca047 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecret.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.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Dapr component Secret for ListSecrets Action. */ +@Immutable +public final class DaprSecret { + /* + * Secret Name. + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Secret Value. + */ + @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) + private String value; + + /** Creates an instance of DaprSecret class. */ + public DaprSecret() { + } + + /** + * Get the name property: Secret Name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the value property: Secret Value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * 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/DaprSecretsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecretsCollection.java index 3855936a9a9d..de12dbb02434 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecretsCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecretsCollection.java @@ -14,7 +14,7 @@ public interface DaprSecretsCollection { * * @return the value value. */ - List value(); + List value(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner object. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Ingress.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Ingress.java index 7d3bce205292..6ebeeb6d11a7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Ingress.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Ingress.java @@ -66,6 +66,20 @@ public final class Ingress { @JsonProperty(value = "ipSecurityRestrictions") private List ipSecurityRestrictions; + /* + * Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. + * Accept indicates server forwards client certificate but does not require a client certificate. Require indicates + * server requires a client certificate. + */ + @JsonProperty(value = "clientCertificateMode") + private IngressClientCertificateMode clientCertificateMode; + + /* + * CORS policy for container app + */ + @JsonProperty(value = "corsPolicy") + private CorsPolicy corsPolicy; + /** Creates an instance of Ingress class. */ public Ingress() { } @@ -241,6 +255,50 @@ public Ingress withIpSecurityRestrictions(List ipSecu return this; } + /** + * Get the clientCertificateMode property: Client certificate mode for mTLS authentication. Ignore indicates server + * drops client certificate on forwarding. Accept indicates server forwards client certificate but does not require + * a client certificate. Require indicates server requires a client certificate. + * + * @return the clientCertificateMode value. + */ + public IngressClientCertificateMode clientCertificateMode() { + return this.clientCertificateMode; + } + + /** + * Set the clientCertificateMode property: Client certificate mode for mTLS authentication. Ignore indicates server + * drops client certificate on forwarding. Accept indicates server forwards client certificate but does not require + * a client certificate. Require indicates server requires a client certificate. + * + * @param clientCertificateMode the clientCertificateMode value to set. + * @return the Ingress object itself. + */ + public Ingress withClientCertificateMode(IngressClientCertificateMode clientCertificateMode) { + this.clientCertificateMode = clientCertificateMode; + return this; + } + + /** + * Get the corsPolicy property: CORS policy for container app. + * + * @return the corsPolicy value. + */ + public CorsPolicy corsPolicy() { + return this.corsPolicy; + } + + /** + * Set the corsPolicy property: CORS policy for container app. + * + * @param corsPolicy the corsPolicy value to set. + * @return the Ingress object itself. + */ + public Ingress withCorsPolicy(CorsPolicy corsPolicy) { + this.corsPolicy = corsPolicy; + return this; + } + /** * Validates the instance. * @@ -256,5 +314,8 @@ public void validate() { if (ipSecurityRestrictions() != null) { ipSecurityRestrictions().forEach(e -> e.validate()); } + if (corsPolicy() != null) { + corsPolicy().validate(); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressClientCertificateMode.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressClientCertificateMode.java new file mode 100644 index 000000000000..2b38f19290d6 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressClientCertificateMode.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.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Client certificate mode for mTLS authentication. Ignore indicates server drops client certificate on forwarding. + * Accept indicates server forwards client certificate but does not require a client certificate. Require indicates + * server requires a client certificate. + */ +public final class IngressClientCertificateMode extends ExpandableStringEnum { + /** Static value ignore for IngressClientCertificateMode. */ + public static final IngressClientCertificateMode IGNORE = fromString("ignore"); + + /** Static value accept for IngressClientCertificateMode. */ + public static final IngressClientCertificateMode ACCEPT = fromString("accept"); + + /** Static value require for IngressClientCertificateMode. */ + public static final IngressClientCertificateMode REQUIRE = fromString("require"); + + /** + * Creates or finds a IngressClientCertificateMode from its string representation. + * + * @param name a name to look for. + * @return the corresponding IngressClientCertificateMode. + */ + @JsonCreator + public static IngressClientCertificateMode fromString(String name) { + return fromString(name, IngressClientCertificateMode.class); + } + + /** + * Gets known IngressClientCertificateMode values. + * + * @return known IngressClientCertificateMode values. + */ + public static Collection values() { + return values(IngressClientCertificateMode.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 3fb9b640518a..5ce3d9b1fe2f 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 @@ -49,6 +49,13 @@ public interface ManagedEnvironment { */ Map tags(); + /** + * Gets the kind property: Kind of the Environment. + * + * @return the kind value. + */ + String kind(); + /** * Gets the sku property: SKU properties of the Environment. * @@ -224,6 +231,7 @@ interface WithResourceGroup { */ interface WithCreate extends DefinitionStages.WithTags, + DefinitionStages.WithKind, DefinitionStages.WithSku, DefinitionStages.WithDaprAIInstrumentationKey, DefinitionStages.WithDaprAIConnectionString, @@ -257,6 +265,16 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the ManagedEnvironment definition allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of the Environment.. + * + * @param kind Kind of the Environment. + * @return the next definition stage. + */ + WithCreate withKind(String kind); + } /** The stage of the ManagedEnvironment definition allowing to specify sku. */ interface WithSku { /** @@ -354,6 +372,7 @@ interface WithWorkloadProfiles { /** The template for ManagedEnvironment update. */ interface Update extends UpdateStages.WithTags, + UpdateStages.WithKind, UpdateStages.WithSku, UpdateStages.WithDaprAIInstrumentationKey, UpdateStages.WithDaprAIConnectionString, @@ -388,6 +407,16 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the ManagedEnvironment update allowing to specify kind. */ + interface WithKind { + /** + * Specifies the kind property: Kind of the Environment.. + * + * @param kind Kind of the Environment. + * @return the next definition stage. + */ + Update withKind(String kind); + } /** The stage of the ManagedEnvironment update allowing to specify sku. */ interface WithSku { /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironments.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironments.java index 313f77bd226b..e12a345ab887 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironments.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironments.java @@ -7,7 +7,6 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; /** Resource collection API of ManagedEnvironments. */ public interface ManagedEnvironments { @@ -127,38 +126,6 @@ Response getByResourceGroupWithResponse( */ void delete(String resourceGroupName, String environmentName, Context context); - /** - * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void update(String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); - - /** - * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Environment. - * @param environmentEnvelope Configuration details of the Environment. - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - */ - void update( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); - /** * Get auth token for a managed environment * 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 cb3b124a6d1d..3b95b696790a 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 @@ /** Samples for AvailableWorkloadProfiles Get. */ public final class AvailableWorkloadProfilesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AvailableWorkloadProfiles_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/AvailableWorkloadProfiles_Get.json */ /** * Sample code: BillingMeters_Get. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.java index 5a61c09fc519..3f5aedc25cc6 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 @@ -9,7 +9,7 @@ /** Samples for BillingMeters Get. */ public final class BillingMetersGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/BillingMeters_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/BillingMeters_Get.json */ /** * Sample code: BillingMeters_Get. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java index 01c68c8b82cd..ee79acb21db0 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 @@ -4,12 +4,14 @@ package com.azure.resourcemanager.appcontainers.generated; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; import com.azure.resourcemanager.appcontainers.models.CertificateProperties; /** Samples for Certificates CreateOrUpdate. */ public final class CertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Certificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. @@ -20,13 +22,16 @@ public static void createOrUpdateCertificate( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .certificates() - .define("certificate-firendly-name") - .withRegion("East US") - .withExistingManagedEnvironment("examplerg", "testcontainerenv") - .withProperties( - new CertificateProperties() - .withPassword("private key password") - .withValue("PFX-or-PEM-blob".getBytes())) - .create(); + .createOrUpdateWithResponse( + "examplerg", + "testcontainerenv", + "certificate-firendly-name", + new CertificateInner() + .withLocation("East US") + .withProperties( + new CertificateProperties() + .withPassword("fakeTokenPlaceholder") + .withValue("Y2VydA==".getBytes())), + Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java index ba5d9fdaca29..d9eb34cf3087 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 @@ -9,7 +9,7 @@ /** Samples for Certificates Delete. */ public final class CertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Certificate_Delete.json */ /** * Sample code: Delete Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java index 8c03998b60ca..716d91a6f650 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 @@ -9,7 +9,7 @@ /** Samples for Certificates Get. */ public final class CertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Certificate_Get.json */ /** * Sample code: Get Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java index 78d2e8e1bdbb..59a2f24f5028 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 @@ /** Samples for Certificates List. */ public final class CertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_ListByManagedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Certificates_ListByManagedEnvironment.json */ /** * Sample code: List Certificates by Managed Environment. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java index db66bc2a7f9d..7d0c26b619a1 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 @@ -5,14 +5,14 @@ package com.azure.resourcemanager.appcontainers.generated; import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.models.Certificate; +import com.azure.resourcemanager.appcontainers.models.CertificatePatch; import java.util.HashMap; import java.util.Map; /** Samples for Certificates Update. */ public final class CertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Certificates_Patch.json */ /** * Sample code: Patch Certificate. @@ -20,12 +20,14 @@ public final class CertificatesUpdateSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - Certificate resource = - manager - .certificates() - .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE) - .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + manager + .certificates() + .updateWithResponse( + "examplerg", + "testcontainerenv", + "certificate-firendly-name", + new CertificatePatch().withTags(mapOf("tag1", "value1", "tag2", "value2")), + Context.NONE); } @SuppressWarnings("unchecked") 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 0b2dd0645194..e56f8a9f61c6 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 @@ -4,14 +4,12 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; import com.azure.resourcemanager.appcontainers.models.CertificateProperties; /** Samples for ConnectedEnvironmentsCertificates CreateOrUpdate. */ public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. @@ -22,16 +20,11 @@ public static void createOrUpdateCertificate( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .connectedEnvironmentsCertificates() - .createOrUpdateWithResponse( - "examplerg", - "testcontainerenv", - "certificate-firendly-name", - new CertificateInner() - .withLocation("East US") - .withProperties( - new CertificateProperties() - .withPassword("private key password") - .withValue("PFX-or-PEM-blob".getBytes())), - Context.NONE); + .define("certificate-firendly-name") + .withRegion("East US") + .withExistingConnectedEnvironment("examplerg", "testcontainerenv") + .withProperties( + new CertificateProperties().withPassword("fakeTokenPlaceholder").withValue("Y2VydA==".getBytes())) + .create(); } } 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 21e25b3fd21c..465a07c75847 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 @@ /** Samples for ConnectedEnvironmentsCertificates Delete. */ public final class ConnectedEnvironmentsCertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsCertificate_Delete.json */ /** * Sample code: Delete Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java index 7516a6391ae8..b314fc92899d 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 @@ /** Samples for ConnectedEnvironmentsCertificates Get. */ public final class ConnectedEnvironmentsCertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsCertificate_Get.json */ /** * Sample code: Get Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java index 5b8c0e11d2f6..947ef56757d4 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 @@ /** Samples for ConnectedEnvironmentsCertificates List. */ public final class ConnectedEnvironmentsCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json */ /** * Sample code: List Certificates by Connected Environment. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java index c2ea3462e495..6181546eaadc 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 @@ -5,14 +5,14 @@ package com.azure.resourcemanager.appcontainers.generated; import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; +import com.azure.resourcemanager.appcontainers.models.Certificate; import java.util.HashMap; import java.util.Map; /** Samples for ConnectedEnvironmentsCertificates Update. */ public final class ConnectedEnvironmentsCertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsCertificates_Patch.json */ /** * Sample code: Patch Certificate. @@ -20,14 +20,12 @@ public final class ConnectedEnvironmentsCertificatesUpdateSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsCertificates() - .updateWithResponse( - "examplerg", - "testcontainerenv", - "certificate-firendly-name", - new CertificatePatch().withTags(mapOf("tag1", "value1", "tag2", "value2")), - Context.NONE); + Certificate resource = + manager + .connectedEnvironmentsCertificates() + .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @SuppressWarnings("unchecked") 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 eb7a2b950c5b..dbf53a6763ae 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 @@ -10,7 +10,7 @@ /** Samples for ConnectedEnvironments CheckNameAvailability. */ public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java index 522f5ec60a7e..3bd65840dcd6 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 @@ -5,11 +5,13 @@ package com.azure.resourcemanager.appcontainers.generated; import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; +import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; +import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; /** Samples for ConnectedEnvironments CreateOrUpdate. */ public final class ConnectedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create kube environments. @@ -22,14 +24,19 @@ public static void createKubeEnvironments(com.azure.resourcemanager.appcontainer .define("testenv") .withRegion("East US") .withExistingResourceGroup("examplerg") + .withExtendedLocation( + new ExtendedLocation() + .withName( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/examplerg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) .withStaticIp("1.2.3.4") .withDaprAIConnectionString( "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") .withCustomDomainConfiguration( new CustomDomainConfiguration() .withDnsSuffix("www.my-name.com") - .withCertificateValue("PFX-or-PEM-blob".getBytes()) - .withCertificatePassword("private key password".getBytes())) + .withCertificateValue("Y2VydA==".getBytes()) + .withCertificatePassword("fakeTokenPlaceholder")) .create(); } } 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 cd3fa3e3ef56..f1d20e014911 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.java @@ -4,8 +4,6 @@ package com.azure.resourcemanager.appcontainers.generated; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; import com.azure.resourcemanager.appcontainers.models.DaprMetadata; import com.azure.resourcemanager.appcontainers.models.Secret; import java.util.Arrays; @@ -13,7 +11,7 @@ /** Samples for ConnectedEnvironmentsDaprComponents CreateOrUpdate. */ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json */ /** * Sample code: Create or update dapr component. @@ -24,24 +22,21 @@ public static void createOrUpdateDaprComponent( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .connectedEnvironmentsDaprComponents() - .createOrUpdateWithResponse( - "examplerg", - "myenvironment", - "reddog", - new DaprComponentInner() - .withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) - .withMetadata( - Arrays - .asList( - new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("masterkey"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")), - Context.NONE); + .define("reddog") + .withExistingConnectedEnvironment("examplerg", "myenvironment") + .withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) + .withMetadata( + Arrays + .asList( + new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .create(); } } 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 a69345b86f61..14342d894c88 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 @@ /** Samples for ConnectedEnvironmentsDaprComponents Delete. */ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsDaprComponents_Delete.json */ /** * Sample code: Delete dapr component. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java index d390a2855c97..da7901064c55 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 @@ /** Samples for ConnectedEnvironmentsDaprComponents Get. */ public final class ConnectedEnvironmentsDaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsDaprComponents_Get.json */ /** * Sample code: Get Dapr Component. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java index 128602c62d89..745e55f4c25c 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 @@ /** Samples for ConnectedEnvironmentsDaprComponents List. */ public final class ConnectedEnvironmentsDaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsDaprComponents_List.json */ /** * Sample code: List Dapr Components. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java index a61beb852670..1239279ed2cb 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 @@ /** Samples for ConnectedEnvironmentsDaprComponents ListSecrets. */ public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java index e9217065c241..a45195ee8807 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 @@ -9,7 +9,7 @@ /** Samples for ConnectedEnvironments Delete. */ public final class ConnectedEnvironmentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_Delete.json */ /** * Sample code: Delete connected environment by connectedEnvironmentName. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.java index a7d39482efc5..402d74fb1fa7 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 @@ -9,7 +9,7 @@ /** Samples for ConnectedEnvironments GetByResourceGroup. */ public final class ConnectedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_Get.json */ /** * Sample code: Get connected environment by connectedEnvironmentName. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java index 82cc091edcaa..701621da5c4f 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 @@ /** Samples for ConnectedEnvironments ListByResourceGroup. */ public final class ConnectedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java index 30f3f82abc13..84cbd18c7a80 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 @@ /** Samples for ConnectedEnvironments List. */ public final class ConnectedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_ListBySubscription.json */ /** * Sample code: List connected environments by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java index 48dd759809e9..b9df8d23cf1c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for ConnectedEnvironmentsStorages CreateOrUpdate. */ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. @@ -29,7 +29,7 @@ public static void createOrUpdateEnvironmentsStorage( .withAzureFile( new AzureFileProperties() .withAccountName("account1") - .withAccountKey("key") + .withAccountKey("fakeTokenPlaceholder") .withAccessMode(AccessMode.READ_ONLY) .withShareName("share1"))) .create(); 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 3d32e15e66d4..5cc6a3b322c9 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 @@ /** Samples for ConnectedEnvironmentsStorages Delete. */ public final class ConnectedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java index 985b69a863c2..403c6590010d 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 @@ /** Samples for ConnectedEnvironmentsStorages Get. */ public final class ConnectedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage properties by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java index 7bc9c5c70084..ea31ad1dcc28 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 @@ /** Samples for ConnectedEnvironmentsStorages List. */ public final class ConnectedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java index 0ab238827263..763579106cd1 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 @@ -9,7 +9,7 @@ /** Samples for ConnectedEnvironments Update. */ public final class ConnectedEnvironmentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ConnectedEnvironments_Patch.json */ /** * Sample code: Patch Managed Environment. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java index 2af3fe3a1f3d..a11a232be7eb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ /** Samples for ContainerAppsAuthConfigs CreateOrUpdate. */ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/AuthConfigs_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App AuthConfig. @@ -35,7 +35,9 @@ public static void createOrUpdateContainerAppAuthConfig( .withFacebook( new Facebook() .withRegistration( - new AppRegistration().withAppId("123").withAppSecretSettingName("facebook-secret")))) + new AppRegistration() + .withAppId("123") + .withAppSecretSettingName("fakeTokenPlaceholder")))) .create(); } } 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 02b1f78b7217..186a961e9492 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 @@ -9,7 +9,7 @@ /** Samples for ContainerAppsAuthConfigs Delete. */ public final class ContainerAppsAuthConfigsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/AuthConfigs_Delete.json */ /** * Sample code: Delete Container App AuthConfig. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java index eba01b17982f..09c00a107fb3 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 @@ -9,7 +9,7 @@ /** Samples for ContainerAppsAuthConfigs Get. */ public final class ContainerAppsAuthConfigsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/AuthConfigs_Get.json */ /** * Sample code: Get Container App's AuthConfig. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java index 5151311e9b5e..e4abbb4e5596 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 @@ -9,7 +9,7 @@ /** Samples for ContainerAppsAuthConfigs ListByContainerApp. */ public final class ContainerAppsAuthConfigsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/AuthConfigs_ListByContainer.json */ /** * Sample code: List Auth Configs by Container Apps. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java index e60fa035af7a..0706996f5477 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 @@ -14,10 +14,12 @@ import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; import com.azure.resourcemanager.appcontainers.models.ContainerResources; +import com.azure.resourcemanager.appcontainers.models.CorsPolicy; import com.azure.resourcemanager.appcontainers.models.CustomDomain; import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; import com.azure.resourcemanager.appcontainers.models.Dapr; import com.azure.resourcemanager.appcontainers.models.Ingress; +import com.azure.resourcemanager.appcontainers.models.IngressClientCertificateMode; import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; import com.azure.resourcemanager.appcontainers.models.InitContainer; import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; @@ -35,7 +37,7 @@ /** Samples for ContainerApps CreateOrUpdate. */ public final class ContainerAppsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App. @@ -92,7 +94,16 @@ public static void createOrUpdateContainerApp( .withDescription( "Allowing all IP's within the subnet below to access containerapp") .withIpAddressRange("192.168.1.1/8") - .withAction(Action.ALLOW)))) + .withAction(Action.ALLOW))) + .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))) .withDapr( new Dapr() .withEnabled(true) @@ -154,7 +165,7 @@ public static void createOrUpdateContainerApp( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_TcpApp_CreateOrUpdate.json */ /** * Sample code: Create or Update Tcp App. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteSamples.java index 8add349fae66..6c254f409391 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 @@ -9,7 +9,7 @@ /** Samples for ContainerApps Delete. */ public final class ContainerAppsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/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 33994d2b505a..fc62b640c6c5 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 @@ -9,7 +9,7 @@ /** Samples for ContainerAppsDiagnostics GetDetector. */ public final class ContainerAppsDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerAppsDiagnostics_Get.json */ /** * Sample code: Get Container App's diagnostics info. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java index e5c4a8156457..c40daa4f740f 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 @@ -9,7 +9,7 @@ /** Samples for ContainerAppsDiagnostics GetRevision. */ public final class ContainerAppsDiagnosticsGetRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java index e0c052a830ae..a1e6b3686d39 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 @@ -9,7 +9,7 @@ /** Samples for ContainerAppsDiagnostics GetRoot. */ public final class ContainerAppsDiagnosticsGetRootSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/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 94801afae727..f2a28bc94e4b 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 @@ /** Samples for ContainerAppsDiagnostics ListDetectors. */ public final class ContainerAppsDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerAppsDiagnostics_List.json */ /** * Sample code: Get the list of available diagnostics for a given Container App. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java index fecef91f927a..eeebf6517d77 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 @@ -9,7 +9,7 @@ /** Samples for ContainerAppsDiagnostics ListRevisions. */ public final class ContainerAppsDiagnosticsListRevisionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java index d12d281193dc..8e26dc94e264 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 @@ -9,7 +9,7 @@ /** Samples for ContainerApps GetAuthToken. */ public final class ContainerAppsGetAuthTokenSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_GetAuthToken.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_GetAuthToken.json */ /** * Sample code: Get Container App Auth Token. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java index cd34f1b253fa..a584e70911ee 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 @@ -9,7 +9,7 @@ /** Samples for ContainerApps GetByResourceGroup. */ public final class ContainerAppsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/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 5d328c5b2fb4..7745fee29df3 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 @@ /** Samples for ContainerApps ListByResourceGroup. */ public final class ContainerAppsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_ListByResourceGroup.json */ /** * Sample code: List Container Apps by resource group. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java index 9a017f67da97..8debf1e4fc60 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 @@ /** Samples for ContainerApps ListCustomHostnameAnalysis. */ public final class ContainerAppsListCustomHostnameAnalysisSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_ListCustomHostNameAnalysis.json */ /** * Sample code: Analyze Custom Hostname. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java index d88568039981..70a2f15fabb6 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 @@ /** Samples for ContainerApps List. */ public final class ContainerAppsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_ListBySubscription.json */ /** * Sample code: List Container Apps by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java index 9a17fe1e8d4a..defd88f5e421 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 @@ -9,7 +9,7 @@ /** Samples for ContainerApps ListSecrets. */ public final class ContainerAppsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java index f61fd0c8c7ae..5a2cc2db5ce0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsRevisionReplicas GetReplica. */ public final class ContainerAppsRevisionReplicasGetReplicaSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Replicas_Get.json */ /** * Sample code: Get Container App's revision replica. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java index d8dd9e3f9dd6..382502db3667 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 @@ -9,7 +9,7 @@ /** Samples for ContainerAppsRevisionReplicas ListReplicas. */ public final class ContainerAppsRevisionReplicasListReplicasSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Replicas_List.json */ /** * Sample code: List Container App's replicas. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java index c874ecf8f9db..21acb86a6a9c 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 @@ -9,7 +9,7 @@ /** Samples for ContainerAppsRevisions ActivateRevision. */ public final class ContainerAppsRevisionsActivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Activate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_Activate.json */ /** * Sample code: Activate Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java index a50104cc5545..74fa5ff658fa 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 @@ -9,7 +9,7 @@ /** Samples for ContainerAppsRevisions DeactivateRevision. */ public final class ContainerAppsRevisionsDeactivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Deactivate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_Deactivate.json */ /** * Sample code: Deactivate Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java index 40770dc22e01..832b42f67d36 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 @@ -9,7 +9,7 @@ /** Samples for ContainerAppsRevisions GetRevision. */ public final class ContainerAppsRevisionsGetRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java index 8b6e6137e0a5..34c04abbb548 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 @@ -9,7 +9,7 @@ /** Samples for ContainerAppsRevisions ListRevisions. */ public final class ContainerAppsRevisionsListRevisionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java index 75ec2cca6581..6ca48402b6fc 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 @@ -9,7 +9,7 @@ /** Samples for ContainerAppsRevisions RestartRevision. */ public final class ContainerAppsRevisionsRestartRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Restart.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Revisions_Restart.json */ /** * Sample code: Restart Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java index b22cf60e9378..740d055bed3b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for ContainerAppsSourceControls CreateOrUpdate. */ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/SourceControls_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App SourceControl. @@ -32,11 +32,11 @@ public static void createOrUpdateContainerAppSourceControl( new RegistryInfo() .withRegistryUrl("xwang971reg.azurecr.io") .withRegistryUsername("xwang971reg") - .withRegistryPassword("")) + .withRegistryPassword("fakeTokenPlaceholder")) .withAzureCredentials( new AzureCredentials() .withClientId("") - .withClientSecret("") + .withClientSecret("fakeTokenPlaceholder") .withTenantId("")) .withContextPath("./") .withImage("image/tag")) 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 243a89a2b538..5d96aafdd44f 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 @@ -9,7 +9,7 @@ /** Samples for ContainerAppsSourceControls Delete. */ public final class ContainerAppsSourceControlsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/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 c8e88ef5d8b3..4b4a226febda 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 @@ -9,7 +9,7 @@ /** Samples for ContainerAppsSourceControls Get. */ public final class ContainerAppsSourceControlsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/SourceControls_Get.json */ /** * Sample code: Get Container App's SourceControl. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java index ed84c27a47b4..1867b4c75a29 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 @@ /** Samples for ContainerAppsSourceControls ListByContainerApp. */ public final class ContainerAppsSourceControlsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/SourceControls_ListByContainer.json */ /** * Sample code: List App's Source Controls. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java index 7c693a2a1f80..7ae659a8752c 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 @@ -5,12 +5,12 @@ package com.azure.resourcemanager.appcontainers.generated; import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; import com.azure.resourcemanager.appcontainers.models.Action; import com.azure.resourcemanager.appcontainers.models.AppProtocol; import com.azure.resourcemanager.appcontainers.models.BindingType; import com.azure.resourcemanager.appcontainers.models.Configuration; import com.azure.resourcemanager.appcontainers.models.Container; +import com.azure.resourcemanager.appcontainers.models.ContainerApp; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; @@ -34,7 +34,7 @@ /** Samples for ContainerApps Update. */ public final class ContainerAppsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_Patch.json */ /** * Sample code: Patch Container App. @@ -42,113 +42,108 @@ public final class ContainerAppsUpdateSamples { * @param manager Entry point to ContainerAppsApiManager. */ public static void patchContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerApps() - .update( - "rg", - "testcontainerApp0", - new ContainerAppInner() - .withLocation("East US") - .withTags(mapOf("tag1", "value1", "tag2", "value2")) - .withConfiguration( - new Configuration() - .withIngress( - new Ingress() - .withExternal(true) - .withTargetPort(3000) - .withTraffic( - Arrays - .asList( - new TrafficWeight() - .withRevisionName("testcontainerApp0-ab1234") - .withWeight(100) - .withLabel("production"))) - .withCustomDomains( - Arrays - .asList( - new CustomDomain() - .withName("www.my-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), - new CustomDomain() - .withName("www.my-other-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) - .withIpSecurityRestrictions( - Arrays - .asList( - new IpSecurityRestrictionRule() - .withName("Allow work IP A subnet") - .withDescription( - "Allowing all IP's within the subnet below to access" - + " containerapp") - .withIpAddressRange("192.168.1.1/32") - .withAction(Action.ALLOW), - new IpSecurityRestrictionRule() - .withName("Allow work IP B subnet") - .withDescription( - "Allowing all IP's within the subnet below to access" - + " containerapp") - .withIpAddressRange("192.168.1.1/8") - .withAction(Action.ALLOW)))) - .withDapr( - new Dapr() - .withEnabled(true) - .withAppProtocol(AppProtocol.HTTP) - .withAppPort(3000) - .withHttpReadBufferSize(30) - .withHttpMaxRequestSize(10) - .withLogLevel(LogLevel.DEBUG) - .withEnableApiLogging(true)) - .withMaxInactiveRevisions(10)) - .withTemplate( - new Template() - .withInitContainers( + ContainerApp resource = + manager.containerApps().getByResourceGroupWithResponse("rg", "testcontainerApp0", Context.NONE).getValue(); + resource + .update() + .withTags(mapOf("tag1", "value1", "tag2", "value2")) + .withConfiguration( + new Configuration() + .withIngress( + new Ingress() + .withExternal(true) + .withTargetPort(3000) + .withTraffic( + Arrays + .asList( + new TrafficWeight() + .withRevisionName("testcontainerApp0-ab1234") + .withWeight(100) + .withLabel("production"))) + .withCustomDomains( Arrays .asList( - new InitContainer() - .withImage("repo/testcontainerApp0:v4") - .withName("testinitcontainerApp0") - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers( + 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 Container() - .withImage("repo/testcontainerApp0:v1") - .withName("testcontainerApp0") - .withProbes( - Arrays - .asList( - new ContainerAppProbe() - .withHttpGet( - new ContainerAppProbeHttpGet() - .withHttpHeaders( - Arrays - .asList( - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header") - .withValue("Awesome"))) - .withPath("/health") - .withPort(8080)) - .withInitialDelaySeconds(3) - .withPeriodSeconds(3) - .withType(Type.LIVENESS))))) - .withScale( - new Scale() - .withMinReplicas(1) - .withMaxReplicas(5) - .withRules( + 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)))) + .withDapr( + new Dapr() + .withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30) + .withHttpMaxRequestSize(10) + .withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withMaxInactiveRevisions(10)) + .withTemplate( + new Template() + .withInitContainers( + Arrays + .asList( + new InitContainer() + .withImage("repo/testcontainerApp0:v4") + .withName("testinitcontainerApp0") + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers( + Arrays + .asList( + new Container() + .withImage("repo/testcontainerApp0:v1") + .withName("testcontainerApp0") + .withProbes( Arrays .asList( - new ScaleRule() - .withName("httpscalingrule") - .withCustom( - new CustomScaleRule() - .withType("http") - .withMetadata(mapOf("concurrentRequests", "50"))))))), - Context.NONE); + 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"))))))) + .apply(); } @SuppressWarnings("unchecked") 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 ca9c24c4c77b..575bc313359c 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 @@ -4,6 +4,8 @@ package com.azure.resourcemanager.appcontainers.generated; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; import com.azure.resourcemanager.appcontainers.models.DaprMetadata; import com.azure.resourcemanager.appcontainers.models.Secret; import java.util.Arrays; @@ -11,7 +13,7 @@ /** Samples for DaprComponents CreateOrUpdate. */ public final class DaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_Secrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_CreateOrUpdate_Secrets.json */ /** * Sample code: Create or update dapr component with secrets. @@ -22,26 +24,29 @@ public static void createOrUpdateDaprComponentWithSecrets( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .daprComponents() - .define("reddog") - .withExistingManagedEnvironment("examplerg", "myenvironment") - .withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) - .withMetadata( - Arrays - .asList( - new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("masterkey"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")) - .create(); + .createOrUpdateWithResponse( + "examplerg", + "myenvironment", + "reddog", + new DaprComponentInner() + .withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) + .withMetadata( + Arrays + .asList( + new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")), + Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json */ /** * Sample code: Create or update dapr component with secret store component. @@ -52,21 +57,24 @@ public static void createOrUpdateDaprComponentWithSecretStoreComponent( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .daprComponents() - .define("reddog") - .withExistingManagedEnvironment("examplerg", "myenvironment") - .withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecretStoreComponent("my-secret-store") - .withMetadata( - Arrays - .asList( - new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("masterkey"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")) - .create(); + .createOrUpdateWithResponse( + "examplerg", + "myenvironment", + "reddog", + new DaprComponentInner() + .withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecretStoreComponent("fakeTokenPlaceholder") + .withMetadata( + Arrays + .asList( + new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")), + Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java index b7da35a6649a..78fbbb6cedfe 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 @@ -9,7 +9,7 @@ /** Samples for DaprComponents Delete. */ public final class DaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_Delete.json */ /** * Sample code: Delete dapr component. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java index 43f1c579ea9d..2f168c068d54 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 @@ /** Samples for DaprComponents Get. */ public final class DaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_SecretStoreComponent.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_Get_SecretStoreComponent.json */ /** * Sample code: Get Dapr Component with secret store component. @@ -22,7 +22,7 @@ public static void getDaprComponentWithSecretStoreComponent( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_Secrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_Get_Secrets.json */ /** * Sample code: Get Dapr Component with secrets. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java index 722a171a9c77..f913c7819264 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 @@ -9,7 +9,7 @@ /** Samples for DaprComponents List. */ public final class DaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_List.json */ /** * Sample code: List Dapr Components. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java index f301616014ca..6f7361d54c7b 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 @@ -9,7 +9,7 @@ /** Samples for DaprComponents ListSecrets. */ public final class DaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/DaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java index 8f468b00f2e5..0b2c1c8b7bb9 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 @@ /** Samples for ManagedEnvironmentDiagnostics GetDetector. */ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironmentDiagnostics_Get.json */ /** * Sample code: Get diagnostic data for a managed environments. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java index a85c61336f73..ad62168ca59e 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 @@ /** Samples for ManagedEnvironmentDiagnostics ListDetectors. */ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironmentDiagnostics_List.json */ /** * Sample code: Get the list of available diagnostic data for a managed environments. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsCreateOrUpdateSamples.java index 750e5d106db9..ea87f391140d 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 @@ -18,7 +18,7 @@ /** Samples for ManagedEnvironments CreateOrUpdate. */ public final class ManagedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create environments. @@ -31,6 +31,7 @@ public static void createEnvironments(com.azure.resourcemanager.appcontainers.Co .define("testcontainerenv") .withRegion("East US") .withExistingResourceGroup("examplerg") + .withKind("serverless") .withSku(new EnvironmentSkuProperties().withName(SkuName.PREMIUM)) .withDaprAIConnectionString( "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") @@ -43,13 +44,13 @@ public static void createEnvironments(com.azure.resourcemanager.appcontainers.Co .withAppLogsConfiguration( new AppLogsConfiguration() .withLogAnalyticsConfiguration( - new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("string"))) + new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("fakeTokenPlaceholder"))) .withZoneRedundant(true) .withCustomDomainConfiguration( new CustomDomainConfiguration() .withDnsSuffix("www.my-name.com") - .withCertificateValue("PFX-or-PEM-blob".getBytes()) - .withCertificatePassword("private key password".getBytes())) + .withCertificateValue("Y2VydA==".getBytes()) + .withCertificatePassword("fakeTokenPlaceholder")) .withWorkloadProfiles( Arrays .asList( 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 4166699a9962..4159b233bfe9 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 @@ -9,7 +9,7 @@ /** Samples for ManagedEnvironments Delete. */ public final class ManagedEnvironmentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_Delete.json */ /** * Sample code: Delete environment by name. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java index efb4da6fedf3..ad3485305df4 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 @@ -9,7 +9,7 @@ /** Samples for ManagedEnvironmentsDiagnostics GetRoot. */ public final class ManagedEnvironmentsDiagnosticsGetRootSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java index bdf62a7cc8a2..11eed798fdd5 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 @@ /** Samples for ManagedEnvironments GetAuthToken. */ public final class ManagedEnvironmentsGetAuthTokenSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_GetAuthToken.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_GetAuthToken.json */ /** * Sample code: Get Managed Environment Auth Token. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetByResourceGroupSamples.java index de387050cbce..54be71d74d1e 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 @@ -9,7 +9,7 @@ /** Samples for ManagedEnvironments GetByResourceGroup. */ public final class ManagedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java index 56733c8475f4..0d33384e01b2 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 @@ /** Samples for ManagedEnvironments ListByResourceGroup. */ public final class ManagedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java index fb5a7e7e2aaf..b283b4a55a8a 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 @@ /** Samples for ManagedEnvironments List. */ public final class ManagedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_ListBySubscription.json */ /** * Sample code: List environments by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java index 5ae4808ba630..6af91dbf0106 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 @@ /** Samples for ManagedEnvironments ListWorkloadProfileStates. */ public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_ListWorkloadProfileStates.json */ /** * Sample code: List environments by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java index 3bef9aeafacd..7de601bd2a1f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for ManagedEnvironmentsStorages CreateOrUpdate. */ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. @@ -29,7 +29,7 @@ public static void createOrUpdateEnvironmentsStorage( .withAzureFile( new AzureFileProperties() .withAccountName("account1") - .withAccountKey("key") + .withAccountKey("fakeTokenPlaceholder") .withAccessMode(AccessMode.READ_ONLY) .withShareName("share1"))) .create(); 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 042571857672..37e2a946776e 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 @@ /** Samples for ManagedEnvironmentsStorages Delete. */ public final class ManagedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java index 923f94843e83..b345e8b4f615 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 @@ /** Samples for ManagedEnvironmentsStorages Get. */ public final class ManagedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage properties by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java index 10f08f791fee..f3f99654a304 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 @@ /** Samples for ManagedEnvironmentsStorages List. */ public final class ManagedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java index 99932fc462a6..97fa9e6f09a4 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 @@ -5,14 +5,14 @@ package com.azure.resourcemanager.appcontainers.generated; import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironment; import java.util.HashMap; import java.util.Map; /** Samples for ManagedEnvironments Update. */ public final class ManagedEnvironmentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ManagedEnvironments_Patch.json */ /** * Sample code: Patch Managed Environment. @@ -21,15 +21,12 @@ public final class ManagedEnvironmentsUpdateSamples { */ public static void patchManagedEnvironment( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironments() - .update( - "examplerg", - "testcontainerenv", - new ManagedEnvironmentInner() - .withLocation("East US") - .withTags(mapOf("tag1", "value1", "tag2", "value2")), - Context.NONE); + ManagedEnvironment resource = + manager + .managedEnvironments() + .getByResourceGroupWithResponse("examplerg", "testcontainerenv", Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @SuppressWarnings("unchecked") 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 9fe9d81cd386..36ec2d689c29 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 @@ -10,7 +10,7 @@ /** Samples for Namespaces CheckNameAvailability. */ public final class NamespacesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Certificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. @@ -31,7 +31,7 @@ public static void certificatesCheckNameAvailability( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/ContainerApps_CheckNameAvailability.json */ /** * Sample code: ContainerApps_CheckNameAvailability. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java index 41eb1cd667b7..0bcb0b885002 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 @@ -9,7 +9,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Operations_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-10-01/examples/Operations_List.json */ /** * Sample code: List all operations. 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 00234c42c406..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.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.AllowedAudiencesValidation; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AllowedAudiencesValidationTests { - @Test - public void testDeserialize() { - AllowedAudiencesValidation model = - BinaryData.fromString("{\"allowedAudiences\":[\"m\"]}").toObject(AllowedAudiencesValidation.class); - Assertions.assertEquals("m", model.allowedAudiences().get(0)); - } - - @Test - public void testSerialize() { - AllowedAudiencesValidation model = new AllowedAudiencesValidation().withAllowedAudiences(Arrays.asList("m")); - model = BinaryData.fromObject(model).toObject(AllowedAudiencesValidation.class); - Assertions.assertEquals("m", 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 b9de692babcf..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedPrincipalsTests.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.AllowedPrincipals; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AllowedPrincipalsTests { - @Test - public void testDeserialize() { - AllowedPrincipals model = - BinaryData - .fromString("{\"groups\":[\"urzafb\",\"jjgpb\",\"oq\"],\"identities\":[\"klj\",\"vbqid\"]}") - .toObject(AllowedPrincipals.class); - Assertions.assertEquals("urzafb", model.groups().get(0)); - Assertions.assertEquals("klj", model.identities().get(0)); - } - - @Test - public void testSerialize() { - AllowedPrincipals model = - new AllowedPrincipals() - .withGroups(Arrays.asList("urzafb", "jjgpb", "oq")) - .withIdentities(Arrays.asList("klj", "vbqid")); - model = BinaryData.fromObject(model).toObject(AllowedPrincipals.class); - Assertions.assertEquals("urzafb", model.groups().get(0)); - Assertions.assertEquals("klj", model.identities().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppRegistrationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppRegistrationTests.java deleted file mode 100644 index c1f989a0beee..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppRegistrationTests.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.AppRegistration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AppRegistrationTests { - @Test - public void testDeserialize() { - AppRegistration model = - BinaryData - .fromString("{\"appId\":\"l\",\"appSecretSettingName\":\"majtjaod\"}") - .toObject(AppRegistration.class); - Assertions.assertEquals("l", model.appId()); - Assertions.assertEquals("majtjaod", model.appSecretSettingName()); - } - - @Test - public void testSerialize() { - AppRegistration model = new AppRegistration().withAppId("l").withAppSecretSettingName("majtjaod"); - model = BinaryData.fromObject(model).toObject(AppRegistration.class); - Assertions.assertEquals("l", model.appId()); - Assertions.assertEquals("majtjaod", model.appSecretSettingName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppleRegistrationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppleRegistrationTests.java deleted file mode 100644 index 02090f7ea3d5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppleRegistrationTests.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.AppleRegistration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AppleRegistrationTests { - @Test - public void testDeserialize() { - AppleRegistration model = - BinaryData - .fromString("{\"clientId\":\"oqfbowskanyk\",\"clientSecretSettingName\":\"lcuiywgqywgndr\"}") - .toObject(AppleRegistration.class); - Assertions.assertEquals("oqfbowskanyk", model.clientId()); - Assertions.assertEquals("lcuiywgqywgndr", model.clientSecretSettingName()); - } - - @Test - public void testSerialize() { - AppleRegistration model = - new AppleRegistration().withClientId("oqfbowskanyk").withClientSecretSettingName("lcuiywgqywgndr"); - model = BinaryData.fromObject(model).toObject(AppleRegistration.class); - Assertions.assertEquals("oqfbowskanyk", model.clientId()); - Assertions.assertEquals("lcuiywgqywgndr", model.clientSecretSettingName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppleTests.java deleted file mode 100644 index dcba9e0131e5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AppleTests.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.Apple; -import com.azure.resourcemanager.appcontainers.models.AppleRegistration; -import com.azure.resourcemanager.appcontainers.models.LoginScopes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AppleTests { - @Test - public void testDeserialize() { - Apple model = - BinaryData - .fromString( - "{\"enabled\":true,\"registration\":{\"clientId\":\"gnxkrxdqmidtth\",\"clientSecretSettingName\":\"vqdra\"},\"login\":{\"scopes\":[\"big\"]}}") - .toObject(Apple.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("gnxkrxdqmidtth", model.registration().clientId()); - Assertions.assertEquals("vqdra", model.registration().clientSecretSettingName()); - Assertions.assertEquals("big", model.login().scopes().get(0)); - } - - @Test - public void testSerialize() { - Apple model = - new Apple() - .withEnabled(true) - .withRegistration( - new AppleRegistration().withClientId("gnxkrxdqmidtth").withClientSecretSettingName("vqdra")) - .withLogin(new LoginScopes().withScopes(Arrays.asList("big"))); - model = BinaryData.fromObject(model).toObject(Apple.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("gnxkrxdqmidtth", model.registration().clientId()); - Assertions.assertEquals("vqdra", model.registration().clientSecretSettingName()); - Assertions.assertEquals("big", model.login().scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigCollectionTests.java deleted file mode 100644 index 82fd1a024a19..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigCollectionTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner; -import com.azure.resourcemanager.appcontainers.models.AuthConfigCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - -public final class AuthConfigCollectionTests { - @Test - public void testDeserialize() { - AuthConfigCollection model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{},\"id\":\"xpyb\",\"name\":\"zm\",\"type\":\"hmtzopbsphrup\"},{\"properties\":{},\"id\":\"jhphoyc\",\"name\":\"sx\",\"type\":\"obhdxbmtqioqjze\"},{\"properties\":{},\"id\":\"wnoi\",\"name\":\"hwlrx\",\"type\":\"bqsoqijg\"}],\"nextLink\":\"mbpazlobcufpdzn\"}") - .toObject(AuthConfigCollection.class); - } - - @Test - public void testSerialize() { - AuthConfigCollection model = - new AuthConfigCollection() - .withValue(Arrays.asList(new AuthConfigInner(), new AuthConfigInner(), new AuthConfigInner())); - model = BinaryData.fromObject(model).toObject(AuthConfigCollection.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigInnerTests.java deleted file mode 100644 index 3f179d491cd6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigInnerTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.HttpSettings; -import com.azure.resourcemanager.appcontainers.models.IdentityProviders; -import com.azure.resourcemanager.appcontainers.models.Login; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AuthConfigInnerTests { - @Test - public void testDeserialize() { - AuthConfigInner model = - BinaryData - .fromString( - "{\"properties\":{\"platform\":{\"enabled\":false,\"runtimeVersion\":\"jnqglhqgnu\"},\"globalValidation\":{\"unauthenticatedClientAction\":\"Return401\",\"redirectToProvider\":\"ywifsqesaag\",\"excludedPaths\":[\"glzlhjxrifkwmrv\",\"tsizntocipaoua\"]},\"identityProviders\":{\"customOpenIdConnectProviders\":{}},\"login\":{\"preserveUrlFragmentsForLogins\":true,\"allowedExternalRedirectUrls\":[\"nygj\",\"fjddeqs\",\"deupewnwrei\"]},\"httpSettings\":{\"requireHttps\":false}},\"id\":\"rh\",\"name\":\"ofcqhsm\",\"type\":\"urkdtmlx\"}") - .toObject(AuthConfigInner.class); - Assertions.assertEquals(false, model.platform().enabled()); - Assertions.assertEquals("jnqglhqgnu", model.platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.RETURN401, model.globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("ywifsqesaag", model.globalValidation().redirectToProvider()); - Assertions.assertEquals("glzlhjxrifkwmrv", model.globalValidation().excludedPaths().get(0)); - Assertions.assertEquals(true, model.login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals("nygj", model.login().allowedExternalRedirectUrls().get(0)); - Assertions.assertEquals(false, model.httpSettings().requireHttps()); - } - - @Test - public void testSerialize() { - AuthConfigInner model = - new AuthConfigInner() - .withPlatform(new AuthPlatform().withEnabled(false).withRuntimeVersion("jnqglhqgnu")) - .withGlobalValidation( - new GlobalValidation() - .withUnauthenticatedClientAction(UnauthenticatedClientActionV2.RETURN401) - .withRedirectToProvider("ywifsqesaag") - .withExcludedPaths(Arrays.asList("glzlhjxrifkwmrv", "tsizntocipaoua"))) - .withIdentityProviders(new IdentityProviders().withCustomOpenIdConnectProviders(mapOf())) - .withLogin( - new Login() - .withPreserveUrlFragmentsForLogins(true) - .withAllowedExternalRedirectUrls(Arrays.asList("nygj", "fjddeqs", "deupewnwrei"))) - .withHttpSettings(new HttpSettings().withRequireHttps(false)); - model = BinaryData.fromObject(model).toObject(AuthConfigInner.class); - Assertions.assertEquals(false, model.platform().enabled()); - Assertions.assertEquals("jnqglhqgnu", model.platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.RETURN401, model.globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("ywifsqesaag", model.globalValidation().redirectToProvider()); - Assertions.assertEquals("glzlhjxrifkwmrv", model.globalValidation().excludedPaths().get(0)); - Assertions.assertEquals(true, model.login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals("nygj", model.login().allowedExternalRedirectUrls().get(0)); - Assertions.assertEquals(false, model.httpSettings().requireHttps()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigPropertiesTests.java deleted file mode 100644 index 9417352161d2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigPropertiesTests.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigProperties; -import com.azure.resourcemanager.appcontainers.models.Apple; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectory; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebApps; -import com.azure.resourcemanager.appcontainers.models.CookieExpiration; -import com.azure.resourcemanager.appcontainers.models.CookieExpirationConvention; -import com.azure.resourcemanager.appcontainers.models.CustomOpenIdConnectProvider; -import com.azure.resourcemanager.appcontainers.models.Facebook; -import com.azure.resourcemanager.appcontainers.models.ForwardProxy; -import com.azure.resourcemanager.appcontainers.models.ForwardProxyConvention; -import com.azure.resourcemanager.appcontainers.models.GitHub; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.Google; -import com.azure.resourcemanager.appcontainers.models.HttpSettings; -import com.azure.resourcemanager.appcontainers.models.HttpSettingsRoutes; -import com.azure.resourcemanager.appcontainers.models.IdentityProviders; -import com.azure.resourcemanager.appcontainers.models.Login; -import com.azure.resourcemanager.appcontainers.models.LoginRoutes; -import com.azure.resourcemanager.appcontainers.models.Nonce; -import com.azure.resourcemanager.appcontainers.models.Twitter; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AuthConfigPropertiesTests { - @Test - public void testDeserialize() { - AuthConfigProperties model = - BinaryData - .fromString( - "{\"platform\":{\"enabled\":true,\"runtimeVersion\":\"sjtxukcdmp\"},\"globalValidation\":{\"unauthenticatedClientAction\":\"Return403\",\"redirectToProvider\":\"uanzwuxzdx\",\"excludedPaths\":[\"rlhm\",\"hfpmrqobmtukknr\",\"rtihfxtijbpz\",\"gnwzsymglzufc\"]},\"identityProviders\":{\"azureActiveDirectory\":{\"enabled\":false,\"isAutoProvisioned\":true},\"facebook\":{\"enabled\":false,\"graphApiVersion\":\"cbjy\"},\"gitHub\":{\"enabled\":false},\"google\":{\"enabled\":true},\"twitter\":{\"enabled\":true},\"apple\":{\"enabled\":false},\"azureStaticWebApps\":{\"enabled\":false},\"customOpenIdConnectProviders\":{\"y\":{\"enabled\":false}}},\"login\":{\"routes\":{\"logoutEndpoint\":\"b\"},\"preserveUrlFragmentsForLogins\":false,\"allowedExternalRedirectUrls\":[\"vd\"],\"cookieExpiration\":{\"convention\":\"FixedTime\",\"timeToExpiration\":\"tfwvukxgaudc\"},\"nonce\":{\"validateNonce\":false,\"nonceExpirationInterval\":\"jcny\"}},\"httpSettings\":{\"requireHttps\":true,\"routes\":{\"apiPrefix\":\"htnapczwlokjyem\"},\"forwardProxy\":{\"convention\":\"NoProxy\",\"customHostHeaderName\":\"pjoxzjnch\",\"customProtoHeaderName\":\"jspodmailzyde\"}}}") - .toObject(AuthConfigProperties.class); - Assertions.assertEquals(true, model.platform().enabled()); - Assertions.assertEquals("sjtxukcdmp", model.platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.RETURN403, model.globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("uanzwuxzdx", model.globalValidation().redirectToProvider()); - Assertions.assertEquals("rlhm", model.globalValidation().excludedPaths().get(0)); - Assertions.assertEquals(false, model.identityProviders().azureActiveDirectory().enabled()); - Assertions.assertEquals(true, model.identityProviders().azureActiveDirectory().isAutoProvisioned()); - Assertions.assertEquals(false, model.identityProviders().facebook().enabled()); - Assertions.assertEquals("cbjy", model.identityProviders().facebook().graphApiVersion()); - Assertions.assertEquals(false, model.identityProviders().gitHub().enabled()); - Assertions.assertEquals(true, model.identityProviders().google().enabled()); - Assertions.assertEquals(true, model.identityProviders().twitter().enabled()); - Assertions.assertEquals(false, model.identityProviders().apple().enabled()); - Assertions.assertEquals(false, model.identityProviders().azureStaticWebApps().enabled()); - Assertions.assertEquals(false, model.identityProviders().customOpenIdConnectProviders().get("y").enabled()); - Assertions.assertEquals("b", model.login().routes().logoutEndpoint()); - Assertions.assertEquals(false, model.login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals("vd", model.login().allowedExternalRedirectUrls().get(0)); - Assertions.assertEquals(CookieExpirationConvention.FIXED_TIME, model.login().cookieExpiration().convention()); - Assertions.assertEquals("tfwvukxgaudc", model.login().cookieExpiration().timeToExpiration()); - Assertions.assertEquals(false, model.login().nonce().validateNonce()); - Assertions.assertEquals("jcny", model.login().nonce().nonceExpirationInterval()); - Assertions.assertEquals(true, model.httpSettings().requireHttps()); - Assertions.assertEquals("htnapczwlokjyem", model.httpSettings().routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.httpSettings().forwardProxy().convention()); - Assertions.assertEquals("pjoxzjnch", model.httpSettings().forwardProxy().customHostHeaderName()); - Assertions.assertEquals("jspodmailzyde", model.httpSettings().forwardProxy().customProtoHeaderName()); - } - - @Test - public void testSerialize() { - AuthConfigProperties model = - new AuthConfigProperties() - .withPlatform(new AuthPlatform().withEnabled(true).withRuntimeVersion("sjtxukcdmp")) - .withGlobalValidation( - new GlobalValidation() - .withUnauthenticatedClientAction(UnauthenticatedClientActionV2.RETURN403) - .withRedirectToProvider("uanzwuxzdx") - .withExcludedPaths(Arrays.asList("rlhm", "hfpmrqobmtukknr", "rtihfxtijbpz", "gnwzsymglzufc"))) - .withIdentityProviders( - new IdentityProviders() - .withAzureActiveDirectory( - new AzureActiveDirectory().withEnabled(false).withIsAutoProvisioned(true)) - .withFacebook(new Facebook().withEnabled(false).withGraphApiVersion("cbjy")) - .withGitHub(new GitHub().withEnabled(false)) - .withGoogle(new Google().withEnabled(true)) - .withTwitter(new Twitter().withEnabled(true)) - .withApple(new Apple().withEnabled(false)) - .withAzureStaticWebApps(new AzureStaticWebApps().withEnabled(false)) - .withCustomOpenIdConnectProviders( - mapOf("y", new CustomOpenIdConnectProvider().withEnabled(false)))) - .withLogin( - new Login() - .withRoutes(new LoginRoutes().withLogoutEndpoint("b")) - .withPreserveUrlFragmentsForLogins(false) - .withAllowedExternalRedirectUrls(Arrays.asList("vd")) - .withCookieExpiration( - new CookieExpiration() - .withConvention(CookieExpirationConvention.FIXED_TIME) - .withTimeToExpiration("tfwvukxgaudc")) - .withNonce(new Nonce().withValidateNonce(false).withNonceExpirationInterval("jcny"))) - .withHttpSettings( - new HttpSettings() - .withRequireHttps(true) - .withRoutes(new HttpSettingsRoutes().withApiPrefix("htnapczwlokjyem")) - .withForwardProxy( - new ForwardProxy() - .withConvention(ForwardProxyConvention.NO_PROXY) - .withCustomHostHeaderName("pjoxzjnch") - .withCustomProtoHeaderName("jspodmailzyde"))); - model = BinaryData.fromObject(model).toObject(AuthConfigProperties.class); - Assertions.assertEquals(true, model.platform().enabled()); - Assertions.assertEquals("sjtxukcdmp", model.platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.RETURN403, model.globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("uanzwuxzdx", model.globalValidation().redirectToProvider()); - Assertions.assertEquals("rlhm", model.globalValidation().excludedPaths().get(0)); - Assertions.assertEquals(false, model.identityProviders().azureActiveDirectory().enabled()); - Assertions.assertEquals(true, model.identityProviders().azureActiveDirectory().isAutoProvisioned()); - Assertions.assertEquals(false, model.identityProviders().facebook().enabled()); - Assertions.assertEquals("cbjy", model.identityProviders().facebook().graphApiVersion()); - Assertions.assertEquals(false, model.identityProviders().gitHub().enabled()); - Assertions.assertEquals(true, model.identityProviders().google().enabled()); - Assertions.assertEquals(true, model.identityProviders().twitter().enabled()); - Assertions.assertEquals(false, model.identityProviders().apple().enabled()); - Assertions.assertEquals(false, model.identityProviders().azureStaticWebApps().enabled()); - Assertions.assertEquals(false, model.identityProviders().customOpenIdConnectProviders().get("y").enabled()); - Assertions.assertEquals("b", model.login().routes().logoutEndpoint()); - Assertions.assertEquals(false, model.login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals("vd", model.login().allowedExternalRedirectUrls().get(0)); - Assertions.assertEquals(CookieExpirationConvention.FIXED_TIME, model.login().cookieExpiration().convention()); - Assertions.assertEquals("tfwvukxgaudc", model.login().cookieExpiration().timeToExpiration()); - Assertions.assertEquals(false, model.login().nonce().validateNonce()); - Assertions.assertEquals("jcny", model.login().nonce().nonceExpirationInterval()); - Assertions.assertEquals(true, model.httpSettings().requireHttps()); - Assertions.assertEquals("htnapczwlokjyem", model.httpSettings().routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.httpSettings().forwardProxy().convention()); - Assertions.assertEquals("pjoxzjnch", model.httpSettings().forwardProxy().customHostHeaderName()); - Assertions.assertEquals("jspodmailzyde", model.httpSettings().forwardProxy().customProtoHeaderName()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java deleted file mode 100644 index 9ce13d083e26..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.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.AuthPlatform; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AuthPlatformTests { - @Test - public void testDeserialize() { - AuthPlatform model = - BinaryData.fromString("{\"enabled\":true,\"runtimeVersion\":\"yahux\"}").toObject(AuthPlatform.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("yahux", model.runtimeVersion()); - } - - @Test - public void testSerialize() { - AuthPlatform model = new AuthPlatform().withEnabled(true).withRuntimeVersion("yahux"); - model = BinaryData.fromObject(model).toObject(AuthPlatform.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("yahux", model.runtimeVersion()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableOperationsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableOperationsTests.java deleted file mode 100644 index 41758c752853..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableOperationsTests.java +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.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; -import org.junit.jupiter.api.Test; - -public final class AvailableOperationsTests { - @Test - public void testDeserialize() { - AvailableOperations model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"kambtrnegvmnvuqe\",\"isDataAction\":false,\"display\":{\"provider\":\"pa\",\"resource\":\"jbkkdmflvestmjl\",\"operation\":\"ril\",\"description\":\"apeewchpxlkt\"},\"origin\":\"uziycsl\"},{\"name\":\"ufuztcktyhjtq\",\"isDataAction\":true,\"display\":{\"provider\":\"ulwm\",\"resource\":\"qzz\",\"operation\":\"jvpglydzgk\",\"description\":\"qeevt\"},\"origin\":\"pryu\"},{\"name\":\"wytpzdmovz\",\"isDataAction\":false,\"display\":{\"provider\":\"wzqa\",\"resource\":\"lgzurig\",\"operation\":\"ecxn\",\"description\":\"icokpv\"},\"origin\":\"lqtmldgxob\"},{\"name\":\"rclnpkc\",\"isDataAction\":false,\"display\":{\"provider\":\"iykhy\",\"resource\":\"fvjlboxqvkjlmx\",\"operation\":\"mdy\",\"description\":\"dwdigumb\"},\"origin\":\"aauzzptjazysd\"}],\"nextLink\":\"ezwwv\"}") - .toObject(AvailableOperations.class); - Assertions.assertEquals("kambtrnegvmnvuqe", model.value().get(0).name()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - Assertions.assertEquals("pa", model.value().get(0).display().provider()); - Assertions.assertEquals("jbkkdmflvestmjl", model.value().get(0).display().resource()); - Assertions.assertEquals("ril", model.value().get(0).display().operation()); - Assertions.assertEquals("apeewchpxlkt", model.value().get(0).display().description()); - Assertions.assertEquals("uziycsl", model.value().get(0).origin()); - Assertions.assertEquals("ezwwv", model.nextLink()); - } - - @Test - public void testSerialize() { - AvailableOperations model = - new AvailableOperations() - .withValue( - Arrays - .asList( - new OperationDetailInner() - .withName("kambtrnegvmnvuqe") - .withIsDataAction(false) - .withDisplay( - new OperationDisplay() - .withProvider("pa") - .withResource("jbkkdmflvestmjl") - .withOperation("ril") - .withDescription("apeewchpxlkt")) - .withOrigin("uziycsl"), - new OperationDetailInner() - .withName("ufuztcktyhjtq") - .withIsDataAction(true) - .withDisplay( - new OperationDisplay() - .withProvider("ulwm") - .withResource("qzz") - .withOperation("jvpglydzgk") - .withDescription("qeevt")) - .withOrigin("pryu"), - new OperationDetailInner() - .withName("wytpzdmovz") - .withIsDataAction(false) - .withDisplay( - new OperationDisplay() - .withProvider("wzqa") - .withResource("lgzurig") - .withOperation("ecxn") - .withDescription("icokpv")) - .withOrigin("lqtmldgxob"), - new OperationDetailInner() - .withName("rclnpkc") - .withIsDataAction(false) - .withDisplay( - new OperationDisplay() - .withProvider("iykhy") - .withResource("fvjlboxqvkjlmx") - .withOperation("mdy") - .withDescription("dwdigumb")) - .withOrigin("aauzzptjazysd"))) - .withNextLink("ezwwv"); - model = BinaryData.fromObject(model).toObject(AvailableOperations.class); - Assertions.assertEquals("kambtrnegvmnvuqe", model.value().get(0).name()); - Assertions.assertEquals(false, model.value().get(0).isDataAction()); - Assertions.assertEquals("pa", model.value().get(0).display().provider()); - Assertions.assertEquals("jbkkdmflvestmjl", model.value().get(0).display().resource()); - Assertions.assertEquals("ril", model.value().get(0).display().operation()); - Assertions.assertEquals("apeewchpxlkt", model.value().get(0).display().description()); - Assertions.assertEquals("uziycsl", model.value().get(0).origin()); - Assertions.assertEquals("ezwwv", 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 6da5265f9513..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfileInnerTests.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.AvailableWorkloadProfileInner; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; -import com.azure.resourcemanager.appcontainers.models.Category; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AvailableWorkloadProfileInnerTests { - @Test - public void testDeserialize() { - AvailableWorkloadProfileInner model = - BinaryData - .fromString( - "{\"location\":\"ruzslzoj\",\"properties\":{\"billingMeterCategory\":\"PremiumSkuMemoryOptimized\",\"applicability\":\"Custom\",\"cores\":1500212037,\"memoryGiB\":1889500647,\"displayName\":\"ngfdgugeyzihgrky\"},\"id\":\"zabs\",\"name\":\"mfp\",\"type\":\"hojeevy\"}") - .toObject(AvailableWorkloadProfileInner.class); - Assertions.assertEquals("ruzslzoj", model.location()); - Assertions.assertEquals(Category.PREMIUM_SKU_MEMORY_OPTIMIZED, model.properties().billingMeterCategory()); - Assertions.assertEquals(Applicability.CUSTOM, model.properties().applicability()); - Assertions.assertEquals(1500212037, model.properties().cores()); - Assertions.assertEquals(1889500647, model.properties().memoryGiB()); - Assertions.assertEquals("ngfdgugeyzihgrky", model.properties().displayName()); - } - - @Test - public void testSerialize() { - AvailableWorkloadProfileInner model = - new AvailableWorkloadProfileInner() - .withLocation("ruzslzoj") - .withProperties( - new AvailableWorkloadProfileProperties() - .withBillingMeterCategory(Category.PREMIUM_SKU_MEMORY_OPTIMIZED) - .withApplicability(Applicability.CUSTOM) - .withCores(1500212037) - .withMemoryGiB(1889500647) - .withDisplayName("ngfdgugeyzihgrky")); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfileInner.class); - Assertions.assertEquals("ruzslzoj", model.location()); - Assertions.assertEquals(Category.PREMIUM_SKU_MEMORY_OPTIMIZED, model.properties().billingMeterCategory()); - Assertions.assertEquals(Applicability.CUSTOM, model.properties().applicability()); - Assertions.assertEquals(1500212037, model.properties().cores()); - Assertions.assertEquals(1889500647, model.properties().memoryGiB()); - Assertions.assertEquals("ngfdgugeyzihgrky", 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 1d1c287b08cc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilePropertiesTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; -import com.azure.resourcemanager.appcontainers.models.Category; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AvailableWorkloadProfilePropertiesTests { - @Test - public void testDeserialize() { - AvailableWorkloadProfileProperties model = - BinaryData - .fromString( - "{\"billingMeterCategory\":\"PremiumSkuGeneralPurpose\",\"applicability\":\"LocationDefault\",\"cores\":1792442027,\"memoryGiB\":296401749,\"displayName\":\"gomfgbeglq\"}") - .toObject(AvailableWorkloadProfileProperties.class); - Assertions.assertEquals(Category.PREMIUM_SKU_GENERAL_PURPOSE, model.billingMeterCategory()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.applicability()); - Assertions.assertEquals(1792442027, model.cores()); - Assertions.assertEquals(296401749, model.memoryGiB()); - Assertions.assertEquals("gomfgbeglq", model.displayName()); - } - - @Test - public void testSerialize() { - AvailableWorkloadProfileProperties model = - new AvailableWorkloadProfileProperties() - .withBillingMeterCategory(Category.PREMIUM_SKU_GENERAL_PURPOSE) - .withApplicability(Applicability.LOCATION_DEFAULT) - .withCores(1792442027) - .withMemoryGiB(296401749) - .withDisplayName("gomfgbeglq"); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfileProperties.class); - Assertions.assertEquals(Category.PREMIUM_SKU_GENERAL_PURPOSE, model.billingMeterCategory()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.applicability()); - Assertions.assertEquals(1792442027, model.cores()); - Assertions.assertEquals(296401749, model.memoryGiB()); - Assertions.assertEquals("gomfgbeglq", 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 da7e816f2cf1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesCollectionTests.java +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.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 com.azure.resourcemanager.appcontainers.models.Category; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AvailableWorkloadProfilesCollectionTests { - @Test - public void testDeserialize() { - AvailableWorkloadProfilesCollection model = - BinaryData - .fromString( - "{\"value\":[{\"location\":\"psttexoq\",\"properties\":{\"billingMeterCategory\":\"PremiumSkuGeneralPurpose\",\"applicability\":\"Custom\",\"cores\":402556977,\"memoryGiB\":130119392,\"displayName\":\"uncuw\"},\"id\":\"spkcdqzh\",\"name\":\"ctddun\",\"type\":\"ndy\"},{\"location\":\"chrqb\",\"properties\":{\"billingMeterCategory\":\"PremiumSkuGeneralPurpose\",\"applicability\":\"Custom\",\"cores\":1318617256,\"memoryGiB\":4442645,\"displayName\":\"wboxjumvqqo\"},\"id\":\"hrraiouaubrj\",\"name\":\"loqxfuojrngif\",\"type\":\"rzpasccbiuimzdly\"}],\"nextLink\":\"fqwmkyoquf\"}") - .toObject(AvailableWorkloadProfilesCollection.class); - Assertions.assertEquals("psttexoq", model.value().get(0).location()); - Assertions - .assertEquals( - Category.PREMIUM_SKU_GENERAL_PURPOSE, model.value().get(0).properties().billingMeterCategory()); - Assertions.assertEquals(Applicability.CUSTOM, model.value().get(0).properties().applicability()); - Assertions.assertEquals(402556977, model.value().get(0).properties().cores()); - Assertions.assertEquals(130119392, model.value().get(0).properties().memoryGiB()); - Assertions.assertEquals("uncuw", model.value().get(0).properties().displayName()); - } - - @Test - public void testSerialize() { - AvailableWorkloadProfilesCollection model = - new AvailableWorkloadProfilesCollection() - .withValue( - Arrays - .asList( - new AvailableWorkloadProfileInner() - .withLocation("psttexoq") - .withProperties( - new AvailableWorkloadProfileProperties() - .withBillingMeterCategory(Category.PREMIUM_SKU_GENERAL_PURPOSE) - .withApplicability(Applicability.CUSTOM) - .withCores(402556977) - .withMemoryGiB(130119392) - .withDisplayName("uncuw")), - new AvailableWorkloadProfileInner() - .withLocation("chrqb") - .withProperties( - new AvailableWorkloadProfileProperties() - .withBillingMeterCategory(Category.PREMIUM_SKU_GENERAL_PURPOSE) - .withApplicability(Applicability.CUSTOM) - .withCores(1318617256) - .withMemoryGiB(4442645) - .withDisplayName("wboxjumvqqo")))); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfilesCollection.class); - Assertions.assertEquals("psttexoq", model.value().get(0).location()); - Assertions - .assertEquals( - Category.PREMIUM_SKU_GENERAL_PURPOSE, model.value().get(0).properties().billingMeterCategory()); - Assertions.assertEquals(Applicability.CUSTOM, model.value().get(0).properties().applicability()); - Assertions.assertEquals(402556977, model.value().get(0).properties().cores()); - Assertions.assertEquals(130119392, model.value().get(0).properties().memoryGiB()); - Assertions.assertEquals("uncuw", 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 052ac47bc556..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetMockTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.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.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfile; -import com.azure.resourcemanager.appcontainers.models.Category; -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\":\"idmhmwf\",\"properties\":{\"billingMeterCategory\":\"PremiumSkuComputeOptimized\",\"applicability\":\"LocationDefault\",\"cores\":411481219,\"memoryGiB\":323271862,\"displayName\":\"ccrrvweyoxoyyu\"},\"id\":\"haim\",\"name\":\"oir\",\"type\":\"qboshbra\"}]}"; - - 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("wwgbdv", Context.NONE); - - Assertions.assertEquals("idmhmwf", response.iterator().next().location()); - Assertions - .assertEquals( - Category.PREMIUM_SKU_COMPUTE_OPTIMIZED, response.iterator().next().properties().billingMeterCategory()); - Assertions - .assertEquals(Applicability.LOCATION_DEFAULT, response.iterator().next().properties().applicability()); - Assertions.assertEquals(411481219, response.iterator().next().properties().cores()); - Assertions.assertEquals(323271862, response.iterator().next().properties().memoryGiB()); - Assertions.assertEquals("ccrrvweyoxoyyu", 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 e0b3f0df7873..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryLoginTests.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.AzureActiveDirectoryLogin; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureActiveDirectoryLoginTests { - @Test - public void testDeserialize() { - AzureActiveDirectoryLogin model = - BinaryData - .fromString("{\"loginParameters\":[\"eju\"],\"disableWWWAuthenticate\":true}") - .toObject(AzureActiveDirectoryLogin.class); - Assertions.assertEquals("eju", model.loginParameters().get(0)); - Assertions.assertEquals(true, model.disableWwwAuthenticate()); - } - - @Test - public void testSerialize() { - AzureActiveDirectoryLogin model = - new AzureActiveDirectoryLogin().withLoginParameters(Arrays.asList("eju")).withDisableWwwAuthenticate(true); - model = BinaryData.fromObject(model).toObject(AzureActiveDirectoryLogin.class); - Assertions.assertEquals("eju", model.loginParameters().get(0)); - Assertions.assertEquals(true, model.disableWwwAuthenticate()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryRegistrationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryRegistrationTests.java deleted file mode 100644 index 59a59d6c4bc4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryRegistrationTests.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.models.AzureActiveDirectoryRegistration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureActiveDirectoryRegistrationTests { - @Test - public void testDeserialize() { - AzureActiveDirectoryRegistration model = - BinaryData - .fromString( - "{\"openIdIssuer\":\"ddgmb\",\"clientId\":\"ex\",\"clientSecretSettingName\":\"bhtqqrolfpfpsa\",\"clientSecretCertificateThumbprint\":\"bquxigjy\",\"clientSecretCertificateSubjectAlternativeName\":\"zjaoyfhrtxil\",\"clientSecretCertificateIssuer\":\"rkujy\"}") - .toObject(AzureActiveDirectoryRegistration.class); - Assertions.assertEquals("ddgmb", model.openIdIssuer()); - Assertions.assertEquals("ex", model.clientId()); - Assertions.assertEquals("bhtqqrolfpfpsa", model.clientSecretSettingName()); - Assertions.assertEquals("bquxigjy", model.clientSecretCertificateThumbprint()); - Assertions.assertEquals("zjaoyfhrtxil", model.clientSecretCertificateSubjectAlternativeName()); - Assertions.assertEquals("rkujy", model.clientSecretCertificateIssuer()); - } - - @Test - public void testSerialize() { - AzureActiveDirectoryRegistration model = - new AzureActiveDirectoryRegistration() - .withOpenIdIssuer("ddgmb") - .withClientId("ex") - .withClientSecretSettingName("bhtqqrolfpfpsa") - .withClientSecretCertificateThumbprint("bquxigjy") - .withClientSecretCertificateSubjectAlternativeName("zjaoyfhrtxil") - .withClientSecretCertificateIssuer("rkujy"); - model = BinaryData.fromObject(model).toObject(AzureActiveDirectoryRegistration.class); - Assertions.assertEquals("ddgmb", model.openIdIssuer()); - Assertions.assertEquals("ex", model.clientId()); - Assertions.assertEquals("bhtqqrolfpfpsa", model.clientSecretSettingName()); - Assertions.assertEquals("bquxigjy", model.clientSecretCertificateThumbprint()); - Assertions.assertEquals("zjaoyfhrtxil", model.clientSecretCertificateSubjectAlternativeName()); - Assertions.assertEquals("rkujy", model.clientSecretCertificateIssuer()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryTests.java deleted file mode 100644 index 0b1d3c18501e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryTests.java +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectory; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryLogin; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryRegistration; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryValidation; -import com.azure.resourcemanager.appcontainers.models.DefaultAuthorizationPolicy; -import com.azure.resourcemanager.appcontainers.models.JwtClaimChecks; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureActiveDirectoryTests { - @Test - public void testDeserialize() { - AzureActiveDirectory model = - BinaryData - .fromString( - "{\"enabled\":false,\"registration\":{\"openIdIssuer\":\"pdappds\",\"clientId\":\"kvwrwjfeu\",\"clientSecretSettingName\":\"hutje\",\"clientSecretCertificateThumbprint\":\"mrldhu\",\"clientSecretCertificateSubjectAlternativeName\":\"zzd\",\"clientSecretCertificateIssuer\":\"qxhocdgeablgphut\"},\"login\":{\"loginParameters\":[\"vkaozwyiftyhxhur\",\"k\"],\"disableWWWAuthenticate\":false},\"validation\":{\"jwtClaimChecks\":{\"allowedGroups\":[\"iwpwcuk\",\"fkgiawxk\",\"ryplwckbasyypn\"],\"allowedClientApplications\":[\"sgcbac\",\"hejkotynqgou\",\"zndlikwy\",\"kgfg\"]},\"allowedAudiences\":[\"adgakeqsrxybz\",\"qedqytbciqfoufl\",\"mnkzsmod\",\"glougpbk\"],\"defaultAuthorizationPolicy\":{\"allowedApplications\":[\"duqkt\",\"pspwgcuertu\",\"kdosvqw\",\"bmdg\"]}},\"isAutoProvisioned\":true}") - .toObject(AzureActiveDirectory.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("pdappds", model.registration().openIdIssuer()); - Assertions.assertEquals("kvwrwjfeu", model.registration().clientId()); - Assertions.assertEquals("hutje", model.registration().clientSecretSettingName()); - Assertions.assertEquals("mrldhu", model.registration().clientSecretCertificateThumbprint()); - Assertions.assertEquals("zzd", model.registration().clientSecretCertificateSubjectAlternativeName()); - Assertions.assertEquals("qxhocdgeablgphut", model.registration().clientSecretCertificateIssuer()); - Assertions.assertEquals("vkaozwyiftyhxhur", model.login().loginParameters().get(0)); - Assertions.assertEquals(false, model.login().disableWwwAuthenticate()); - Assertions.assertEquals("iwpwcuk", model.validation().jwtClaimChecks().allowedGroups().get(0)); - Assertions.assertEquals("sgcbac", model.validation().jwtClaimChecks().allowedClientApplications().get(0)); - Assertions.assertEquals("adgakeqsrxybz", model.validation().allowedAudiences().get(0)); - Assertions.assertEquals("duqkt", model.validation().defaultAuthorizationPolicy().allowedApplications().get(0)); - Assertions.assertEquals(true, model.isAutoProvisioned()); - } - - @Test - public void testSerialize() { - AzureActiveDirectory model = - new AzureActiveDirectory() - .withEnabled(false) - .withRegistration( - new AzureActiveDirectoryRegistration() - .withOpenIdIssuer("pdappds") - .withClientId("kvwrwjfeu") - .withClientSecretSettingName("hutje") - .withClientSecretCertificateThumbprint("mrldhu") - .withClientSecretCertificateSubjectAlternativeName("zzd") - .withClientSecretCertificateIssuer("qxhocdgeablgphut")) - .withLogin( - new AzureActiveDirectoryLogin() - .withLoginParameters(Arrays.asList("vkaozwyiftyhxhur", "k")) - .withDisableWwwAuthenticate(false)) - .withValidation( - new AzureActiveDirectoryValidation() - .withJwtClaimChecks( - new JwtClaimChecks() - .withAllowedGroups(Arrays.asList("iwpwcuk", "fkgiawxk", "ryplwckbasyypn")) - .withAllowedClientApplications( - Arrays.asList("sgcbac", "hejkotynqgou", "zndlikwy", "kgfg"))) - .withAllowedAudiences(Arrays.asList("adgakeqsrxybz", "qedqytbciqfoufl", "mnkzsmod", "glougpbk")) - .withDefaultAuthorizationPolicy( - new DefaultAuthorizationPolicy() - .withAllowedApplications(Arrays.asList("duqkt", "pspwgcuertu", "kdosvqw", "bmdg")))) - .withIsAutoProvisioned(true); - model = BinaryData.fromObject(model).toObject(AzureActiveDirectory.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("pdappds", model.registration().openIdIssuer()); - Assertions.assertEquals("kvwrwjfeu", model.registration().clientId()); - Assertions.assertEquals("hutje", model.registration().clientSecretSettingName()); - Assertions.assertEquals("mrldhu", model.registration().clientSecretCertificateThumbprint()); - Assertions.assertEquals("zzd", model.registration().clientSecretCertificateSubjectAlternativeName()); - Assertions.assertEquals("qxhocdgeablgphut", model.registration().clientSecretCertificateIssuer()); - Assertions.assertEquals("vkaozwyiftyhxhur", model.login().loginParameters().get(0)); - Assertions.assertEquals(false, model.login().disableWwwAuthenticate()); - Assertions.assertEquals("iwpwcuk", model.validation().jwtClaimChecks().allowedGroups().get(0)); - Assertions.assertEquals("sgcbac", model.validation().jwtClaimChecks().allowedClientApplications().get(0)); - Assertions.assertEquals("adgakeqsrxybz", model.validation().allowedAudiences().get(0)); - Assertions.assertEquals("duqkt", model.validation().defaultAuthorizationPolicy().allowedApplications().get(0)); - Assertions.assertEquals(true, model.isAutoProvisioned()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryValidationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryValidationTests.java deleted file mode 100644 index 92d5eb1aa61a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryValidationTests.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.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AllowedPrincipals; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryValidation; -import com.azure.resourcemanager.appcontainers.models.DefaultAuthorizationPolicy; -import com.azure.resourcemanager.appcontainers.models.JwtClaimChecks; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureActiveDirectoryValidationTests { - @Test - public void testDeserialize() { - AzureActiveDirectoryValidation model = - BinaryData - .fromString( - "{\"jwtClaimChecks\":{\"allowedGroups\":[\"lyxwjkcprbnwbx\",\"jvtbvpyss\",\"dnrujqguhmuouqfp\",\"wzwbnguitn\"],\"allowedClientApplications\":[\"zga\",\"x\"]},\"allowedAudiences\":[\"zuckyfi\",\"rfidfvzwdz\",\"htymw\",\"sdkf\"],\"defaultAuthorizationPolicy\":{\"allowedPrincipals\":{\"groups\":[\"nteiwaopv\",\"mijcmmxdcufufs\"],\"identities\":[\"mzidnsezcxtb\",\"sgfyccsnew\"]},\"allowedApplications\":[\"z\",\"eiachboosflnr\"]}}") - .toObject(AzureActiveDirectoryValidation.class); - Assertions.assertEquals("lyxwjkcprbnwbx", model.jwtClaimChecks().allowedGroups().get(0)); - Assertions.assertEquals("zga", model.jwtClaimChecks().allowedClientApplications().get(0)); - Assertions.assertEquals("zuckyfi", model.allowedAudiences().get(0)); - Assertions.assertEquals("nteiwaopv", model.defaultAuthorizationPolicy().allowedPrincipals().groups().get(0)); - Assertions - .assertEquals("mzidnsezcxtb", model.defaultAuthorizationPolicy().allowedPrincipals().identities().get(0)); - Assertions.assertEquals("z", model.defaultAuthorizationPolicy().allowedApplications().get(0)); - } - - @Test - public void testSerialize() { - AzureActiveDirectoryValidation model = - new AzureActiveDirectoryValidation() - .withJwtClaimChecks( - new JwtClaimChecks() - .withAllowedGroups( - Arrays.asList("lyxwjkcprbnwbx", "jvtbvpyss", "dnrujqguhmuouqfp", "wzwbnguitn")) - .withAllowedClientApplications(Arrays.asList("zga", "x"))) - .withAllowedAudiences(Arrays.asList("zuckyfi", "rfidfvzwdz", "htymw", "sdkf")) - .withDefaultAuthorizationPolicy( - new DefaultAuthorizationPolicy() - .withAllowedPrincipals( - new AllowedPrincipals() - .withGroups(Arrays.asList("nteiwaopv", "mijcmmxdcufufs")) - .withIdentities(Arrays.asList("mzidnsezcxtb", "sgfyccsnew"))) - .withAllowedApplications(Arrays.asList("z", "eiachboosflnr"))); - model = BinaryData.fromObject(model).toObject(AzureActiveDirectoryValidation.class); - Assertions.assertEquals("lyxwjkcprbnwbx", model.jwtClaimChecks().allowedGroups().get(0)); - Assertions.assertEquals("zga", model.jwtClaimChecks().allowedClientApplications().get(0)); - Assertions.assertEquals("zuckyfi", model.allowedAudiences().get(0)); - Assertions.assertEquals("nteiwaopv", model.defaultAuthorizationPolicy().allowedPrincipals().groups().get(0)); - Assertions - .assertEquals("mzidnsezcxtb", model.defaultAuthorizationPolicy().allowedPrincipals().identities().get(0)); - Assertions.assertEquals("z", model.defaultAuthorizationPolicy().allowedApplications().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.java deleted file mode 100644 index 900228f67613..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.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.AzureStaticWebAppsRegistration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureStaticWebAppsRegistrationTests { - @Test - public void testDeserialize() { - AzureStaticWebAppsRegistration model = - BinaryData.fromString("{\"clientId\":\"cpecfvmmcoofs\"}").toObject(AzureStaticWebAppsRegistration.class); - Assertions.assertEquals("cpecfvmmcoofs", model.clientId()); - } - - @Test - public void testSerialize() { - AzureStaticWebAppsRegistration model = new AzureStaticWebAppsRegistration().withClientId("cpecfvmmcoofs"); - model = BinaryData.fromObject(model).toObject(AzureStaticWebAppsRegistration.class); - Assertions.assertEquals("cpecfvmmcoofs", 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 3924480b2732..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsTests.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.AzureStaticWebApps; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebAppsRegistration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class AzureStaticWebAppsTests { - @Test - public void testDeserialize() { - AzureStaticWebApps model = - BinaryData - .fromString("{\"enabled\":true,\"registration\":{\"clientId\":\"gpphrcgyn\"}}") - .toObject(AzureStaticWebApps.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("gpphrcgyn", model.registration().clientId()); - } - - @Test - public void testSerialize() { - AzureStaticWebApps model = - new AzureStaticWebApps() - .withEnabled(true) - .withRegistration(new AzureStaticWebAppsRegistration().withClientId("gpphrcgyn")); - model = BinaryData.fromObject(model).toObject(AzureStaticWebApps.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("gpphrcgyn", model.registration().clientId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BaseContainerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BaseContainerTests.java deleted file mode 100644 index ca32730bb673..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BaseContainerTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BaseContainer; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVar; -import com.azure.resourcemanager.appcontainers.models.VolumeMount; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BaseContainerTests { - @Test - public void testDeserialize() { - BaseContainer model = - BinaryData - .fromString( - "{\"image\":\"wmgxcxrsl\",\"name\":\"utwu\",\"command\":[\"rpkhjwn\",\"yqsluic\",\"dggkzzlvmbmpa\"],\"args\":[\"dfvue\",\"yw\",\"bpfvm\"],\"env\":[{\"name\":\"fouyf\",\"value\":\"akcp\",\"secretRef\":\"yzvqt\"},{\"name\":\"ubex\",\"value\":\"zksmondj\",\"secretRef\":\"uxvypomgkopkwh\"}],\"resources\":{\"cpu\":52.49920535887086,\"memory\":\"qgxy\",\"ephemeralStorage\":\"ocmbqfqvmkcxoza\"},\"volumeMounts\":[{\"volumeName\":\"lxprglyatddckcbc\",\"mountPath\":\"jrjxgciqibrhosx\"},{\"volumeName\":\"qrhzoymibmrqyib\",\"mountPath\":\"wfluszdt\"},{\"volumeName\":\"rkwofyyvoqa\",\"mountPath\":\"iexpbtgiwbwo\"}]}") - .toObject(BaseContainer.class); - Assertions.assertEquals("wmgxcxrsl", model.image()); - Assertions.assertEquals("utwu", model.name()); - Assertions.assertEquals("rpkhjwn", model.command().get(0)); - Assertions.assertEquals("dfvue", model.args().get(0)); - Assertions.assertEquals("fouyf", model.env().get(0).name()); - Assertions.assertEquals("akcp", model.env().get(0).value()); - Assertions.assertEquals("yzvqt", model.env().get(0).secretRef()); - Assertions.assertEquals(52.49920535887086D, model.resources().cpu()); - Assertions.assertEquals("qgxy", model.resources().memory()); - Assertions.assertEquals("lxprglyatddckcbc", model.volumeMounts().get(0).volumeName()); - Assertions.assertEquals("jrjxgciqibrhosx", model.volumeMounts().get(0).mountPath()); - } - - @Test - public void testSerialize() { - BaseContainer model = - new BaseContainer() - .withImage("wmgxcxrsl") - .withName("utwu") - .withCommand(Arrays.asList("rpkhjwn", "yqsluic", "dggkzzlvmbmpa")) - .withArgs(Arrays.asList("dfvue", "yw", "bpfvm")) - .withEnv( - Arrays - .asList( - new EnvironmentVar().withName("fouyf").withValue("akcp").withSecretRef("yzvqt"), - new EnvironmentVar() - .withName("ubex") - .withValue("zksmondj") - .withSecretRef("uxvypomgkopkwh"))) - .withResources(new ContainerResources().withCpu(52.49920535887086D).withMemory("qgxy")) - .withVolumeMounts( - Arrays - .asList( - new VolumeMount().withVolumeName("lxprglyatddckcbc").withMountPath("jrjxgciqibrhosx"), - new VolumeMount().withVolumeName("qrhzoymibmrqyib").withMountPath("wfluszdt"), - new VolumeMount().withVolumeName("rkwofyyvoqa").withMountPath("iexpbtgiwbwo"))); - model = BinaryData.fromObject(model).toObject(BaseContainer.class); - Assertions.assertEquals("wmgxcxrsl", model.image()); - Assertions.assertEquals("utwu", model.name()); - Assertions.assertEquals("rpkhjwn", model.command().get(0)); - Assertions.assertEquals("dfvue", model.args().get(0)); - Assertions.assertEquals("fouyf", model.env().get(0).name()); - Assertions.assertEquals("akcp", model.env().get(0).value()); - Assertions.assertEquals("yzvqt", model.env().get(0).secretRef()); - Assertions.assertEquals(52.49920535887086D, model.resources().cpu()); - Assertions.assertEquals("qgxy", model.resources().memory()); - Assertions.assertEquals("lxprglyatddckcbc", model.volumeMounts().get(0).volumeName()); - Assertions.assertEquals("jrjxgciqibrhosx", model.volumeMounts().get(0).mountPath()); - } -} 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 e7bd249fa4fc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterCollectionInnerTests.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.fluent.models.BillingMeterCollectionInner; -import com.azure.resourcemanager.appcontainers.models.BillingMeter; -import com.azure.resourcemanager.appcontainers.models.BillingMeterProperties; -import com.azure.resourcemanager.appcontainers.models.Category; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BillingMeterCollectionInnerTests { - @Test - public void testDeserialize() { - BillingMeterCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"location\":\"o\",\"properties\":{\"category\":\"PremiumSkuComputeOptimized\",\"meterType\":\"nlu\",\"displayName\":\"krrfx\"},\"id\":\"ebtijvacvbmqzbqq\",\"name\":\"lajrnwxacevehj\",\"type\":\"uyxoaf\"},{\"location\":\"oqltfae\",\"properties\":{\"category\":\"PremiumSkuMemoryOptimized\",\"meterType\":\"fgvxirpghriypoqe\",\"displayName\":\"lqhykprlpyz\"},\"id\":\"ciqdsme\",\"name\":\"iitdfuxt\",\"type\":\"asiibmiybnnust\"},{\"location\":\"ljhnmgixhcmav\",\"properties\":{\"category\":\"PremiumSkuMemoryOptimized\",\"meterType\":\"dorhcgyyp\",\"displayName\":\"twypundmbxh\"},\"id\":\"cmjkavlgorbmftpm\",\"name\":\"tzfjltf\",\"type\":\"nzcyjtotp\"},{\"location\":\"pvpbdbzqgqqiheds\",\"properties\":{\"category\":\"PremiumSkuMemoryOptimized\",\"meterType\":\"mkyi\",\"displayName\":\"ysi\"},\"id\":\"gqcwdhohsdtmc\",\"name\":\"zsu\",\"type\":\"cohdx\"}]}") - .toObject(BillingMeterCollectionInner.class); - Assertions.assertEquals("o", model.value().get(0).location()); - Assertions.assertEquals(Category.PREMIUM_SKU_COMPUTE_OPTIMIZED, model.value().get(0).properties().category()); - Assertions.assertEquals("nlu", model.value().get(0).properties().meterType()); - Assertions.assertEquals("krrfx", model.value().get(0).properties().displayName()); - } - - @Test - public void testSerialize() { - BillingMeterCollectionInner model = - new BillingMeterCollectionInner() - .withValue( - Arrays - .asList( - new BillingMeter() - .withLocation("o") - .withProperties( - new BillingMeterProperties() - .withCategory(Category.PREMIUM_SKU_COMPUTE_OPTIMIZED) - .withMeterType("nlu") - .withDisplayName("krrfx")), - new BillingMeter() - .withLocation("oqltfae") - .withProperties( - new BillingMeterProperties() - .withCategory(Category.PREMIUM_SKU_MEMORY_OPTIMIZED) - .withMeterType("fgvxirpghriypoqe") - .withDisplayName("lqhykprlpyz")), - new BillingMeter() - .withLocation("ljhnmgixhcmav") - .withProperties( - new BillingMeterProperties() - .withCategory(Category.PREMIUM_SKU_MEMORY_OPTIMIZED) - .withMeterType("dorhcgyyp") - .withDisplayName("twypundmbxh")), - new BillingMeter() - .withLocation("pvpbdbzqgqqiheds") - .withProperties( - new BillingMeterProperties() - .withCategory(Category.PREMIUM_SKU_MEMORY_OPTIMIZED) - .withMeterType("mkyi") - .withDisplayName("ysi")))); - model = BinaryData.fromObject(model).toObject(BillingMeterCollectionInner.class); - Assertions.assertEquals("o", model.value().get(0).location()); - Assertions.assertEquals(Category.PREMIUM_SKU_COMPUTE_OPTIMIZED, model.value().get(0).properties().category()); - Assertions.assertEquals("nlu", model.value().get(0).properties().meterType()); - Assertions.assertEquals("krrfx", 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 1e151c8e438a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterPropertiesTests.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.BillingMeterProperties; -import com.azure.resourcemanager.appcontainers.models.Category; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BillingMeterPropertiesTests { - @Test - public void testDeserialize() { - BillingMeterProperties model = - BinaryData - .fromString( - "{\"category\":\"PremiumSkuGeneralPurpose\",\"meterType\":\"eqocljmygvk\",\"displayName\":\"kjjeokbz\"}") - .toObject(BillingMeterProperties.class); - Assertions.assertEquals(Category.PREMIUM_SKU_GENERAL_PURPOSE, model.category()); - Assertions.assertEquals("eqocljmygvk", model.meterType()); - Assertions.assertEquals("kjjeokbz", model.displayName()); - } - - @Test - public void testSerialize() { - BillingMeterProperties model = - new BillingMeterProperties() - .withCategory(Category.PREMIUM_SKU_GENERAL_PURPOSE) - .withMeterType("eqocljmygvk") - .withDisplayName("kjjeokbz"); - model = BinaryData.fromObject(model).toObject(BillingMeterProperties.class); - Assertions.assertEquals(Category.PREMIUM_SKU_GENERAL_PURPOSE, model.category()); - Assertions.assertEquals("eqocljmygvk", model.meterType()); - Assertions.assertEquals("kjjeokbz", 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 c35f18e825ce..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterTests.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.BillingMeter; -import com.azure.resourcemanager.appcontainers.models.BillingMeterProperties; -import com.azure.resourcemanager.appcontainers.models.Category; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class BillingMeterTests { - @Test - public void testDeserialize() { - BillingMeter model = - BinaryData - .fromString( - "{\"location\":\"lm\",\"properties\":{\"category\":\"PremiumSkuComputeOptimized\",\"meterType\":\"cvhd\",\"displayName\":\"v\"},\"id\":\"qxeysko\",\"name\":\"qzinkfkbg\",\"type\":\"z\"}") - .toObject(BillingMeter.class); - Assertions.assertEquals("lm", model.location()); - Assertions.assertEquals(Category.PREMIUM_SKU_COMPUTE_OPTIMIZED, model.properties().category()); - Assertions.assertEquals("cvhd", model.properties().meterType()); - Assertions.assertEquals("v", model.properties().displayName()); - } - - @Test - public void testSerialize() { - BillingMeter model = - new BillingMeter() - .withLocation("lm") - .withProperties( - new BillingMeterProperties() - .withCategory(Category.PREMIUM_SKU_COMPUTE_OPTIMIZED) - .withMeterType("cvhd") - .withDisplayName("v")); - model = BinaryData.fromObject(model).toObject(BillingMeter.class); - Assertions.assertEquals("lm", model.location()); - Assertions.assertEquals(Category.PREMIUM_SKU_COMPUTE_OPTIMIZED, model.properties().category()); - Assertions.assertEquals("cvhd", model.properties().meterType()); - Assertions.assertEquals("v", model.properties().displayName()); - } -} 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 11d95a597703..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatePatchTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CertificatePatchTests { - @Test - public void testDeserialize() { - CertificatePatch model = - BinaryData - .fromString( - "{\"tags\":{\"jc\":\"gkbugrjqct\",\"cuplcplcwkhih\":\"isofieypefojyqd\",\"cjhfgmvecactxmw\":\"hlhzdsqtzbsrgno\",\"ovekqvgqouwi\":\"teyowclu\"}}") - .toObject(CertificatePatch.class); - Assertions.assertEquals("gkbugrjqct", model.tags().get("jc")); - } - - @Test - public void testSerialize() { - CertificatePatch model = - new CertificatePatch() - .withTags( - mapOf( - "jc", - "gkbugrjqct", - "cuplcplcwkhih", - "isofieypefojyqd", - "cjhfgmvecactxmw", - "hlhzdsqtzbsrgno", - "ovekqvgqouwi", - "teyowclu")); - model = BinaryData.fromObject(model).toObject(CertificatePatch.class); - Assertions.assertEquals("gkbugrjqct", model.tags().get("jc")); - } - - @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/CheckNameAvailabilityRequestTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.java deleted file mode 100644 index 2f76d29ef3ea..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.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.CheckNameAvailabilityRequest; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CheckNameAvailabilityRequestTests { - @Test - public void testDeserialize() { - CheckNameAvailabilityRequest model = - BinaryData - .fromString("{\"name\":\"mpjw\",\"type\":\"vqikfxcvhrfsphu\"}") - .toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("mpjw", model.name()); - Assertions.assertEquals("vqikfxcvhrfsphu", model.type()); - } - - @Test - public void testSerialize() { - CheckNameAvailabilityRequest model = - new CheckNameAvailabilityRequest().withName("mpjw").withType("vqikfxcvhrfsphu"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("mpjw", model.name()); - Assertions.assertEquals("vqikfxcvhrfsphu", 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 5da5bcd5937f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityResponseInnerTests.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.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReason; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CheckNameAvailabilityResponseInnerTests { - @Test - public void testDeserialize() { - CheckNameAvailabilityResponseInner model = - BinaryData - .fromString("{\"nameAvailable\":true,\"reason\":\"AlreadyExists\",\"message\":\"kteusqczk\"}") - .toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, model.reason()); - Assertions.assertEquals("kteusqczk", model.message()); - } - - @Test - public void testSerialize() { - CheckNameAvailabilityResponseInner model = - new CheckNameAvailabilityResponseInner() - .withNameAvailable(true) - .withReason(CheckNameAvailabilityReason.ALREADY_EXISTS) - .withMessage("kteusqczk"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, model.reason()); - Assertions.assertEquals("kteusqczk", model.message()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ClientRegistrationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ClientRegistrationTests.java deleted file mode 100644 index fed359577d5c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ClientRegistrationTests.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.ClientRegistration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ClientRegistrationTests { - @Test - public void testDeserialize() { - ClientRegistration model = - BinaryData - .fromString("{\"clientId\":\"ocjjxhvpmouexh\",\"clientSecretSettingName\":\"xibqeojnx\"}") - .toObject(ClientRegistration.class); - Assertions.assertEquals("ocjjxhvpmouexh", model.clientId()); - Assertions.assertEquals("xibqeojnx", model.clientSecretSettingName()); - } - - @Test - public void testSerialize() { - ClientRegistration model = - new ClientRegistration().withClientId("ocjjxhvpmouexh").withClientSecretSettingName("xibqeojnx"); - model = BinaryData.fromObject(model).toObject(ClientRegistration.class); - Assertions.assertEquals("ocjjxhvpmouexh", model.clientId()); - Assertions.assertEquals("xibqeojnx", model.clientSecretSettingName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConfigurationTests.java deleted file mode 100644 index f8f5a94b6854..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConfigurationTests.java +++ /dev/null @@ -1,183 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Action; -import com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode; -import com.azure.resourcemanager.appcontainers.models.AppProtocol; -import com.azure.resourcemanager.appcontainers.models.BindingType; -import com.azure.resourcemanager.appcontainers.models.Configuration; -import com.azure.resourcemanager.appcontainers.models.CustomDomain; -import com.azure.resourcemanager.appcontainers.models.Dapr; -import com.azure.resourcemanager.appcontainers.models.Ingress; -import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; -import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; -import com.azure.resourcemanager.appcontainers.models.LogLevel; -import com.azure.resourcemanager.appcontainers.models.RegistryCredentials; -import com.azure.resourcemanager.appcontainers.models.Secret; -import com.azure.resourcemanager.appcontainers.models.TrafficWeight; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ConfigurationTests { - @Test - public void testDeserialize() { - Configuration model = - BinaryData - .fromString( - "{\"secrets\":[{\"name\":\"kn\",\"value\":\"scwsv\"},{\"name\":\"otogtwrupqs\",\"value\":\"nmic\"}],\"activeRevisionsMode\":\"Multiple\",\"ingress\":{\"fqdn\":\"o\",\"external\":false,\"targetPort\":2060505199,\"exposedPort\":1344905503,\"transport\":\"tcp\",\"traffic\":[{\"revisionName\":\"fcnj\",\"weight\":534363981,\"latestRevision\":false,\"label\":\"hbttkphyw\"}],\"customDomains\":[{\"name\":\"jtoqne\",\"bindingType\":\"Disabled\",\"certificateId\":\"lfplp\"},{\"name\":\"oxuscrpabgyepsbj\",\"bindingType\":\"Disabled\",\"certificateId\":\"qugxywpmueefjzwf\"},{\"name\":\"kqujidsuyono\",\"bindingType\":\"SniEnabled\",\"certificateId\":\"aocqxtccmgy\"},{\"name\":\"dxyt\",\"bindingType\":\"SniEnabled\",\"certificateId\":\"yrxvwfudwpznt\"}],\"allowInsecure\":false,\"ipSecurityRestrictions\":[{\"name\":\"lrqjbhckfr\",\"description\":\"rxsbkyvp\",\"ipAddressRange\":\"ca\",\"action\":\"Deny\"}]},\"registries\":[{\"server\":\"zka\",\"username\":\"uwbc\",\"passwordSecretRef\":\"wbme\",\"identity\":\"seyvj\"},{\"server\":\"rts\",\"username\":\"spkdee\",\"passwordSecretRef\":\"ofmxagkvtmelmqkr\",\"identity\":\"hvljuahaquh\"},{\"server\":\"hmdua\",\"username\":\"exq\",\"passwordSecretRef\":\"fadmws\",\"identity\":\"r\"}],\"dapr\":{\"enabled\":false,\"appId\":\"gomz\",\"appProtocol\":\"http\",\"appPort\":491284864,\"httpReadBufferSize\":838222488,\"httpMaxRequestSize\":1787960878,\"logLevel\":\"error\",\"enableApiLogging\":true},\"maxInactiveRevisions\":941784903}") - .toObject(Configuration.class); - Assertions.assertEquals("kn", model.secrets().get(0).name()); - Assertions.assertEquals("scwsv", model.secrets().get(0).value()); - Assertions.assertEquals(ActiveRevisionsMode.MULTIPLE, model.activeRevisionsMode()); - Assertions.assertEquals(false, model.ingress().external()); - Assertions.assertEquals(2060505199, model.ingress().targetPort()); - Assertions.assertEquals(1344905503, model.ingress().exposedPort()); - Assertions.assertEquals(IngressTransportMethod.TCP, model.ingress().transport()); - Assertions.assertEquals("fcnj", model.ingress().traffic().get(0).revisionName()); - Assertions.assertEquals(534363981, model.ingress().traffic().get(0).weight()); - Assertions.assertEquals(false, model.ingress().traffic().get(0).latestRevision()); - Assertions.assertEquals("hbttkphyw", model.ingress().traffic().get(0).label()); - Assertions.assertEquals("jtoqne", model.ingress().customDomains().get(0).name()); - Assertions.assertEquals(BindingType.DISABLED, model.ingress().customDomains().get(0).bindingType()); - Assertions.assertEquals("lfplp", model.ingress().customDomains().get(0).certificateId()); - Assertions.assertEquals(false, model.ingress().allowInsecure()); - Assertions.assertEquals("lrqjbhckfr", model.ingress().ipSecurityRestrictions().get(0).name()); - Assertions.assertEquals("rxsbkyvp", model.ingress().ipSecurityRestrictions().get(0).description()); - Assertions.assertEquals("ca", model.ingress().ipSecurityRestrictions().get(0).ipAddressRange()); - Assertions.assertEquals(Action.DENY, model.ingress().ipSecurityRestrictions().get(0).action()); - Assertions.assertEquals("zka", model.registries().get(0).server()); - Assertions.assertEquals("uwbc", model.registries().get(0).username()); - Assertions.assertEquals("wbme", model.registries().get(0).passwordSecretRef()); - Assertions.assertEquals("seyvj", model.registries().get(0).identity()); - Assertions.assertEquals(false, model.dapr().enabled()); - Assertions.assertEquals("gomz", model.dapr().appId()); - Assertions.assertEquals(AppProtocol.HTTP, model.dapr().appProtocol()); - Assertions.assertEquals(491284864, model.dapr().appPort()); - Assertions.assertEquals(838222488, model.dapr().httpReadBufferSize()); - Assertions.assertEquals(1787960878, model.dapr().httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.ERROR, model.dapr().logLevel()); - Assertions.assertEquals(true, model.dapr().enableApiLogging()); - Assertions.assertEquals(941784903, model.maxInactiveRevisions()); - } - - @Test - public void testSerialize() { - Configuration model = - new Configuration() - .withSecrets( - Arrays - .asList( - new Secret().withName("kn").withValue("scwsv"), - new Secret().withName("otogtwrupqs").withValue("nmic"))) - .withActiveRevisionsMode(ActiveRevisionsMode.MULTIPLE) - .withIngress( - new Ingress() - .withExternal(false) - .withTargetPort(2060505199) - .withExposedPort(1344905503) - .withTransport(IngressTransportMethod.TCP) - .withTraffic( - Arrays - .asList( - new TrafficWeight() - .withRevisionName("fcnj") - .withWeight(534363981) - .withLatestRevision(false) - .withLabel("hbttkphyw"))) - .withCustomDomains( - Arrays - .asList( - new CustomDomain() - .withName("jtoqne") - .withBindingType(BindingType.DISABLED) - .withCertificateId("lfplp"), - new CustomDomain() - .withName("oxuscrpabgyepsbj") - .withBindingType(BindingType.DISABLED) - .withCertificateId("qugxywpmueefjzwf"), - new CustomDomain() - .withName("kqujidsuyono") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId("aocqxtccmgy"), - new CustomDomain() - .withName("dxyt") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId("yrxvwfudwpznt"))) - .withAllowInsecure(false) - .withIpSecurityRestrictions( - Arrays - .asList( - new IpSecurityRestrictionRule() - .withName("lrqjbhckfr") - .withDescription("rxsbkyvp") - .withIpAddressRange("ca") - .withAction(Action.DENY)))) - .withRegistries( - Arrays - .asList( - new RegistryCredentials() - .withServer("zka") - .withUsername("uwbc") - .withPasswordSecretRef("wbme") - .withIdentity("seyvj"), - new RegistryCredentials() - .withServer("rts") - .withUsername("spkdee") - .withPasswordSecretRef("ofmxagkvtmelmqkr") - .withIdentity("hvljuahaquh"), - new RegistryCredentials() - .withServer("hmdua") - .withUsername("exq") - .withPasswordSecretRef("fadmws") - .withIdentity("r"))) - .withDapr( - new Dapr() - .withEnabled(false) - .withAppId("gomz") - .withAppProtocol(AppProtocol.HTTP) - .withAppPort(491284864) - .withHttpReadBufferSize(838222488) - .withHttpMaxRequestSize(1787960878) - .withLogLevel(LogLevel.ERROR) - .withEnableApiLogging(true)) - .withMaxInactiveRevisions(941784903); - model = BinaryData.fromObject(model).toObject(Configuration.class); - Assertions.assertEquals("kn", model.secrets().get(0).name()); - Assertions.assertEquals("scwsv", model.secrets().get(0).value()); - Assertions.assertEquals(ActiveRevisionsMode.MULTIPLE, model.activeRevisionsMode()); - Assertions.assertEquals(false, model.ingress().external()); - Assertions.assertEquals(2060505199, model.ingress().targetPort()); - Assertions.assertEquals(1344905503, model.ingress().exposedPort()); - Assertions.assertEquals(IngressTransportMethod.TCP, model.ingress().transport()); - Assertions.assertEquals("fcnj", model.ingress().traffic().get(0).revisionName()); - Assertions.assertEquals(534363981, model.ingress().traffic().get(0).weight()); - Assertions.assertEquals(false, model.ingress().traffic().get(0).latestRevision()); - Assertions.assertEquals("hbttkphyw", model.ingress().traffic().get(0).label()); - Assertions.assertEquals("jtoqne", model.ingress().customDomains().get(0).name()); - Assertions.assertEquals(BindingType.DISABLED, model.ingress().customDomains().get(0).bindingType()); - Assertions.assertEquals("lfplp", model.ingress().customDomains().get(0).certificateId()); - Assertions.assertEquals(false, model.ingress().allowInsecure()); - Assertions.assertEquals("lrqjbhckfr", model.ingress().ipSecurityRestrictions().get(0).name()); - Assertions.assertEquals("rxsbkyvp", model.ingress().ipSecurityRestrictions().get(0).description()); - Assertions.assertEquals("ca", model.ingress().ipSecurityRestrictions().get(0).ipAddressRange()); - Assertions.assertEquals(Action.DENY, model.ingress().ipSecurityRestrictions().get(0).action()); - Assertions.assertEquals("zka", model.registries().get(0).server()); - Assertions.assertEquals("uwbc", model.registries().get(0).username()); - Assertions.assertEquals("wbme", model.registries().get(0).passwordSecretRef()); - Assertions.assertEquals("seyvj", model.registries().get(0).identity()); - Assertions.assertEquals(false, model.dapr().enabled()); - Assertions.assertEquals("gomz", model.dapr().appId()); - Assertions.assertEquals(AppProtocol.HTTP, model.dapr().appProtocol()); - Assertions.assertEquals(491284864, model.dapr().appPort()); - Assertions.assertEquals(838222488, model.dapr().httpReadBufferSize()); - Assertions.assertEquals(1787960878, model.dapr().httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.ERROR, model.dapr().logLevel()); - Assertions.assertEquals(true, model.dapr().enableApiLogging()); - Assertions.assertEquals(941784903, model.maxInactiveRevisions()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentCollectionTests.java deleted file mode 100644 index 511f3f22c608..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentCollectionTests.java +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentCollection; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ConnectedEnvironmentCollectionTests { - @Test - public void testDeserialize() { - ConnectedEnvironmentCollection model = - BinaryData - .fromString( - "{\"value\":[{\"extendedLocation\":{\"name\":\"rtujwsawddjibab\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"InfrastructureSetupComplete\",\"deploymentErrors\":\"tzeexav\",\"defaultDomain\":\"tfgle\",\"staticIp\":\"m\",\"daprAIConnectionString\":\"bwpypqtgsfjacb\"},\"location\":\"hxudbxvodht\",\"tags\":{\"agzrcxfa\":\"rudhzmmesckdl\",\"xwmdboxd\":\"lc\"},\"id\":\"gsftufqobrjlnacg\",\"name\":\"ckknhxkizvy\",\"type\":\"nrzvuljraaer\"},{\"extendedLocation\":{\"name\":\"kqg\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"InitializationInProgress\",\"deploymentErrors\":\"broyla\",\"defaultDomain\":\"ulcdisdosf\",\"staticIp\":\"jsvg\",\"daprAIConnectionString\":\"whryvycytdcl\"},\"location\":\"cknfnwmbtmvpd\",\"tags\":{\"efedxihchrphkm\":\"httz\",\"gtgkylkdghr\":\"rjdqnsdfzp\",\"kvbwnhhtqlgeh\":\"euutlwxezwzh\",\"vgcxtx\":\"ppipifhpfeoa\"},\"id\":\"csheafidltugsr\",\"name\":\"smkss\",\"type\":\"h\"},{\"extendedLocation\":{\"name\":\"txfkfweg\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"Failed\",\"deploymentErrors\":\"lucbiqtgdqohm\",\"defaultDomain\":\"sldrizetpwbral\",\"staticIp\":\"ibph\",\"daprAIConnectionString\":\"zmizakakan\"},\"location\":\"dnjzh\",\"tags\":{\"oyxprimr\":\"ylhjlm\",\"eislstvasylwx\":\"opteecj\",\"eoohguufuzboyj\":\"zaum\",\"a\":\"thwtzol\"},\"id\":\"mwmdxmebwjscjpa\",\"name\":\"lxveabfqx\",\"type\":\"mwmqtibx\"}],\"nextLink\":\"jddtvqct\"}") - .toObject(ConnectedEnvironmentCollection.class); - Assertions.assertEquals("hxudbxvodht", model.value().get(0).location()); - Assertions.assertEquals("rudhzmmesckdl", model.value().get(0).tags().get("agzrcxfa")); - Assertions.assertEquals("rtujwsawddjibab", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("m", model.value().get(0).staticIp()); - Assertions.assertEquals("bwpypqtgsfjacb", model.value().get(0).daprAIConnectionString()); - } - - @Test - public void testSerialize() { - ConnectedEnvironmentCollection model = - new ConnectedEnvironmentCollection() - .withValue( - Arrays - .asList( - new ConnectedEnvironmentInner() - .withLocation("hxudbxvodht") - .withTags(mapOf("agzrcxfa", "rudhzmmesckdl", "xwmdboxd", "lc")) - .withExtendedLocation( - new ExtendedLocation() - .withName("rtujwsawddjibab") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withStaticIp("m") - .withDaprAIConnectionString("bwpypqtgsfjacb"), - new ConnectedEnvironmentInner() - .withLocation("cknfnwmbtmvpd") - .withTags( - mapOf( - "efedxihchrphkm", - "httz", - "gtgkylkdghr", - "rjdqnsdfzp", - "kvbwnhhtqlgeh", - "euutlwxezwzh", - "vgcxtx", - "ppipifhpfeoa")) - .withExtendedLocation( - new ExtendedLocation() - .withName("kqg") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withStaticIp("jsvg") - .withDaprAIConnectionString("whryvycytdcl"), - new ConnectedEnvironmentInner() - .withLocation("dnjzh") - .withTags( - mapOf( - "oyxprimr", - "ylhjlm", - "eislstvasylwx", - "opteecj", - "eoohguufuzboyj", - "zaum", - "a", - "thwtzol")) - .withExtendedLocation( - new ExtendedLocation() - .withName("txfkfweg") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withStaticIp("ibph") - .withDaprAIConnectionString("zmizakakan"))); - model = BinaryData.fromObject(model).toObject(ConnectedEnvironmentCollection.class); - Assertions.assertEquals("hxudbxvodht", model.value().get(0).location()); - Assertions.assertEquals("rudhzmmesckdl", model.value().get(0).tags().get("agzrcxfa")); - Assertions.assertEquals("rtujwsawddjibab", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.value().get(0).extendedLocation().type()); - Assertions.assertEquals("m", model.value().get(0).staticIp()); - Assertions.assertEquals("bwpypqtgsfjacb", model.value().get(0).daprAIConnectionString()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentInnerTests.java deleted file mode 100644 index 7c98ab325595..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentInnerTests.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.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner; -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ConnectedEnvironmentInnerTests { - @Test - public void testDeserialize() { - ConnectedEnvironmentInner model = - BinaryData - .fromString( - "{\"extendedLocation\":{\"name\":\"ijaeukm\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"Failed\",\"deploymentErrors\":\"ndzaapmudq\",\"defaultDomain\":\"qwigpibudqwyxe\",\"staticIp\":\"ybpmzznrtffyaq\",\"daprAIConnectionString\":\"mhh\",\"customDomainConfiguration\":{\"customDomainVerificationId\":\"qaqhvseufu\",\"dnsSuffix\":\"rxpdlcgqlsi\",\"expirationDate\":\"2021-05-24T18:35:38Z\",\"thumbprint\":\"ddgamquhiosr\",\"subjectName\":\"uivfcdis\"}},\"location\":\"rnxzh\",\"tags\":{\"qvwre\":\"xrxzbujrtr\",\"nzonzl\":\"khgn\",\"jtszcof\":\"piqywnc\",\"k\":\"zehtdhgb\"},\"id\":\"reljeamur\",\"name\":\"zmlovuanash\",\"type\":\"xlpm\"}") - .toObject(ConnectedEnvironmentInner.class); - Assertions.assertEquals("rnxzh", model.location()); - Assertions.assertEquals("xrxzbujrtr", model.tags().get("qvwre")); - Assertions.assertEquals("ijaeukm", model.extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.extendedLocation().type()); - Assertions.assertEquals("ybpmzznrtffyaq", model.staticIp()); - Assertions.assertEquals("mhh", model.daprAIConnectionString()); - Assertions.assertEquals("rxpdlcgqlsi", model.customDomainConfiguration().dnsSuffix()); - } - - @Test - public void testSerialize() { - ConnectedEnvironmentInner model = - new ConnectedEnvironmentInner() - .withLocation("rnxzh") - .withTags(mapOf("qvwre", "xrxzbujrtr", "nzonzl", "khgn", "jtszcof", "piqywnc", "k", "zehtdhgb")) - .withExtendedLocation( - new ExtendedLocation().withName("ijaeukm").withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withStaticIp("ybpmzznrtffyaq") - .withDaprAIConnectionString("mhh") - .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("rxpdlcgqlsi")); - model = BinaryData.fromObject(model).toObject(ConnectedEnvironmentInner.class); - Assertions.assertEquals("rnxzh", model.location()); - Assertions.assertEquals("xrxzbujrtr", model.tags().get("qvwre")); - Assertions.assertEquals("ijaeukm", model.extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.extendedLocation().type()); - Assertions.assertEquals("ybpmzznrtffyaq", model.staticIp()); - Assertions.assertEquals("mhh", model.daprAIConnectionString()); - Assertions.assertEquals("rxpdlcgqlsi", model.customDomainConfiguration().dnsSuffix()); - } - - @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/ConnectedEnvironmentPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentPropertiesTests.java deleted file mode 100644 index 1dcf7976eed2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentPropertiesTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentProperties; -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ConnectedEnvironmentPropertiesTests { - @Test - public void testDeserialize() { - ConnectedEnvironmentProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"InfrastructureSetupInProgress\",\"deploymentErrors\":\"dk\",\"defaultDomain\":\"vidizozsdb\",\"staticIp\":\"xjmonf\",\"daprAIConnectionString\":\"nwncypuuw\",\"customDomainConfiguration\":{\"customDomainVerificationId\":\"v\",\"dnsSuffix\":\"jctzenkei\",\"expirationDate\":\"2021-11-19T10:45:07Z\",\"thumbprint\":\"dasvfl\",\"subjectName\":\"bxcudchx\"}}") - .toObject(ConnectedEnvironmentProperties.class); - Assertions.assertEquals("xjmonf", model.staticIp()); - Assertions.assertEquals("nwncypuuw", model.daprAIConnectionString()); - Assertions.assertEquals("jctzenkei", model.customDomainConfiguration().dnsSuffix()); - } - - @Test - public void testSerialize() { - ConnectedEnvironmentProperties model = - new ConnectedEnvironmentProperties() - .withStaticIp("xjmonf") - .withDaprAIConnectionString("nwncypuuw") - .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("jctzenkei")); - model = BinaryData.fromObject(model).toObject(ConnectedEnvironmentProperties.class); - Assertions.assertEquals("xjmonf", model.staticIp()); - Assertions.assertEquals("nwncypuuw", model.daprAIConnectionString()); - Assertions.assertEquals("jctzenkei", model.customDomainConfiguration().dnsSuffix()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentStoragesCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentStoragesCollectionInnerTests.java deleted file mode 100644 index 77b5f9f5f58d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentStoragesCollectionInnerTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorageProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - -public final class ConnectedEnvironmentStoragesCollectionInnerTests { - @Test - public void testDeserialize() { - ConnectedEnvironmentStoragesCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{},\"id\":\"ldforobwj\",\"name\":\"vizbfhfo\",\"type\":\"vacqpbtuodxesz\"},{\"properties\":{},\"id\":\"l\",\"name\":\"wumuaslzk\",\"type\":\"rrwoycqucwyhahn\"},{\"properties\":{},\"id\":\"kywuhpsvfuu\",\"name\":\"utlwexxwla\",\"type\":\"niexzsrzpgepq\"}]}") - .toObject(ConnectedEnvironmentStoragesCollectionInner.class); - } - - @Test - public void testSerialize() { - ConnectedEnvironmentStoragesCollectionInner model = - new ConnectedEnvironmentStoragesCollectionInner() - .withValue( - Arrays - .asList( - new ConnectedEnvironmentStorageInner() - .withProperties(new ConnectedEnvironmentStorageProperties()), - new ConnectedEnvironmentStorageInner() - .withProperties(new ConnectedEnvironmentStorageProperties()), - new ConnectedEnvironmentStorageInner() - .withProperties(new ConnectedEnvironmentStorageProperties()))); - model = BinaryData.fromObject(model).toObject(ConnectedEnvironmentStoragesCollectionInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateMockTests.java deleted file mode 100644 index 1ae6489b0f96..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.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.ConnectedEnvironment; -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -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 ConnectedEnvironmentsCreateOrUpdateMockTests { - @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 = - "{\"extendedLocation\":{\"name\":\"suckzm\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"Succeeded\",\"deploymentErrors\":\"xaxmq\",\"defaultDomain\":\"alhhjnhgwydyynfs\",\"staticIp\":\"hgbvqtan\",\"daprAIConnectionString\":\"fdlpukhpyr\",\"customDomainConfiguration\":{\"customDomainVerificationId\":\"zjcpeogk\",\"dnsSuffix\":\"mgbro\",\"expirationDate\":\"2021-08-20T12:22:55Z\",\"thumbprint\":\"fhp\",\"subjectName\":\"azjzo\"}},\"location\":\"jxhpdulontacn\",\"tags\":{\"xh\":\"tehtuevrhrljyoog\"},\"id\":\"sd\",\"name\":\"ugwbsreurfqkf\",\"type\":\"arenlvhhtklnvnaf\"}"; - - 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)); - - ConnectedEnvironment response = - manager - .connectedEnvironments() - .define("usqogsfikayia") - .withRegion("chrszi") - .withExistingResourceGroup("ijtk") - .withTags(mapOf("fqyggagflnlgmtr", "uelyetndn")) - .withExtendedLocation( - new ExtendedLocation().withName("arujt").withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withStaticIp("bqeqqekewvnqvcd") - .withDaprAIConnectionString("uaucmf") - .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("itacgxmfcsserx")) - .create(); - - Assertions.assertEquals("jxhpdulontacn", response.location()); - Assertions.assertEquals("tehtuevrhrljyoog", response.tags().get("xh")); - Assertions.assertEquals("suckzm", response.extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, response.extendedLocation().type()); - Assertions.assertEquals("hgbvqtan", response.staticIp()); - Assertions.assertEquals("fdlpukhpyr", response.daprAIConnectionString()); - Assertions.assertEquals("mgbro", response.customDomainConfiguration().dnsSuffix()); - } - - @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/ConnectedEnvironmentsDaprComponentsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListMockTests.java deleted file mode 100644 index 352da9aeea5d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListMockTests.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.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprComponent; -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 ConnectedEnvironmentsDaprComponentsListMockTests { - @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\":\"rymo\",\"version\":\"zrxklobd\",\"ignoreErrors\":true,\"initTimeout\":\"pmkmlmvevfx\",\"secrets\":[],\"secretStoreComponent\":\"hbzxli\",\"metadata\":[],\"scopes\":[\"dtfgxqbawpcbb\"]},\"id\":\"qcy\",\"name\":\"napqo\",\"type\":\"yuicdhzbdy\"}]}"; - - 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.connectedEnvironmentsDaprComponents().list("vroevytlyo", "rrrouuxvnsa", Context.NONE); - - Assertions.assertEquals("rymo", response.iterator().next().componentType()); - Assertions.assertEquals("zrxklobd", response.iterator().next().version()); - Assertions.assertEquals(true, response.iterator().next().ignoreErrors()); - Assertions.assertEquals("pmkmlmvevfx", response.iterator().next().initTimeout()); - Assertions.assertEquals("hbzxli", response.iterator().next().secretStoreComponent()); - Assertions.assertEquals("dtfgxqbawpcbb", response.iterator().next().scopes().get(0)); - } -} 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 9d10d4deec7c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteMockTests.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.core.util.Context; -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("djk", "sysidfvclglxnf", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupMockTests.java deleted file mode 100644 index b4ae858aa596..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironment; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -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 ConnectedEnvironmentsListByResourceGroupMockTests { - @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\":[{\"extendedLocation\":{\"name\":\"pusxjb\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"Failed\",\"deploymentErrors\":\"ohzjqatucoigeb\",\"defaultDomain\":\"cnwfepbnwgfmxjg\",\"staticIp\":\"bjb\",\"daprAIConnectionString\":\"lfgtdysnaquflqbc\",\"customDomainConfiguration\":{\"customDomainVerificationId\":\"amz\",\"dnsSuffix\":\"wdkqzeqy\",\"expirationDate\":\"2021-03-27T03:11:25Z\",\"thumbprint\":\"njxdfzantk\",\"subjectName\":\"eg\"}},\"location\":\"mlbnseq\",\"tags\":{\"m\":\"jvpilguooqja\",\"hrtdtpdelq\":\"itgueiookjbs\",\"vcjkgd\":\"cslmotoebnfxo\",\"vcopex\":\"razftxejwabmdujt\"},\"id\":\"m\",\"name\":\"urbuhhlkyqltq\",\"type\":\"rogtuwkf\"}]}"; - - 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.connectedEnvironments().listByResourceGroup("cbuewmrswnjlxuz", Context.NONE); - - Assertions.assertEquals("mlbnseq", response.iterator().next().location()); - Assertions.assertEquals("jvpilguooqja", response.iterator().next().tags().get("m")); - Assertions.assertEquals("pusxjb", response.iterator().next().extendedLocation().name()); - Assertions - .assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("bjb", response.iterator().next().staticIp()); - Assertions.assertEquals("lfgtdysnaquflqbc", response.iterator().next().daprAIConnectionString()); - Assertions.assertEquals("wdkqzeqy", response.iterator().next().customDomainConfiguration().dnsSuffix()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListMockTests.java deleted file mode 100644 index 9b849fecf348..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListMockTests.java +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights 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.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironment; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -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 ConnectedEnvironmentsListMockTests { - @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\":[{\"extendedLocation\":{\"name\":\"wpnulaiywzejyw\",\"type\":\"CustomLocation\"},\"properties\":{\"provisioningState\":\"ScheduledForDelete\",\"deploymentErrors\":\"pllndnp\",\"defaultDomain\":\"rpqaf\",\"staticIp\":\"ug\",\"daprAIConnectionString\":\"n\",\"customDomainConfiguration\":{\"customDomainVerificationId\":\"et\",\"dnsSuffix\":\"ypococtfjgtixr\",\"expirationDate\":\"2021-06-13T22:05:20Z\",\"thumbprint\":\"urmlmuo\",\"subjectName\":\"lbau\"}},\"location\":\"opionszon\",\"tags\":{\"jmyccxlzhcoxov\":\"gajinnixjawrtmj\",\"sfnrdtjxt\":\"ekhenl\",\"cq\":\"r\",\"uslvyjtcvuwkasi\":\"jvidttge\"},\"id\":\"iesfuug\",\"name\":\"tuqfecjxeygtu\",\"type\":\"xu\"}]}"; - - 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.connectedEnvironments().list(Context.NONE); - - Assertions.assertEquals("opionszon", response.iterator().next().location()); - Assertions.assertEquals("gajinnixjawrtmj", response.iterator().next().tags().get("jmyccxlzhcoxov")); - Assertions.assertEquals("wpnulaiywzejyw", response.iterator().next().extendedLocation().name()); - Assertions - .assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, response.iterator().next().extendedLocation().type()); - Assertions.assertEquals("ug", response.iterator().next().staticIp()); - Assertions.assertEquals("n", response.iterator().next().daprAIConnectionString()); - Assertions.assertEquals("ypococtfjgtixr", response.iterator().next().customDomainConfiguration().dnsSuffix()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppCollectionTests.java deleted file mode 100644 index 57d5fded6438..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppCollectionTests.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.ContainerAppInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppCollection; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerAppCollectionTests { - @Test - public void testDeserialize() { - ContainerAppCollection model = - BinaryData - .fromString( - "{\"value\":[{\"extendedLocation\":{\"name\":\"ybcibvyvdcsit\",\"type\":\"CustomLocation\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"provisioningState\":\"Canceled\",\"managedEnvironmentId\":\"f\",\"environmentId\":\"scjeypv\",\"workloadProfileType\":\"zrkgqhcjrefovg\",\"latestRevisionName\":\"qsl\",\"latestRevisionFqdn\":\"yvxyqjp\",\"customDomainVerificationId\":\"attpngjcrcczsq\",\"outboundIpAddresses\":[],\"eventStreamEndpoint\":\"daj\"},\"location\":\"ysou\",\"tags\":{\"yhltrpmopjmcm\":\"canoaeupf\"},\"id\":\"tuo\",\"name\":\"thfuiuaodsfcpkvx\",\"type\":\"dpuozmyz\"},{\"extendedLocation\":{\"name\":\"gf\",\"type\":\"CustomLocation\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"provisioningState\":\"Deleting\",\"managedEnvironmentId\":\"twhrdxwzywqsm\",\"environmentId\":\"ureximoryocfs\",\"workloadProfileType\":\"s\",\"latestRevisionName\":\"ddystkiiuxhqy\",\"latestRevisionFqdn\":\"xorrqnb\",\"customDomainVerificationId\":\"czvyifq\",\"outboundIpAddresses\":[],\"eventStreamEndpoint\":\"jsllrmv\"},\"location\":\"f\",\"tags\":{\"wiqzbqjvsovmyo\":\"kpnpulexxbczwtr\"},\"id\":\"acspkwl\",\"name\":\"zdobpxjmflbvvnch\",\"type\":\"kcciwwzjuqkhr\"},{\"extendedLocation\":{\"name\":\"iwkuofos\",\"type\":\"CustomLocation\"},\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"provisioningState\":\"InProgress\",\"managedEnvironmentId\":\"xieduugidyjrr\",\"environmentId\":\"y\",\"workloadProfileType\":\"svexcsonpclhoco\",\"latestRevisionName\":\"lkevle\",\"latestRevisionFqdn\":\"zfbuhf\",\"customDomainVerificationId\":\"faxkffeii\",\"outboundIpAddresses\":[],\"eventStreamEndpoint\":\"ez\"},\"location\":\"shxmzsbbzoggigrx\",\"tags\":{\"jnspydp\":\"rvjx\"},\"id\":\"koen\",\"name\":\"ou\",\"type\":\"nvudwtiukb\"}],\"nextLink\":\"ngkpocipazy\"}") - .toObject(ContainerAppCollection.class); - Assertions.assertEquals("ysou", model.value().get(0).location()); - Assertions.assertEquals("canoaeupf", model.value().get(0).tags().get("yhltrpmopjmcm")); - Assertions.assertEquals("ybcibvyvdcsit", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.value().get(0).extendedLocation().type()); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("f", model.value().get(0).managedEnvironmentId()); - Assertions.assertEquals("scjeypv", model.value().get(0).environmentId()); - Assertions.assertEquals("zrkgqhcjrefovg", model.value().get(0).workloadProfileType()); - } - - @Test - public void testSerialize() { - ContainerAppCollection model = - new ContainerAppCollection() - .withValue( - Arrays - .asList( - new ContainerAppInner() - .withLocation("ysou") - .withTags(mapOf("yhltrpmopjmcm", "canoaeupf")) - .withExtendedLocation( - new ExtendedLocation() - .withName("ybcibvyvdcsit") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withManagedEnvironmentId("f") - .withEnvironmentId("scjeypv") - .withWorkloadProfileType("zrkgqhcjrefovg"), - new ContainerAppInner() - .withLocation("f") - .withTags(mapOf("wiqzbqjvsovmyo", "kpnpulexxbczwtr")) - .withExtendedLocation( - new ExtendedLocation() - .withName("gf") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withManagedEnvironmentId("twhrdxwzywqsm") - .withEnvironmentId("ureximoryocfs") - .withWorkloadProfileType("s"), - new ContainerAppInner() - .withLocation("shxmzsbbzoggigrx") - .withTags(mapOf("jnspydp", "rvjx")) - .withExtendedLocation( - new ExtendedLocation() - .withName("iwkuofos") - .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf())) - .withManagedEnvironmentId("xieduugidyjrr") - .withEnvironmentId("y") - .withWorkloadProfileType("svexcsonpclhoco"))); - model = BinaryData.fromObject(model).toObject(ContainerAppCollection.class); - Assertions.assertEquals("ysou", model.value().get(0).location()); - Assertions.assertEquals("canoaeupf", model.value().get(0).tags().get("yhltrpmopjmcm")); - Assertions.assertEquals("ybcibvyvdcsit", model.value().get(0).extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.value().get(0).extendedLocation().type()); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.value().get(0).identity().type()); - Assertions.assertEquals("f", model.value().get(0).managedEnvironmentId()); - Assertions.assertEquals("scjeypv", model.value().get(0).environmentId()); - Assertions.assertEquals("zrkgqhcjrefovg", model.value().get(0).workloadProfileType()); - } - - @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/ContainerAppInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppInnerTests.java deleted file mode 100644 index 09fb61485df1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppInnerTests.java +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; -import com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode; -import com.azure.resourcemanager.appcontainers.models.Configuration; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.Template; -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; -import org.junit.jupiter.api.Test; - -public final class ContainerAppInnerTests { - @Test - public void testDeserialize() { - ContainerAppInner model = - BinaryData - .fromString( - "{\"extendedLocation\":{\"name\":\"gukgjnpiucgygevq\",\"type\":\"CustomLocation\"},\"identity\":{\"type\":\"SystemAssigned\",\"userAssignedIdentities\":{\"c\":{}}},\"properties\":{\"provisioningState\":\"Failed\",\"managedEnvironmentId\":\"dpydn\",\"environmentId\":\"hxdeoejz\",\"workloadProfileType\":\"w\",\"latestRevisionName\":\"sjttgzfbish\",\"latestRevisionFqdn\":\"khaj\",\"customDomainVerificationId\":\"yeamdphagalpb\",\"configuration\":{\"secrets\":[],\"activeRevisionsMode\":\"Single\",\"registries\":[],\"maxInactiveRevisions\":1833977837},\"template\":{\"revisionSuffix\":\"shwankixzbinje\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"outboundIpAddresses\":[\"zoqftiyqzrnkcqvy\",\"lwh\"],\"eventStreamEndpoint\":\"sicohoqqnwvlry\"},\"location\":\"w\",\"tags\":{\"gyxzk\":\"unmmq\"},\"id\":\"noc\",\"name\":\"koklya\",\"type\":\"uconuqszfkbey\"}") - .toObject(ContainerAppInner.class); - Assertions.assertEquals("w", model.location()); - Assertions.assertEquals("unmmq", model.tags().get("gyxzk")); - Assertions.assertEquals("gukgjnpiucgygevq", model.extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.extendedLocation().type()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("dpydn", model.managedEnvironmentId()); - Assertions.assertEquals("hxdeoejz", model.environmentId()); - Assertions.assertEquals("w", model.workloadProfileType()); - Assertions.assertEquals(ActiveRevisionsMode.SINGLE, model.configuration().activeRevisionsMode()); - Assertions.assertEquals(1833977837, model.configuration().maxInactiveRevisions()); - Assertions.assertEquals("shwankixzbinje", model.template().revisionSuffix()); - } - - @Test - public void testSerialize() { - ContainerAppInner model = - new ContainerAppInner() - .withLocation("w") - .withTags(mapOf("gyxzk", "unmmq")) - .withExtendedLocation( - new ExtendedLocation().withName("gukgjnpiucgygevq").withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED) - .withUserAssignedIdentities(mapOf("c", new UserAssignedIdentity()))) - .withManagedEnvironmentId("dpydn") - .withEnvironmentId("hxdeoejz") - .withWorkloadProfileType("w") - .withConfiguration( - new Configuration() - .withSecrets(Arrays.asList()) - .withActiveRevisionsMode(ActiveRevisionsMode.SINGLE) - .withRegistries(Arrays.asList()) - .withMaxInactiveRevisions(1833977837)) - .withTemplate( - new Template() - .withRevisionSuffix("shwankixzbinje") - .withInitContainers(Arrays.asList()) - .withContainers(Arrays.asList()) - .withVolumes(Arrays.asList())); - model = BinaryData.fromObject(model).toObject(ContainerAppInner.class); - Assertions.assertEquals("w", model.location()); - Assertions.assertEquals("unmmq", model.tags().get("gyxzk")); - Assertions.assertEquals("gukgjnpiucgygevq", model.extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.extendedLocation().type()); - Assertions.assertEquals(ManagedServiceIdentityType.SYSTEM_ASSIGNED, model.identity().type()); - Assertions.assertEquals("dpydn", model.managedEnvironmentId()); - Assertions.assertEquals("hxdeoejz", model.environmentId()); - Assertions.assertEquals("w", model.workloadProfileType()); - Assertions.assertEquals(ActiveRevisionsMode.SINGLE, model.configuration().activeRevisionsMode()); - Assertions.assertEquals(1833977837, model.configuration().maxInactiveRevisions()); - Assertions.assertEquals("shwankixzbinje", model.template().revisionSuffix()); - } - - @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/ContainerAppProbeHttpGetHttpHeadersItemTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetHttpHeadersItemTests.java deleted file mode 100644 index 7a49f669c8f2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetHttpHeadersItemTests.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.ContainerAppProbeHttpGetHttpHeadersItem; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerAppProbeHttpGetHttpHeadersItemTests { - @Test - public void testDeserialize() { - ContainerAppProbeHttpGetHttpHeadersItem model = - BinaryData - .fromString("{\"name\":\"fcktqumiekke\",\"value\":\"zikhl\"}") - .toObject(ContainerAppProbeHttpGetHttpHeadersItem.class); - Assertions.assertEquals("fcktqumiekke", model.name()); - Assertions.assertEquals("zikhl", model.value()); - } - - @Test - public void testSerialize() { - ContainerAppProbeHttpGetHttpHeadersItem model = - new ContainerAppProbeHttpGetHttpHeadersItem().withName("fcktqumiekke").withValue("zikhl"); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeHttpGetHttpHeadersItem.class); - Assertions.assertEquals("fcktqumiekke", model.name()); - Assertions.assertEquals("zikhl", 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 e24fca86a780..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.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; -import org.junit.jupiter.api.Test; - -public final class ContainerAppProbeHttpGetTests { - @Test - public void testDeserialize() { - ContainerAppProbeHttpGet model = - BinaryData - .fromString( - "{\"host\":\"jawneaiv\",\"httpHeaders\":[{\"name\":\"zel\",\"value\":\"c\"},{\"name\":\"r\",\"value\":\"lsfeaenwabfatkld\"},{\"name\":\"xbjhwuaanozjosph\",\"value\":\"oulpjrv\"}],\"path\":\"glrvimjwosytxi\",\"port\":1413257471,\"scheme\":\"HTTP\"}") - .toObject(ContainerAppProbeHttpGet.class); - Assertions.assertEquals("jawneaiv", model.host()); - Assertions.assertEquals("zel", model.httpHeaders().get(0).name()); - Assertions.assertEquals("c", model.httpHeaders().get(0).value()); - Assertions.assertEquals("glrvimjwosytxi", model.path()); - Assertions.assertEquals(1413257471, model.port()); - Assertions.assertEquals(Scheme.HTTP, model.scheme()); - } - - @Test - public void testSerialize() { - ContainerAppProbeHttpGet model = - new ContainerAppProbeHttpGet() - .withHost("jawneaiv") - .withHttpHeaders( - Arrays - .asList( - new ContainerAppProbeHttpGetHttpHeadersItem().withName("zel").withValue("c"), - new ContainerAppProbeHttpGetHttpHeadersItem().withName("r").withValue("lsfeaenwabfatkld"), - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("xbjhwuaanozjosph") - .withValue("oulpjrv"))) - .withPath("glrvimjwosytxi") - .withPort(1413257471) - .withScheme(Scheme.HTTP); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeHttpGet.class); - Assertions.assertEquals("jawneaiv", model.host()); - Assertions.assertEquals("zel", model.httpHeaders().get(0).name()); - Assertions.assertEquals("c", model.httpHeaders().get(0).value()); - Assertions.assertEquals("glrvimjwosytxi", model.path()); - Assertions.assertEquals(1413257471, 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 e4903494ed13..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTcpSocketTests.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.ContainerAppProbeTcpSocket; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerAppProbeTcpSocketTests { - @Test - public void testDeserialize() { - ContainerAppProbeTcpSocket model = - BinaryData - .fromString("{\"host\":\"jhdgqggebdunyga\",\"port\":2021053825}") - .toObject(ContainerAppProbeTcpSocket.class); - Assertions.assertEquals("jhdgqggebdunyga", model.host()); - Assertions.assertEquals(2021053825, model.port()); - } - - @Test - public void testSerialize() { - ContainerAppProbeTcpSocket model = - new ContainerAppProbeTcpSocket().withHost("jhdgqggebdunyga").withPort(2021053825); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeTcpSocket.class); - Assertions.assertEquals("jhdgqggebdunyga", model.host()); - Assertions.assertEquals(2021053825, 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 9ff7131fd14d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTests.java +++ /dev/null @@ -1,88 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.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; -import org.junit.jupiter.api.Test; - -public final class ContainerAppProbeTests { - @Test - public void testDeserialize() { - ContainerAppProbe model = - BinaryData - .fromString( - "{\"failureThreshold\":1892001157,\"httpGet\":{\"host\":\"rhyrnxxmueed\",\"httpHeaders\":[{\"name\":\"dvstkw\",\"value\":\"qtc\"},{\"name\":\"ealmfmtdaaygdvwv\",\"value\":\"piohgwxrtfu\"},{\"name\":\"xepxgyqagvrvmn\",\"value\":\"k\"}],\"path\":\"ghimdblx\",\"port\":505358997,\"scheme\":\"HTTP\"},\"initialDelaySeconds\":1046627826,\"periodSeconds\":984160598,\"successThreshold\":44093722,\"tcpSocket\":{\"host\":\"mszkkfo\",\"port\":739435613},\"terminationGracePeriodSeconds\":6713909564686368420,\"timeoutSeconds\":520152641,\"type\":\"Readiness\"}") - .toObject(ContainerAppProbe.class); - Assertions.assertEquals(1892001157, model.failureThreshold()); - Assertions.assertEquals("rhyrnxxmueed", model.httpGet().host()); - Assertions.assertEquals("dvstkw", model.httpGet().httpHeaders().get(0).name()); - Assertions.assertEquals("qtc", model.httpGet().httpHeaders().get(0).value()); - Assertions.assertEquals("ghimdblx", model.httpGet().path()); - Assertions.assertEquals(505358997, model.httpGet().port()); - Assertions.assertEquals(Scheme.HTTP, model.httpGet().scheme()); - Assertions.assertEquals(1046627826, model.initialDelaySeconds()); - Assertions.assertEquals(984160598, model.periodSeconds()); - Assertions.assertEquals(44093722, model.successThreshold()); - Assertions.assertEquals("mszkkfo", model.tcpSocket().host()); - Assertions.assertEquals(739435613, model.tcpSocket().port()); - Assertions.assertEquals(6713909564686368420L, model.terminationGracePeriodSeconds()); - Assertions.assertEquals(520152641, model.timeoutSeconds()); - Assertions.assertEquals(Type.READINESS, model.type()); - } - - @Test - public void testSerialize() { - ContainerAppProbe model = - new ContainerAppProbe() - .withFailureThreshold(1892001157) - .withHttpGet( - new ContainerAppProbeHttpGet() - .withHost("rhyrnxxmueed") - .withHttpHeaders( - Arrays - .asList( - new ContainerAppProbeHttpGetHttpHeadersItem().withName("dvstkw").withValue("qtc"), - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("ealmfmtdaaygdvwv") - .withValue("piohgwxrtfu"), - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("xepxgyqagvrvmn") - .withValue("k"))) - .withPath("ghimdblx") - .withPort(505358997) - .withScheme(Scheme.HTTP)) - .withInitialDelaySeconds(1046627826) - .withPeriodSeconds(984160598) - .withSuccessThreshold(44093722) - .withTcpSocket(new ContainerAppProbeTcpSocket().withHost("mszkkfo").withPort(739435613)) - .withTerminationGracePeriodSeconds(6713909564686368420L) - .withTimeoutSeconds(520152641) - .withType(Type.READINESS); - model = BinaryData.fromObject(model).toObject(ContainerAppProbe.class); - Assertions.assertEquals(1892001157, model.failureThreshold()); - Assertions.assertEquals("rhyrnxxmueed", model.httpGet().host()); - Assertions.assertEquals("dvstkw", model.httpGet().httpHeaders().get(0).name()); - Assertions.assertEquals("qtc", model.httpGet().httpHeaders().get(0).value()); - Assertions.assertEquals("ghimdblx", model.httpGet().path()); - Assertions.assertEquals(505358997, model.httpGet().port()); - Assertions.assertEquals(Scheme.HTTP, model.httpGet().scheme()); - Assertions.assertEquals(1046627826, model.initialDelaySeconds()); - Assertions.assertEquals(984160598, model.periodSeconds()); - Assertions.assertEquals(44093722, model.successThreshold()); - Assertions.assertEquals("mszkkfo", model.tcpSocket().host()); - Assertions.assertEquals(739435613, model.tcpSocket().port()); - Assertions.assertEquals(6713909564686368420L, model.terminationGracePeriodSeconds()); - Assertions.assertEquals(520152641, model.timeoutSeconds()); - Assertions.assertEquals(Type.READINESS, model.type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppPropertiesTests.java deleted file mode 100644 index 5547a7f4e8e6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppPropertiesTests.java +++ /dev/null @@ -1,225 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code 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.ContainerAppProperties; -import com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode; -import com.azure.resourcemanager.appcontainers.models.AppProtocol; -import com.azure.resourcemanager.appcontainers.models.Configuration; -import com.azure.resourcemanager.appcontainers.models.Container; -import com.azure.resourcemanager.appcontainers.models.Dapr; -import com.azure.resourcemanager.appcontainers.models.Ingress; -import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; -import com.azure.resourcemanager.appcontainers.models.InitContainer; -import com.azure.resourcemanager.appcontainers.models.LogLevel; -import com.azure.resourcemanager.appcontainers.models.RegistryCredentials; -import com.azure.resourcemanager.appcontainers.models.Scale; -import com.azure.resourcemanager.appcontainers.models.Secret; -import com.azure.resourcemanager.appcontainers.models.StorageType; -import com.azure.resourcemanager.appcontainers.models.Template; -import com.azure.resourcemanager.appcontainers.models.Volume; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerAppPropertiesTests { - @Test - public void testDeserialize() { - ContainerAppProperties model = - BinaryData - .fromString( - "{\"provisioningState\":\"Failed\",\"managedEnvironmentId\":\"i\",\"environmentId\":\"hxepcyvahfnlj\",\"workloadProfileType\":\"qxj\",\"latestRevisionName\":\"ujqgidok\",\"latestRevisionFqdn\":\"ljyoxgvcltb\",\"customDomainVerificationId\":\"ncghkje\",\"configuration\":{\"secrets\":[{\"name\":\"ijhtxf\",\"value\":\"xbf\"},{\"name\":\"xnehmpvec\",\"value\":\"odebfqkkrbmpu\"},{\"name\":\"riwflzlfb\",\"value\":\"puz\"}],\"activeRevisionsMode\":\"Single\",\"ingress\":{\"fqdn\":\"nqzahmgkbrpyyd\",\"external\":true,\"targetPort\":1877210635,\"exposedPort\":2043148337,\"transport\":\"http\",\"traffic\":[],\"customDomains\":[],\"allowInsecure\":true,\"ipSecurityRestrictions\":[]},\"registries\":[{\"server\":\"n\",\"username\":\"ynhijggme\",\"passwordSecretRef\":\"siarbutrcvpn\",\"identity\":\"zmhjrunmp\"}],\"dapr\":{\"enabled\":true,\"appId\":\"hrbnlankxmyskpbh\",\"appProtocol\":\"grpc\",\"appPort\":2131694851,\"httpReadBufferSize\":2016648328,\"httpMaxRequestSize\":83692384,\"logLevel\":\"info\",\"enableApiLogging\":false},\"maxInactiveRevisions\":1863766018},\"template\":{\"revisionSuffix\":\"lqidyby\",\"initContainers\":[{\"image\":\"clha\",\"name\":\"dbabp\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]}],\"containers\":[{\"probes\":[],\"image\":\"thsu\",\"name\":\"cmnyyazttb\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]},{\"probes\":[],\"image\":\"dckzywbiexz\",\"name\":\"yueaxibxujwb\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]},{\"probes\":[],\"image\":\"yoxa\",\"name\":\"dkzjancuxrh\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]},{\"probes\":[],\"image\":\"iwdjswztsdbpgn\",\"name\":\"txhp\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]}],\"scale\":{\"minReplicas\":262767805,\"maxReplicas\":1638223797,\"rules\":[]},\"volumes\":[{\"name\":\"tcty\",\"storageType\":\"AzureFile\",\"storageName\":\"bbovplwzbhvgyugu\"},{\"name\":\"vmkfssxqu\",\"storageType\":\"AzureFile\",\"storageName\":\"l\"},{\"name\":\"gsxnkjzkdeslpv\",\"storageType\":\"AzureFile\",\"storageName\":\"i\"},{\"name\":\"ghxpkdw\",\"storageType\":\"EmptyDir\",\"storageName\":\"uebbaumnyqup\"}]},\"outboundIpAddresses\":[\"ojnabckhsmtxpsie\",\"tfhvpesapskrdqmh\"],\"eventStreamEndpoint\":\"dhtldwkyz\"}") - .toObject(ContainerAppProperties.class); - Assertions.assertEquals("i", model.managedEnvironmentId()); - Assertions.assertEquals("hxepcyvahfnlj", model.environmentId()); - Assertions.assertEquals("qxj", model.workloadProfileType()); - Assertions.assertEquals("ijhtxf", model.configuration().secrets().get(0).name()); - Assertions.assertEquals("xbf", model.configuration().secrets().get(0).value()); - Assertions.assertEquals(ActiveRevisionsMode.SINGLE, model.configuration().activeRevisionsMode()); - Assertions.assertEquals(true, model.configuration().ingress().external()); - Assertions.assertEquals(1877210635, model.configuration().ingress().targetPort()); - Assertions.assertEquals(2043148337, model.configuration().ingress().exposedPort()); - Assertions.assertEquals(IngressTransportMethod.HTTP, model.configuration().ingress().transport()); - Assertions.assertEquals(true, model.configuration().ingress().allowInsecure()); - Assertions.assertEquals("n", model.configuration().registries().get(0).server()); - Assertions.assertEquals("ynhijggme", model.configuration().registries().get(0).username()); - Assertions.assertEquals("siarbutrcvpn", model.configuration().registries().get(0).passwordSecretRef()); - Assertions.assertEquals("zmhjrunmp", model.configuration().registries().get(0).identity()); - Assertions.assertEquals(true, model.configuration().dapr().enabled()); - Assertions.assertEquals("hrbnlankxmyskpbh", model.configuration().dapr().appId()); - Assertions.assertEquals(AppProtocol.GRPC, model.configuration().dapr().appProtocol()); - Assertions.assertEquals(2131694851, model.configuration().dapr().appPort()); - Assertions.assertEquals(2016648328, model.configuration().dapr().httpReadBufferSize()); - Assertions.assertEquals(83692384, model.configuration().dapr().httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.INFO, model.configuration().dapr().logLevel()); - Assertions.assertEquals(false, model.configuration().dapr().enableApiLogging()); - Assertions.assertEquals(1863766018, model.configuration().maxInactiveRevisions()); - Assertions.assertEquals("lqidyby", model.template().revisionSuffix()); - Assertions.assertEquals("clha", model.template().initContainers().get(0).image()); - Assertions.assertEquals("dbabp", model.template().initContainers().get(0).name()); - Assertions.assertEquals("thsu", model.template().containers().get(0).image()); - Assertions.assertEquals("cmnyyazttb", model.template().containers().get(0).name()); - Assertions.assertEquals(262767805, model.template().scale().minReplicas()); - Assertions.assertEquals(1638223797, model.template().scale().maxReplicas()); - Assertions.assertEquals("tcty", model.template().volumes().get(0).name()); - Assertions.assertEquals(StorageType.AZURE_FILE, model.template().volumes().get(0).storageType()); - Assertions.assertEquals("bbovplwzbhvgyugu", model.template().volumes().get(0).storageName()); - } - - @Test - public void testSerialize() { - ContainerAppProperties model = - new ContainerAppProperties() - .withManagedEnvironmentId("i") - .withEnvironmentId("hxepcyvahfnlj") - .withWorkloadProfileType("qxj") - .withConfiguration( - new Configuration() - .withSecrets( - Arrays - .asList( - new Secret().withName("ijhtxf").withValue("xbf"), - new Secret().withName("xnehmpvec").withValue("odebfqkkrbmpu"), - new Secret().withName("riwflzlfb").withValue("puz"))) - .withActiveRevisionsMode(ActiveRevisionsMode.SINGLE) - .withIngress( - new Ingress() - .withExternal(true) - .withTargetPort(1877210635) - .withExposedPort(2043148337) - .withTransport(IngressTransportMethod.HTTP) - .withTraffic(Arrays.asList()) - .withCustomDomains(Arrays.asList()) - .withAllowInsecure(true) - .withIpSecurityRestrictions(Arrays.asList())) - .withRegistries( - Arrays - .asList( - new RegistryCredentials() - .withServer("n") - .withUsername("ynhijggme") - .withPasswordSecretRef("siarbutrcvpn") - .withIdentity("zmhjrunmp"))) - .withDapr( - new Dapr() - .withEnabled(true) - .withAppId("hrbnlankxmyskpbh") - .withAppProtocol(AppProtocol.GRPC) - .withAppPort(2131694851) - .withHttpReadBufferSize(2016648328) - .withHttpMaxRequestSize(83692384) - .withLogLevel(LogLevel.INFO) - .withEnableApiLogging(false)) - .withMaxInactiveRevisions(1863766018)) - .withTemplate( - new Template() - .withRevisionSuffix("lqidyby") - .withInitContainers( - Arrays - .asList( - new InitContainer() - .withImage("clha") - .withName("dbabp") - .withCommand(Arrays.asList()) - .withArgs(Arrays.asList()) - .withEnv(Arrays.asList()) - .withVolumeMounts(Arrays.asList()))) - .withContainers( - Arrays - .asList( - new Container() - .withImage("thsu") - .withName("cmnyyazttb") - .withCommand(Arrays.asList()) - .withArgs(Arrays.asList()) - .withEnv(Arrays.asList()) - .withVolumeMounts(Arrays.asList()) - .withProbes(Arrays.asList()), - new Container() - .withImage("dckzywbiexz") - .withName("yueaxibxujwb") - .withCommand(Arrays.asList()) - .withArgs(Arrays.asList()) - .withEnv(Arrays.asList()) - .withVolumeMounts(Arrays.asList()) - .withProbes(Arrays.asList()), - new Container() - .withImage("yoxa") - .withName("dkzjancuxrh") - .withCommand(Arrays.asList()) - .withArgs(Arrays.asList()) - .withEnv(Arrays.asList()) - .withVolumeMounts(Arrays.asList()) - .withProbes(Arrays.asList()), - new Container() - .withImage("iwdjswztsdbpgn") - .withName("txhp") - .withCommand(Arrays.asList()) - .withArgs(Arrays.asList()) - .withEnv(Arrays.asList()) - .withVolumeMounts(Arrays.asList()) - .withProbes(Arrays.asList()))) - .withScale( - new Scale() - .withMinReplicas(262767805) - .withMaxReplicas(1638223797) - .withRules(Arrays.asList())) - .withVolumes( - Arrays - .asList( - new Volume() - .withName("tcty") - .withStorageType(StorageType.AZURE_FILE) - .withStorageName("bbovplwzbhvgyugu"), - new Volume() - .withName("vmkfssxqu") - .withStorageType(StorageType.AZURE_FILE) - .withStorageName("l"), - new Volume() - .withName("gsxnkjzkdeslpv") - .withStorageType(StorageType.AZURE_FILE) - .withStorageName("i"), - new Volume() - .withName("ghxpkdw") - .withStorageType(StorageType.EMPTY_DIR) - .withStorageName("uebbaumnyqup")))); - model = BinaryData.fromObject(model).toObject(ContainerAppProperties.class); - Assertions.assertEquals("i", model.managedEnvironmentId()); - Assertions.assertEquals("hxepcyvahfnlj", model.environmentId()); - Assertions.assertEquals("qxj", model.workloadProfileType()); - Assertions.assertEquals("ijhtxf", model.configuration().secrets().get(0).name()); - Assertions.assertEquals("xbf", model.configuration().secrets().get(0).value()); - Assertions.assertEquals(ActiveRevisionsMode.SINGLE, model.configuration().activeRevisionsMode()); - Assertions.assertEquals(true, model.configuration().ingress().external()); - Assertions.assertEquals(1877210635, model.configuration().ingress().targetPort()); - Assertions.assertEquals(2043148337, model.configuration().ingress().exposedPort()); - Assertions.assertEquals(IngressTransportMethod.HTTP, model.configuration().ingress().transport()); - Assertions.assertEquals(true, model.configuration().ingress().allowInsecure()); - Assertions.assertEquals("n", model.configuration().registries().get(0).server()); - Assertions.assertEquals("ynhijggme", model.configuration().registries().get(0).username()); - Assertions.assertEquals("siarbutrcvpn", model.configuration().registries().get(0).passwordSecretRef()); - Assertions.assertEquals("zmhjrunmp", model.configuration().registries().get(0).identity()); - Assertions.assertEquals(true, model.configuration().dapr().enabled()); - Assertions.assertEquals("hrbnlankxmyskpbh", model.configuration().dapr().appId()); - Assertions.assertEquals(AppProtocol.GRPC, model.configuration().dapr().appProtocol()); - Assertions.assertEquals(2131694851, model.configuration().dapr().appPort()); - Assertions.assertEquals(2016648328, model.configuration().dapr().httpReadBufferSize()); - Assertions.assertEquals(83692384, model.configuration().dapr().httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.INFO, model.configuration().dapr().logLevel()); - Assertions.assertEquals(false, model.configuration().dapr().enableApiLogging()); - Assertions.assertEquals(1863766018, model.configuration().maxInactiveRevisions()); - Assertions.assertEquals("lqidyby", model.template().revisionSuffix()); - Assertions.assertEquals("clha", model.template().initContainers().get(0).image()); - Assertions.assertEquals("dbabp", model.template().initContainers().get(0).name()); - Assertions.assertEquals("thsu", model.template().containers().get(0).image()); - Assertions.assertEquals("cmnyyazttb", model.template().containers().get(0).name()); - Assertions.assertEquals(262767805, model.template().scale().minReplicas()); - Assertions.assertEquals(1638223797, model.template().scale().maxReplicas()); - Assertions.assertEquals("tcty", model.template().volumes().get(0).name()); - Assertions.assertEquals(StorageType.AZURE_FILE, model.template().volumes().get(0).storageType()); - Assertions.assertEquals("bbovplwzbhvgyugu", model.template().volumes().get(0).storageName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppSecretTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppSecretTests.java deleted file mode 100644 index 084242df7a48..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppSecretTests.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.ContainerAppSecret; -import org.junit.jupiter.api.Test; - -public final class ContainerAppSecretTests { - @Test - public void testDeserialize() { - ContainerAppSecret model = - BinaryData - .fromString("{\"name\":\"deibqip\",\"value\":\"ghvxndzwmkrefa\"}") - .toObject(ContainerAppSecret.class); - } - - @Test - public void testSerialize() { - ContainerAppSecret model = new ContainerAppSecret(); - model = BinaryData.fromObject(model).toObject(ContainerAppSecret.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppMockTests.java deleted file mode 100644 index 11a175e7be13..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppMockTests.java +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.AuthConfig; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsAuthConfigsListByContainerAppMockTests { - @Test - public void testListByContainerApp() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"platform\":{\"enabled\":false,\"runtimeVersion\":\"vz\"},\"globalValidation\":{\"unauthenticatedClientAction\":\"RedirectToLoginPage\",\"redirectToProvider\":\"fbzdixzmqpnoda\",\"excludedPaths\":[]},\"identityProviders\":{\"customOpenIdConnectProviders\":{}},\"login\":{\"preserveUrlFragmentsForLogins\":false,\"allowedExternalRedirectUrls\":[]},\"httpSettings\":{\"requireHttps\":false}},\"id\":\"atutmzlbiojlvfhr\",\"name\":\"bpneqvcwwyyurm\",\"type\":\"chpp\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.containerAppsAuthConfigs().listByContainerApp("fezrx", "czurtlei", Context.NONE); - - Assertions.assertEquals(false, response.iterator().next().platform().enabled()); - Assertions.assertEquals("vz", response.iterator().next().platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.REDIRECT_TO_LOGIN_PAGE, - response.iterator().next().globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("fbzdixzmqpnoda", response.iterator().next().globalValidation().redirectToProvider()); - Assertions.assertEquals(false, response.iterator().next().login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals(false, response.iterator().next().httpSettings().requireHttps()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateMockTests.java deleted file mode 100644 index 2a395092867a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights 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.ActiveRevisionsMode; -import com.azure.resourcemanager.appcontainers.models.Configuration; -import com.azure.resourcemanager.appcontainers.models.ContainerApp; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.Template; -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 ContainerAppsCreateOrUpdateMockTests { - @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 = - "{\"extendedLocation\":{\"name\":\"kiwbuqnyoph\",\"type\":\"CustomLocation\"},\"identity\":{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"provisioningState\":\"Succeeded\",\"managedEnvironmentId\":\"nezzcezelfwyfwlw\",\"environmentId\":\"wetnpsihc\",\"workloadProfileType\":\"fzvaylptr\",\"latestRevisionName\":\"qwztcmwqkc\",\"latestRevisionFqdn\":\"xwaxfewzjkj\",\"customDomainVerificationId\":\"fdeqvhpsyl\",\"configuration\":{\"secrets\":[],\"activeRevisionsMode\":\"Multiple\",\"registries\":[],\"maxInactiveRevisions\":919245965},\"template\":{\"revisionSuffix\":\"zjrgyww\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"outboundIpAddresses\":[\"tf\",\"jgicgaao\",\"pttaqutd\",\"wemxswvruunzz\"],\"eventStreamEndpoint\":\"ehkfkimrtixok\"},\"location\":\"qyinl\",\"tags\":{\"hiyxgvelfclduc\":\"pqwhixmonst\"},\"id\":\"birdsvuwcobiegs\",\"name\":\"mninwjizcilng\",\"type\":\"gshejjtbxqmulux\"}"; - - 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)); - - ContainerApp response = - manager - .containerApps() - .define("fgtayxonsup") - .withRegion("rylniofrzg") - .withExistingResourceGroup("mv") - .withTags(mapOf("tkvnlvxbcuiiznkt", "edm")) - .withExtendedLocation( - new ExtendedLocation().withName("lzqnhcvs").withType(ExtendedLocationTypes.CUSTOM_LOCATION)) - .withIdentity( - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities(mapOf())) - .withManagedEnvironmentId("xfyqonmpqoxwdo") - .withEnvironmentId("bxiqxeiiqbimht") - .withWorkloadProfileType("winhehfqpo") - .withConfiguration( - new Configuration() - .withSecrets(Arrays.asList()) - .withActiveRevisionsMode(ActiveRevisionsMode.MULTIPLE) - .withRegistries(Arrays.asList()) - .withMaxInactiveRevisions(1610520770)) - .withTemplate( - new Template() - .withRevisionSuffix("zuwfmdur") - .withInitContainers(Arrays.asList()) - .withContainers(Arrays.asList()) - .withVolumes(Arrays.asList())) - .create(); - - Assertions.assertEquals("qyinl", response.location()); - Assertions.assertEquals("pqwhixmonst", response.tags().get("hiyxgvelfclduc")); - Assertions.assertEquals("kiwbuqnyoph", response.extendedLocation().name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, response.extendedLocation().type()); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, response.identity().type()); - Assertions.assertEquals("nezzcezelfwyfwlw", response.managedEnvironmentId()); - Assertions.assertEquals("wetnpsihc", response.environmentId()); - Assertions.assertEquals("fzvaylptr", response.workloadProfileType()); - Assertions.assertEquals(ActiveRevisionsMode.MULTIPLE, response.configuration().activeRevisionsMode()); - Assertions.assertEquals(919245965, response.configuration().maxInactiveRevisions()); - Assertions.assertEquals("zjrgyww", response.template().revisionSuffix()); - } - - @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/ContainerAppsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteMockTests.java deleted file mode 100644 index bd21d8edc4a5..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteMockTests.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.core.util.Context; -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("ljhlnymzotq", "ryuzcbmqqv", Context.NONE); - } -} 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 ad2bcd84fa70..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -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\":\"eq\",\"name\":\"arvlagunbt\",\"description\":\"ebwlnbmhyreeudzq\",\"author\":\"bpdqmjxlyy\",\"category\":\"lgouwtlmjj\",\"supportTopicList\":[],\"analysisTypes\":[],\"type\":\"qtobaxkjeyt\",\"score\":38.508713},\"dataset\":[],\"status\":{\"message\":\"wrus\",\"statusId\":1630715289},\"dataProviderMetadata\":{\"providerName\":\"syrq\",\"propertyBag\":[]}},\"id\":\"qhd\",\"name\":\"nxaulk\",\"type\":\"akdkifmjnnawtqab\"}]}"; - - 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("tz", "atbhjmznn", Context.NONE); - - Assertions.assertEquals("wrus", response.iterator().next().properties().status().message()); - Assertions.assertEquals(1630715289, response.iterator().next().properties().status().statusId()); - Assertions.assertEquals("syrq", response.iterator().next().properties().dataProviderMetadata().providerName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsMockTests.java deleted file mode 100644 index 42bf66cb1ba8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsMockTests.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.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Revision; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsDiagnosticsListRevisionsMockTests { - @Test - public void testListRevisions() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-09-23T09:27:28Z\",\"lastActiveTime\":\"2021-02-12T07:54:43Z\",\"fqdn\":\"pxiwf\",\"template\":{\"revisionSuffix\":\"jsa\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"active\":true,\"replicas\":1850415836,\"trafficWeight\":337037006,\"provisioningError\":\"viirhgfgrws\",\"healthState\":\"Unhealthy\",\"provisioningState\":\"Provisioning\"},\"id\":\"zvzbglbyv\",\"name\":\"ctctbrxkjz\",\"type\":\"rgxffmshkw\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.containerAppsDiagnostics().listRevisions("xuckpggqoweyir", "hlisngw", "lqqmpiz", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupMockTests.java deleted file mode 100644 index 7b4533edc0b2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupMockTests.java +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.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.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode; -import com.azure.resourcemanager.appcontainers.models.ContainerApp; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -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 ContainerAppsListByResourceGroupMockTests { - @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\":[{\"extendedLocation\":{\"name\":\"f\",\"type\":\"CustomLocation\"},\"identity\":{\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"provisioningState\":\"Canceled\",\"managedEnvironmentId\":\"s\",\"environmentId\":\"rioov\",\"workloadProfileType\":\"dsxwaab\",\"latestRevisionName\":\"ifrygzn\",\"latestRevisionFqdn\":\"axri\",\"customDomainVerificationId\":\"zob\",\"configuration\":{\"secrets\":[],\"activeRevisionsMode\":\"Single\",\"registries\":[],\"maxInactiveRevisions\":1673403007},\"template\":{\"revisionSuffix\":\"ieixynllxe\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"outboundIpAddresses\":[\"hslhca\",\"jutifdwfmvigorqj\",\"ttzhra\",\"lkafhonqjuje\"],\"eventStreamEndpoint\":\"kpzvcpopmxelnwc\"},\"location\":\"yjede\",\"tags\":{\"scazuawxtzxpu\":\"lfmk\",\"s\":\"mwabzxrvxc\"},\"id\":\"sphaivmxyasflvg\",\"name\":\"gzwywak\",\"type\":\"ihknsmjbl\"}]}"; - - 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.containerApps().listByResourceGroup("ptgoeiybbabp", Context.NONE); - - Assertions.assertEquals("yjede", response.iterator().next().location()); - Assertions.assertEquals("lfmk", response.iterator().next().tags().get("scazuawxtzxpu")); - Assertions.assertEquals("f", response.iterator().next().extendedLocation().name()); - Assertions - .assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, response.iterator().next().extendedLocation().type()); - Assertions - .assertEquals( - ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("s", response.iterator().next().managedEnvironmentId()); - Assertions.assertEquals("rioov", response.iterator().next().environmentId()); - Assertions.assertEquals("dsxwaab", response.iterator().next().workloadProfileType()); - Assertions - .assertEquals(ActiveRevisionsMode.SINGLE, response.iterator().next().configuration().activeRevisionsMode()); - Assertions.assertEquals(1673403007, response.iterator().next().configuration().maxInactiveRevisions()); - Assertions.assertEquals("ieixynllxe", response.iterator().next().template().revisionSuffix()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListMockTests.java deleted file mode 100644 index b5de8d1f9c26..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListMockTests.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode; -import com.azure.resourcemanager.appcontainers.models.ContainerApp; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -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 ContainerAppsListMockTests { - @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\":[{\"extendedLocation\":{\"name\":\"snmokayzej\",\"type\":\"CustomLocation\"},\"identity\":{\"type\":\"SystemAssigned,UserAssigned\",\"userAssignedIdentities\":{}},\"properties\":{\"provisioningState\":\"InProgress\",\"managedEnvironmentId\":\"jh\",\"environmentId\":\"zv\",\"workloadProfileType\":\"h\",\"latestRevisionName\":\"bnwieholew\",\"latestRevisionFqdn\":\"iuubwefqsf\",\"customDomainVerificationId\":\"aqtferr\",\"configuration\":{\"secrets\":[],\"activeRevisionsMode\":\"Single\",\"registries\":[],\"maxInactiveRevisions\":2076529802},\"template\":{\"revisionSuffix\":\"wogqqnobpudcdab\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"outboundIpAddresses\":[\"wbzasqbuclj\",\"kyexaoguyaipi\"],\"eventStreamEndpoint\":\"daultxijjumfq\"},\"location\":\"z\",\"tags\":{\"jng\":\"nm\",\"bjwgnyfus\":\"qdqx\",\"fh\":\"zsvtuikzhajqgl\"},\"id\":\"l\",\"name\":\"qryxyn\",\"type\":\"nzrdpsovwxz\"}]}"; - - 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.containerApps().list(Context.NONE); - - Assertions.assertEquals("z", response.iterator().next().location()); - Assertions.assertEquals("nm", response.iterator().next().tags().get("jng")); - Assertions.assertEquals("snmokayzej", response.iterator().next().extendedLocation().name()); - Assertions - .assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, response.iterator().next().extendedLocation().type()); - Assertions - .assertEquals( - ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED, response.iterator().next().identity().type()); - Assertions.assertEquals("jh", response.iterator().next().managedEnvironmentId()); - Assertions.assertEquals("zv", response.iterator().next().environmentId()); - Assertions.assertEquals("h", response.iterator().next().workloadProfileType()); - Assertions - .assertEquals(ActiveRevisionsMode.SINGLE, response.iterator().next().configuration().activeRevisionsMode()); - Assertions.assertEquals(2076529802, response.iterator().next().configuration().maxInactiveRevisions()); - Assertions.assertEquals("wogqqnobpudcdab", response.iterator().next().template().revisionSuffix()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsMockTests.java deleted file mode 100644 index ddca831f448b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsMockTests.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.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Revision; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionsListRevisionsMockTests { - @Test - public void testListRevisions() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-03-07T21:38:43Z\",\"lastActiveTime\":\"2021-11-24T18:55:58Z\",\"fqdn\":\"ziqgfuh\",\"template\":{\"revisionSuffix\":\"ruswhv\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"active\":false,\"replicas\":1235050131,\"trafficWeight\":1910463572,\"provisioningError\":\"xjww\",\"healthState\":\"Unhealthy\",\"provisioningState\":\"Provisioning\"},\"id\":\"wmxqhndvnoamlds\",\"name\":\"haohdjhhflzokxc\",\"type\":\"xpelnjetagltsx\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.containerAppsRevisions().listRevisions("xqzv", "ers", "ycucrwnamikzeb", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateMockTests.java deleted file mode 100644 index f06d91975a1d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateMockTests.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; -import com.azure.resourcemanager.appcontainers.models.SourceControl; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsSourceControlsCreateOrUpdateMockTests { - @Test - public void testCreateOrUpdate() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"operationState\":\"InProgress\",\"repoUrl\":\"k\",\"branch\":\"qirwrweoox\",\"githubActionConfiguration\":{\"contextPath\":\"xwrsnew\",\"image\":\"zqvbubqm\",\"publishType\":\"hsycxhxzgaz\",\"os\":\"abo\",\"runtimeStack\":\"vmfqhppubo\",\"runtimeVersion\":\"epdfgkmtdherng\"}},\"id\":\"c\",\"name\":\"uahokq\",\"type\":\"obkauxofsh\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - SourceControl response = - manager - .containerAppsSourceControls() - .define("btozipqwje") - .withExistingContainerApp("neiknpg", "xgjiuqh") - .withRepoUrl("xxgewpk") - .withBranch("qylkmqpzoyhlf") - .withGithubActionConfiguration( - new GithubActionConfiguration() - .withContextPath("cloxo") - .withImage("qinjipnwjf") - .withPublishType("qlafcbahhpzpofoi") - .withOs("w") - .withRuntimeStack("ilkmk") - .withRuntimeVersion("olvdnd")) - .create(); - - Assertions.assertEquals("k", response.repoUrl()); - Assertions.assertEquals("qirwrweoox", response.branch()); - Assertions.assertEquals("xwrsnew", response.githubActionConfiguration().contextPath()); - Assertions.assertEquals("zqvbubqm", response.githubActionConfiguration().image()); - Assertions.assertEquals("hsycxhxzgaz", response.githubActionConfiguration().publishType()); - Assertions.assertEquals("abo", response.githubActionConfiguration().os()); - Assertions.assertEquals("vmfqhppubo", response.githubActionConfiguration().runtimeStack()); - Assertions.assertEquals("epdfgkmtdherng", response.githubActionConfiguration().runtimeVersion()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java deleted file mode 100644 index 210da113c01d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.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.core.util.Context; -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("vtxnjmxmcuqud", "cvclxynpdk", "gfabuiyjibuzphdu", Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppMockTests.java deleted file mode 100644 index 485e870c2ee3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppMockTests.java +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights 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.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.SourceControl; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsSourceControlsListByContainerAppMockTests { - @Test - public void testListByContainerApp() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"operationState\":\"Canceled\",\"repoUrl\":\"zszuwiwtglxx\",\"branch\":\"jfpgpicrmn\",\"githubActionConfiguration\":{\"contextPath\":\"qgjsxvpqcbfrmbod\",\"image\":\"s\",\"publishType\":\"gvriibakclac\",\"os\":\"rnxousxauzlwvsg\",\"runtimeStack\":\"ohqfzizv\",\"runtimeVersion\":\"mmkjsvthnwpztek\"}},\"id\":\"mribiat\",\"name\":\"gplucfotangcfhny\",\"type\":\"zcugswvxwlmzqw\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager - .containerAppsSourceControls() - .listByContainerApp("zdfuydzvkfvxcnqm", "qpswokmvkhlggdhb", Context.NONE); - - Assertions.assertEquals("zszuwiwtglxx", response.iterator().next().repoUrl()); - Assertions.assertEquals("jfpgpicrmn", response.iterator().next().branch()); - Assertions - .assertEquals("qgjsxvpqcbfrmbod", response.iterator().next().githubActionConfiguration().contextPath()); - Assertions.assertEquals("s", response.iterator().next().githubActionConfiguration().image()); - Assertions.assertEquals("gvriibakclac", response.iterator().next().githubActionConfiguration().publishType()); - Assertions.assertEquals("rnxousxauzlwvsg", response.iterator().next().githubActionConfiguration().os()); - Assertions.assertEquals("ohqfzizv", response.iterator().next().githubActionConfiguration().runtimeStack()); - Assertions - .assertEquals("mmkjsvthnwpztek", response.iterator().next().githubActionConfiguration().runtimeVersion()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.java deleted file mode 100644 index e885f4068cb8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.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.ContainerResources; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerResourcesTests { - @Test - public void testDeserialize() { - ContainerResources model = - BinaryData - .fromString( - "{\"cpu\":4.018076144198646,\"memory\":\"byuqerpqlp\",\"ephemeralStorage\":\"cciuqgbdbutau\"}") - .toObject(ContainerResources.class); - Assertions.assertEquals(4.018076144198646D, model.cpu()); - Assertions.assertEquals("byuqerpqlp", model.memory()); - } - - @Test - public void testSerialize() { - ContainerResources model = new ContainerResources().withCpu(4.018076144198646D).withMemory("byuqerpqlp"); - model = BinaryData.fromObject(model).toObject(ContainerResources.class); - Assertions.assertEquals(4.018076144198646D, model.cpu()); - Assertions.assertEquals("byuqerpqlp", model.memory()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerTests.java deleted file mode 100644 index 7f5492f8531f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerTests.java +++ /dev/null @@ -1,133 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Container; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVar; -import com.azure.resourcemanager.appcontainers.models.Scheme; -import com.azure.resourcemanager.appcontainers.models.Type; -import com.azure.resourcemanager.appcontainers.models.VolumeMount; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ContainerTests { - @Test - public void testDeserialize() { - Container model = - BinaryData - .fromString( - "{\"probes\":[{\"failureThreshold\":1847154217,\"httpGet\":{\"host\":\"dyh\",\"httpHeaders\":[],\"path\":\"kpw\",\"port\":722591670,\"scheme\":\"HTTP\"},\"initialDelaySeconds\":1405054510,\"periodSeconds\":436930302,\"successThreshold\":217402337,\"tcpSocket\":{\"host\":\"ljxywsu\",\"port\":2009471016},\"terminationGracePeriodSeconds\":6037040030407661019,\"timeoutSeconds\":371488938,\"type\":\"Readiness\"}],\"image\":\"g\",\"name\":\"gvraeaen\",\"command\":[\"zar\"],\"args\":[\"q\",\"uijfqk\",\"cewiipfpub\",\"ibwwiftohqkv\"],\"env\":[{\"name\":\"sgplsakn\",\"value\":\"fsynljphuop\",\"secretRef\":\"dlqiyntorzih\"},{\"name\":\"osjswsr\",\"value\":\"lyzrpzbchckqqzqi\",\"secretRef\":\"iysui\"},{\"name\":\"ynkedyatrwyhqmib\",\"value\":\"hwit\",\"secretRef\":\"ypyynpcdpumnzg\"},{\"name\":\"z\",\"value\":\"abikns\",\"secretRef\":\"gj\"}],\"resources\":{\"cpu\":40.86477682375702,\"memory\":\"lwwrl\",\"ephemeralStorage\":\"m\"},\"volumeMounts\":[{\"volumeName\":\"ok\",\"mountPath\":\"llxdyhgs\"},{\"volumeName\":\"cogjltdtbn\",\"mountPath\":\"adoocrkvc\"},{\"volumeName\":\"hnvpamqgxq\",\"mountPath\":\"ezikywggxkal\"},{\"volumeName\":\"tmelw\",\"mountPath\":\"piccjzkzivgv\"}]}") - .toObject(Container.class); - Assertions.assertEquals("g", model.image()); - Assertions.assertEquals("gvraeaen", model.name()); - Assertions.assertEquals("zar", model.command().get(0)); - Assertions.assertEquals("q", model.args().get(0)); - Assertions.assertEquals("sgplsakn", model.env().get(0).name()); - Assertions.assertEquals("fsynljphuop", model.env().get(0).value()); - Assertions.assertEquals("dlqiyntorzih", model.env().get(0).secretRef()); - Assertions.assertEquals(40.86477682375702D, model.resources().cpu()); - Assertions.assertEquals("lwwrl", model.resources().memory()); - Assertions.assertEquals("ok", model.volumeMounts().get(0).volumeName()); - Assertions.assertEquals("llxdyhgs", model.volumeMounts().get(0).mountPath()); - Assertions.assertEquals(1847154217, model.probes().get(0).failureThreshold()); - Assertions.assertEquals("dyh", model.probes().get(0).httpGet().host()); - Assertions.assertEquals("kpw", model.probes().get(0).httpGet().path()); - Assertions.assertEquals(722591670, model.probes().get(0).httpGet().port()); - Assertions.assertEquals(Scheme.HTTP, model.probes().get(0).httpGet().scheme()); - Assertions.assertEquals(1405054510, model.probes().get(0).initialDelaySeconds()); - Assertions.assertEquals(436930302, model.probes().get(0).periodSeconds()); - Assertions.assertEquals(217402337, model.probes().get(0).successThreshold()); - Assertions.assertEquals("ljxywsu", model.probes().get(0).tcpSocket().host()); - Assertions.assertEquals(2009471016, model.probes().get(0).tcpSocket().port()); - Assertions.assertEquals(6037040030407661019L, model.probes().get(0).terminationGracePeriodSeconds()); - Assertions.assertEquals(371488938, model.probes().get(0).timeoutSeconds()); - Assertions.assertEquals(Type.READINESS, model.probes().get(0).type()); - } - - @Test - public void testSerialize() { - Container model = - new Container() - .withImage("g") - .withName("gvraeaen") - .withCommand(Arrays.asList("zar")) - .withArgs(Arrays.asList("q", "uijfqk", "cewiipfpub", "ibwwiftohqkv")) - .withEnv( - Arrays - .asList( - new EnvironmentVar() - .withName("sgplsakn") - .withValue("fsynljphuop") - .withSecretRef("dlqiyntorzih"), - new EnvironmentVar() - .withName("osjswsr") - .withValue("lyzrpzbchckqqzqi") - .withSecretRef("iysui"), - new EnvironmentVar() - .withName("ynkedyatrwyhqmib") - .withValue("hwit") - .withSecretRef("ypyynpcdpumnzg"), - new EnvironmentVar().withName("z").withValue("abikns").withSecretRef("gj"))) - .withResources(new ContainerResources().withCpu(40.86477682375702D).withMemory("lwwrl")) - .withVolumeMounts( - Arrays - .asList( - new VolumeMount().withVolumeName("ok").withMountPath("llxdyhgs"), - new VolumeMount().withVolumeName("cogjltdtbn").withMountPath("adoocrkvc"), - new VolumeMount().withVolumeName("hnvpamqgxq").withMountPath("ezikywggxkal"), - new VolumeMount().withVolumeName("tmelw").withMountPath("piccjzkzivgv"))) - .withProbes( - Arrays - .asList( - new ContainerAppProbe() - .withFailureThreshold(1847154217) - .withHttpGet( - new ContainerAppProbeHttpGet() - .withHost("dyh") - .withHttpHeaders(Arrays.asList()) - .withPath("kpw") - .withPort(722591670) - .withScheme(Scheme.HTTP)) - .withInitialDelaySeconds(1405054510) - .withPeriodSeconds(436930302) - .withSuccessThreshold(217402337) - .withTcpSocket( - new ContainerAppProbeTcpSocket().withHost("ljxywsu").withPort(2009471016)) - .withTerminationGracePeriodSeconds(6037040030407661019L) - .withTimeoutSeconds(371488938) - .withType(Type.READINESS))); - model = BinaryData.fromObject(model).toObject(Container.class); - Assertions.assertEquals("g", model.image()); - Assertions.assertEquals("gvraeaen", model.name()); - Assertions.assertEquals("zar", model.command().get(0)); - Assertions.assertEquals("q", model.args().get(0)); - Assertions.assertEquals("sgplsakn", model.env().get(0).name()); - Assertions.assertEquals("fsynljphuop", model.env().get(0).value()); - Assertions.assertEquals("dlqiyntorzih", model.env().get(0).secretRef()); - Assertions.assertEquals(40.86477682375702D, model.resources().cpu()); - Assertions.assertEquals("lwwrl", model.resources().memory()); - Assertions.assertEquals("ok", model.volumeMounts().get(0).volumeName()); - Assertions.assertEquals("llxdyhgs", model.volumeMounts().get(0).mountPath()); - Assertions.assertEquals(1847154217, model.probes().get(0).failureThreshold()); - Assertions.assertEquals("dyh", model.probes().get(0).httpGet().host()); - Assertions.assertEquals("kpw", model.probes().get(0).httpGet().path()); - Assertions.assertEquals(722591670, model.probes().get(0).httpGet().port()); - Assertions.assertEquals(Scheme.HTTP, model.probes().get(0).httpGet().scheme()); - Assertions.assertEquals(1405054510, model.probes().get(0).initialDelaySeconds()); - Assertions.assertEquals(436930302, model.probes().get(0).periodSeconds()); - Assertions.assertEquals(217402337, model.probes().get(0).successThreshold()); - Assertions.assertEquals("ljxywsu", model.probes().get(0).tcpSocket().host()); - Assertions.assertEquals(2009471016, model.probes().get(0).tcpSocket().port()); - Assertions.assertEquals(6037040030407661019L, model.probes().get(0).terminationGracePeriodSeconds()); - Assertions.assertEquals(371488938, model.probes().get(0).timeoutSeconds()); - Assertions.assertEquals(Type.READINESS, model.probes().get(0).type()); - } -} 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 b40309ff25bf..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CookieExpirationTests.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.CookieExpiration; -import com.azure.resourcemanager.appcontainers.models.CookieExpirationConvention; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CookieExpirationTests { - @Test - public void testDeserialize() { - CookieExpiration model = - BinaryData - .fromString("{\"convention\":\"IdentityProviderDerived\",\"timeToExpiration\":\"cftadeh\"}") - .toObject(CookieExpiration.class); - Assertions.assertEquals(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED, model.convention()); - Assertions.assertEquals("cftadeh", model.timeToExpiration()); - } - - @Test - public void testSerialize() { - CookieExpiration model = - new CookieExpiration() - .withConvention(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED) - .withTimeToExpiration("cftadeh"); - model = BinaryData.fromObject(model).toObject(CookieExpiration.class); - Assertions.assertEquals(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED, model.convention()); - Assertions.assertEquals("cftadeh", model.timeToExpiration()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainConfigurationTests.java deleted file mode 100644 index 83c04a1b6871..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainConfigurationTests.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.CustomDomainConfiguration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CustomDomainConfigurationTests { - @Test - public void testDeserialize() { - CustomDomainConfiguration model = - BinaryData - .fromString( - "{\"customDomainVerificationId\":\"lbfu\",\"dnsSuffix\":\"lyjt\",\"expirationDate\":\"2021-08-04T14:40:51Z\",\"thumbprint\":\"hvfcibyfmow\",\"subjectName\":\"rkjpvdwxfzwii\"}") - .toObject(CustomDomainConfiguration.class); - Assertions.assertEquals("lyjt", model.dnsSuffix()); - } - - @Test - public void testSerialize() { - CustomDomainConfiguration model = new CustomDomainConfiguration().withDnsSuffix("lyjt"); - model = BinaryData.fromObject(model).toObject(CustomDomainConfiguration.class); - Assertions.assertEquals("lyjt", model.dnsSuffix()); - } -} 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 7022182d6ee2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainTests.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.BindingType; -import com.azure.resourcemanager.appcontainers.models.CustomDomain; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CustomDomainTests { - @Test - public void testDeserialize() { - CustomDomain model = - BinaryData - .fromString( - "{\"name\":\"hfxobbcswsrtj\",\"bindingType\":\"SniEnabled\",\"certificateId\":\"lrbpbewtghfgbl\"}") - .toObject(CustomDomain.class); - Assertions.assertEquals("hfxobbcswsrtj", model.name()); - Assertions.assertEquals(BindingType.SNI_ENABLED, model.bindingType()); - Assertions.assertEquals("lrbpbewtghfgbl", model.certificateId()); - } - - @Test - public void testSerialize() { - CustomDomain model = - new CustomDomain() - .withName("hfxobbcswsrtj") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId("lrbpbewtghfgbl"); - model = BinaryData.fromObject(model).toObject(CustomDomain.class); - Assertions.assertEquals("hfxobbcswsrtj", model.name()); - Assertions.assertEquals(BindingType.SNI_ENABLED, model.bindingType()); - Assertions.assertEquals("lrbpbewtghfgbl", model.certificateId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomScaleRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomScaleRuleTests.java deleted file mode 100644 index 5fc1539d6a67..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomScaleRuleTests.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.models.CustomScaleRule; -import com.azure.resourcemanager.appcontainers.models.ScaleRuleAuth; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class CustomScaleRuleTests { - @Test - public void testDeserialize() { - CustomScaleRule model = - BinaryData - .fromString( - "{\"type\":\"gsahmkycgrauw\",\"metadata\":{\"vsmzlxwab\":\"taeburuvdm\",\"efkifr\":\"q\"},\"auth\":[{\"secretRef\":\"qujmqlgkf\",\"triggerParameter\":\"ndo\"},{\"secretRef\":\"n\",\"triggerParameter\":\"jcntuj\"},{\"secretRef\":\"c\",\"triggerParameter\":\"df\"},{\"secretRef\":\"waezkojvd\",\"triggerParameter\":\"zfoqouicybxar\"}]}") - .toObject(CustomScaleRule.class); - Assertions.assertEquals("gsahmkycgrauw", model.type()); - Assertions.assertEquals("taeburuvdm", model.metadata().get("vsmzlxwab")); - Assertions.assertEquals("qujmqlgkf", model.auth().get(0).secretRef()); - Assertions.assertEquals("ndo", model.auth().get(0).triggerParameter()); - } - - @Test - public void testSerialize() { - CustomScaleRule model = - new CustomScaleRule() - .withType("gsahmkycgrauw") - .withMetadata(mapOf("vsmzlxwab", "taeburuvdm", "efkifr", "q")) - .withAuth( - Arrays - .asList( - new ScaleRuleAuth().withSecretRef("qujmqlgkf").withTriggerParameter("ndo"), - new ScaleRuleAuth().withSecretRef("n").withTriggerParameter("jcntuj"), - new ScaleRuleAuth().withSecretRef("c").withTriggerParameter("df"), - new ScaleRuleAuth().withSecretRef("waezkojvd").withTriggerParameter("zfoqouicybxar"))); - model = BinaryData.fromObject(model).toObject(CustomScaleRule.class); - Assertions.assertEquals("gsahmkycgrauw", model.type()); - Assertions.assertEquals("taeburuvdm", model.metadata().get("vsmzlxwab")); - Assertions.assertEquals("qujmqlgkf", model.auth().get(0).secretRef()); - Assertions.assertEquals("ndo", model.auth().get(0).triggerParameter()); - } - - @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/DaprComponentInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentInnerTests.java deleted file mode 100644 index 983fad9cfb75..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentInnerTests.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.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -import com.azure.resourcemanager.appcontainers.models.DaprMetadata; -import com.azure.resourcemanager.appcontainers.models.Secret; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DaprComponentInnerTests { - @Test - public void testDeserialize() { - DaprComponentInner model = - BinaryData - .fromString( - "{\"properties\":{\"componentType\":\"nrojlpijnkr\",\"version\":\"rddh\",\"ignoreErrors\":false,\"initTimeout\":\"izzronasxiftozqy\",\"secrets\":[{\"name\":\"wesgogczh\",\"value\":\"nxkrlgnyhmossxkk\"}],\"secretStoreComponent\":\"h\",\"metadata\":[{\"name\":\"xjb\",\"value\":\"qxvcxgfrpdsofb\",\"secretRef\":\"rnsvbuswd\"}],\"scopes\":[\"ybycnunvj\",\"rtkfawnopq\"]},\"id\":\"kyzirtxdyux\",\"name\":\"ejnt\",\"type\":\"sewgioilqukr\"}") - .toObject(DaprComponentInner.class); - Assertions.assertEquals("nrojlpijnkr", model.componentType()); - Assertions.assertEquals("rddh", model.version()); - Assertions.assertEquals(false, model.ignoreErrors()); - Assertions.assertEquals("izzronasxiftozqy", model.initTimeout()); - Assertions.assertEquals("wesgogczh", model.secrets().get(0).name()); - Assertions.assertEquals("nxkrlgnyhmossxkk", model.secrets().get(0).value()); - Assertions.assertEquals("h", model.secretStoreComponent()); - Assertions.assertEquals("xjb", model.metadata().get(0).name()); - Assertions.assertEquals("qxvcxgfrpdsofb", model.metadata().get(0).value()); - Assertions.assertEquals("rnsvbuswd", model.metadata().get(0).secretRef()); - Assertions.assertEquals("ybycnunvj", model.scopes().get(0)); - } - - @Test - public void testSerialize() { - DaprComponentInner model = - new DaprComponentInner() - .withComponentType("nrojlpijnkr") - .withVersion("rddh") - .withIgnoreErrors(false) - .withInitTimeout("izzronasxiftozqy") - .withSecrets(Arrays.asList(new Secret().withName("wesgogczh").withValue("nxkrlgnyhmossxkk"))) - .withSecretStoreComponent("h") - .withMetadata( - Arrays - .asList( - new DaprMetadata().withName("xjb").withValue("qxvcxgfrpdsofb").withSecretRef("rnsvbuswd"))) - .withScopes(Arrays.asList("ybycnunvj", "rtkfawnopq")); - model = BinaryData.fromObject(model).toObject(DaprComponentInner.class); - Assertions.assertEquals("nrojlpijnkr", model.componentType()); - Assertions.assertEquals("rddh", model.version()); - Assertions.assertEquals(false, model.ignoreErrors()); - Assertions.assertEquals("izzronasxiftozqy", model.initTimeout()); - Assertions.assertEquals("wesgogczh", model.secrets().get(0).name()); - Assertions.assertEquals("nxkrlgnyhmossxkk", model.secrets().get(0).value()); - Assertions.assertEquals("h", model.secretStoreComponent()); - Assertions.assertEquals("xjb", model.metadata().get(0).name()); - Assertions.assertEquals("qxvcxgfrpdsofb", model.metadata().get(0).value()); - Assertions.assertEquals("rnsvbuswd", model.metadata().get(0).secretRef()); - Assertions.assertEquals("ybycnunvj", model.scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentPropertiesTests.java deleted file mode 100644 index baea4ceb25bb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentPropertiesTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentProperties; -import com.azure.resourcemanager.appcontainers.models.DaprMetadata; -import com.azure.resourcemanager.appcontainers.models.Secret; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DaprComponentPropertiesTests { - @Test - public void testDeserialize() { - DaprComponentProperties model = - BinaryData - .fromString( - "{\"componentType\":\"xtqmieoxor\",\"version\":\"ufhyaomtbgh\",\"ignoreErrors\":false,\"initTimeout\":\"rvk\",\"secrets\":[{\"name\":\"jzhpjbibgjmfx\",\"value\":\"vfcluyovwxnbkfe\"},{\"name\":\"xscyhwzdgirujbz\",\"value\":\"mvzzbtdcqvp\"},{\"name\":\"yujviylwdshfssn\",\"value\":\"gy\"},{\"name\":\"rymsgaojfmw\",\"value\":\"otmrfhir\"}],\"secretStoreComponent\":\"ymoxoftpipiwyczu\",\"metadata\":[{\"name\":\"pqjlihhyusps\",\"value\":\"sdvlmfwdgzxulucv\",\"secretRef\":\"mrsreuzvxurisjnh\"}],\"scopes\":[\"xifqjzgxm\",\"hu\"]}") - .toObject(DaprComponentProperties.class); - Assertions.assertEquals("xtqmieoxor", model.componentType()); - Assertions.assertEquals("ufhyaomtbgh", model.version()); - Assertions.assertEquals(false, model.ignoreErrors()); - Assertions.assertEquals("rvk", model.initTimeout()); - Assertions.assertEquals("jzhpjbibgjmfx", model.secrets().get(0).name()); - Assertions.assertEquals("vfcluyovwxnbkfe", model.secrets().get(0).value()); - Assertions.assertEquals("ymoxoftpipiwyczu", model.secretStoreComponent()); - Assertions.assertEquals("pqjlihhyusps", model.metadata().get(0).name()); - Assertions.assertEquals("sdvlmfwdgzxulucv", model.metadata().get(0).value()); - Assertions.assertEquals("mrsreuzvxurisjnh", model.metadata().get(0).secretRef()); - Assertions.assertEquals("xifqjzgxm", model.scopes().get(0)); - } - - @Test - public void testSerialize() { - DaprComponentProperties model = - new DaprComponentProperties() - .withComponentType("xtqmieoxor") - .withVersion("ufhyaomtbgh") - .withIgnoreErrors(false) - .withInitTimeout("rvk") - .withSecrets( - Arrays - .asList( - new Secret().withName("jzhpjbibgjmfx").withValue("vfcluyovwxnbkfe"), - new Secret().withName("xscyhwzdgirujbz").withValue("mvzzbtdcqvp"), - new Secret().withName("yujviylwdshfssn").withValue("gy"), - new Secret().withName("rymsgaojfmw").withValue("otmrfhir"))) - .withSecretStoreComponent("ymoxoftpipiwyczu") - .withMetadata( - Arrays - .asList( - new DaprMetadata() - .withName("pqjlihhyusps") - .withValue("sdvlmfwdgzxulucv") - .withSecretRef("mrsreuzvxurisjnh"))) - .withScopes(Arrays.asList("xifqjzgxm", "hu")); - model = BinaryData.fromObject(model).toObject(DaprComponentProperties.class); - Assertions.assertEquals("xtqmieoxor", model.componentType()); - Assertions.assertEquals("ufhyaomtbgh", model.version()); - Assertions.assertEquals(false, model.ignoreErrors()); - Assertions.assertEquals("rvk", model.initTimeout()); - Assertions.assertEquals("jzhpjbibgjmfx", model.secrets().get(0).name()); - Assertions.assertEquals("vfcluyovwxnbkfe", model.secrets().get(0).value()); - Assertions.assertEquals("ymoxoftpipiwyczu", model.secretStoreComponent()); - Assertions.assertEquals("pqjlihhyusps", model.metadata().get(0).name()); - Assertions.assertEquals("sdvlmfwdgzxulucv", model.metadata().get(0).value()); - Assertions.assertEquals("mrsreuzvxurisjnh", model.metadata().get(0).secretRef()); - Assertions.assertEquals("xifqjzgxm", model.scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCollectionTests.java deleted file mode 100644 index 95372d8cf1fe..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCollectionTests.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.DaprComponentInner; -import com.azure.resourcemanager.appcontainers.models.DaprComponentsCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DaprComponentsCollectionTests { - @Test - public void testDeserialize() { - DaprComponentsCollection model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"componentType\":\"txhojujb\",\"version\":\"elmcuvhixbjxyfw\",\"ignoreErrors\":true,\"initTimeout\":\"coolsttpkiwkkb\",\"secrets\":[],\"secretStoreComponent\":\"rywvtylbfpn\",\"metadata\":[],\"scopes\":[]},\"id\":\"oiwiithtywub\",\"name\":\"cbihwqk\",\"type\":\"fdntwjchrdgoih\"},{\"properties\":{\"componentType\":\"wct\",\"version\":\"dzjlu\",\"ignoreErrors\":false,\"initTimeout\":\"lwg\",\"secrets\":[],\"secretStoreComponent\":\"sb\",\"metadata\":[],\"scopes\":[]},\"id\":\"vtgsei\",\"name\":\"qfi\",\"type\":\"fxqknpirgneptt\"}],\"nextLink\":\"msniffc\"}") - .toObject(DaprComponentsCollection.class); - Assertions.assertEquals("txhojujb", model.value().get(0).componentType()); - Assertions.assertEquals("elmcuvhixbjxyfw", model.value().get(0).version()); - Assertions.assertEquals(true, model.value().get(0).ignoreErrors()); - Assertions.assertEquals("coolsttpkiwkkb", model.value().get(0).initTimeout()); - Assertions.assertEquals("rywvtylbfpn", model.value().get(0).secretStoreComponent()); - } - - @Test - public void testSerialize() { - DaprComponentsCollection model = - new DaprComponentsCollection() - .withValue( - Arrays - .asList( - new DaprComponentInner() - .withComponentType("txhojujb") - .withVersion("elmcuvhixbjxyfw") - .withIgnoreErrors(true) - .withInitTimeout("coolsttpkiwkkb") - .withSecrets(Arrays.asList()) - .withSecretStoreComponent("rywvtylbfpn") - .withMetadata(Arrays.asList()) - .withScopes(Arrays.asList()), - new DaprComponentInner() - .withComponentType("wct") - .withVersion("dzjlu") - .withIgnoreErrors(false) - .withInitTimeout("lwg") - .withSecrets(Arrays.asList()) - .withSecretStoreComponent("sb") - .withMetadata(Arrays.asList()) - .withScopes(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(DaprComponentsCollection.class); - Assertions.assertEquals("txhojujb", model.value().get(0).componentType()); - Assertions.assertEquals("elmcuvhixbjxyfw", model.value().get(0).version()); - Assertions.assertEquals(true, model.value().get(0).ignoreErrors()); - Assertions.assertEquals("coolsttpkiwkkb", model.value().get(0).initTimeout()); - Assertions.assertEquals("rywvtylbfpn", model.value().get(0).secretStoreComponent()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListMockTests.java deleted file mode 100644 index 9c6865d077de..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprComponent; -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 DaprComponentsListMockTests { - @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\":\"ccsrmozihmipgaw\",\"version\":\"xp\",\"ignoreErrors\":true,\"initTimeout\":\"xcjxgrytfmpcy\",\"secrets\":[],\"secretStoreComponent\":\"mcayk\",\"metadata\":[],\"scopes\":[\"uztrksxwpndfcpf\"]},\"id\":\"nthjtwkjaosrxuzv\",\"name\":\"amktcqiosmgbzah\",\"type\":\"xqdlyrtltlapr\"}]}"; - - 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.daprComponents().list("atftgzpnpbsw", "e", Context.NONE); - - Assertions.assertEquals("ccsrmozihmipgaw", response.iterator().next().componentType()); - Assertions.assertEquals("xp", response.iterator().next().version()); - Assertions.assertEquals(true, response.iterator().next().ignoreErrors()); - Assertions.assertEquals("xcjxgrytfmpcy", response.iterator().next().initTimeout()); - Assertions.assertEquals("mcayk", response.iterator().next().secretStoreComponent()); - Assertions.assertEquals("uztrksxwpndfcpf", response.iterator().next().scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprMetadataTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprMetadataTests.java deleted file mode 100644 index c832a2f40fc3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprMetadataTests.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.DaprMetadata; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DaprMetadataTests { - @Test - public void testDeserialize() { - DaprMetadata model = - BinaryData - .fromString("{\"name\":\"wp\",\"value\":\"sutrgjup\",\"secretRef\":\"utpwoqhihejqgw\"}") - .toObject(DaprMetadata.class); - Assertions.assertEquals("wp", model.name()); - Assertions.assertEquals("sutrgjup", model.value()); - Assertions.assertEquals("utpwoqhihejqgw", model.secretRef()); - } - - @Test - public void testSerialize() { - DaprMetadata model = new DaprMetadata().withName("wp").withValue("sutrgjup").withSecretRef("utpwoqhihejqgw"); - model = BinaryData.fromObject(model).toObject(DaprMetadata.class); - Assertions.assertEquals("wp", model.name()); - Assertions.assertEquals("sutrgjup", model.value()); - Assertions.assertEquals("utpwoqhihejqgw", model.secretRef()); - } -} 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 ebe4e04a66a8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretsCollectionInnerTests.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.DaprSecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.Secret; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DaprSecretsCollectionInnerTests { - @Test - public void testDeserialize() { - DaprSecretsCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"fqntcyp\",\"value\":\"jv\"},{\"name\":\"imwkslircizj\",\"value\":\"ydfce\"},{\"name\":\"vlhv\",\"value\":\"dyftumrtwna\"}]}") - .toObject(DaprSecretsCollectionInner.class); - Assertions.assertEquals("fqntcyp", model.value().get(0).name()); - Assertions.assertEquals("jv", model.value().get(0).value()); - } - - @Test - public void testSerialize() { - DaprSecretsCollectionInner model = - new DaprSecretsCollectionInner() - .withValue( - Arrays - .asList( - new Secret().withName("fqntcyp").withValue("jv"), - new Secret().withName("imwkslircizj").withValue("ydfce"), - new Secret().withName("vlhv").withValue("dyftumrtwna"))); - model = BinaryData.fromObject(model).toObject(DaprSecretsCollectionInner.class); - Assertions.assertEquals("fqntcyp", model.value().get(0).name()); - Assertions.assertEquals("jv", model.value().get(0).value()); - } -} 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 3b8027a54a9b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.java +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AppProtocol; -import com.azure.resourcemanager.appcontainers.models.Dapr; -import com.azure.resourcemanager.appcontainers.models.LogLevel; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DaprTests { - @Test - public void testDeserialize() { - Dapr model = - BinaryData - .fromString( - "{\"enabled\":true,\"appId\":\"prwmdyvxqt\",\"appProtocol\":\"http\",\"appPort\":357638492,\"httpReadBufferSize\":438099264,\"httpMaxRequestSize\":1692678524,\"logLevel\":\"debug\",\"enableApiLogging\":true}") - .toObject(Dapr.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("prwmdyvxqt", model.appId()); - Assertions.assertEquals(AppProtocol.HTTP, model.appProtocol()); - Assertions.assertEquals(357638492, model.appPort()); - Assertions.assertEquals(438099264, model.httpReadBufferSize()); - Assertions.assertEquals(1692678524, model.httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.DEBUG, model.logLevel()); - Assertions.assertEquals(true, model.enableApiLogging()); - } - - @Test - public void testSerialize() { - Dapr model = - new Dapr() - .withEnabled(true) - .withAppId("prwmdyvxqt") - .withAppProtocol(AppProtocol.HTTP) - .withAppPort(357638492) - .withHttpReadBufferSize(438099264) - .withHttpMaxRequestSize(1692678524) - .withLogLevel(LogLevel.DEBUG) - .withEnableApiLogging(true); - model = BinaryData.fromObject(model).toObject(Dapr.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("prwmdyvxqt", model.appId()); - Assertions.assertEquals(AppProtocol.HTTP, model.appProtocol()); - Assertions.assertEquals(357638492, model.appPort()); - Assertions.assertEquals(438099264, model.httpReadBufferSize()); - Assertions.assertEquals(1692678524, model.httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.DEBUG, model.logLevel()); - Assertions.assertEquals(true, 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 5df6832f9483..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultAuthorizationPolicyTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AllowedPrincipals; -import com.azure.resourcemanager.appcontainers.models.DefaultAuthorizationPolicy; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DefaultAuthorizationPolicyTests { - @Test - public void testDeserialize() { - DefaultAuthorizationPolicy model = - BinaryData - .fromString( - "{\"allowedPrincipals\":{\"groups\":[\"nohjt\"],\"identities\":[\"h\",\"soifiyipjxsqw\",\"gr\"]},\"allowedApplications\":[\"norcjxvsnbyxqab\",\"mocpc\"]}") - .toObject(DefaultAuthorizationPolicy.class); - Assertions.assertEquals("nohjt", model.allowedPrincipals().groups().get(0)); - Assertions.assertEquals("h", model.allowedPrincipals().identities().get(0)); - Assertions.assertEquals("norcjxvsnbyxqab", model.allowedApplications().get(0)); - } - - @Test - public void testSerialize() { - DefaultAuthorizationPolicy model = - new DefaultAuthorizationPolicy() - .withAllowedPrincipals( - new AllowedPrincipals() - .withGroups(Arrays.asList("nohjt")) - .withIdentities(Arrays.asList("h", "soifiyipjxsqw", "gr"))) - .withAllowedApplications(Arrays.asList("norcjxvsnbyxqab", "mocpc")); - model = BinaryData.fromObject(model).toObject(DefaultAuthorizationPolicy.class); - Assertions.assertEquals("nohjt", model.allowedPrincipals().groups().get(0)); - Assertions.assertEquals("h", model.allowedPrincipals().identities().get(0)); - Assertions.assertEquals("norcjxvsnbyxqab", 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 95594f2e8c2a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultErrorResponseErrorTests.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.DefaultErrorResponseError; -import org.junit.jupiter.api.Test; - -public final class DefaultErrorResponseErrorTests { - @Test - public void testDeserialize() { - DefaultErrorResponseError model = - BinaryData.fromString("{\"innererror\":\"ofqweykhmenevfye\"}").toObject(DefaultErrorResponseError.class); - } - - @Test - public void testSerialize() { - 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 1ff9c37260cb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataPropertyBagItemTests.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.DiagnosticDataProviderMetadataPropertyBagItem; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticDataProviderMetadataPropertyBagItemTests { - @Test - public void testDeserialize() { - DiagnosticDataProviderMetadataPropertyBagItem model = - BinaryData - .fromString("{\"name\":\"egfnmntfpmvmemfn\",\"value\":\"dwvvba\"}") - .toObject(DiagnosticDataProviderMetadataPropertyBagItem.class); - Assertions.assertEquals("egfnmntfpmvmemfn", model.name()); - Assertions.assertEquals("dwvvba", model.value()); - } - - @Test - public void testSerialize() { - DiagnosticDataProviderMetadataPropertyBagItem model = - new DiagnosticDataProviderMetadataPropertyBagItem().withName("egfnmntfpmvmemfn").withValue("dwvvba"); - model = BinaryData.fromObject(model).toObject(DiagnosticDataProviderMetadataPropertyBagItem.class); - Assertions.assertEquals("egfnmntfpmvmemfn", model.name()); - Assertions.assertEquals("dwvvba", 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 6296fe1163cc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataTests.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.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticDataProviderMetadataTests { - @Test - public void testDeserialize() { - DiagnosticDataProviderMetadata model = - BinaryData - .fromString( - "{\"providerName\":\"kkudzp\",\"propertyBag\":[{\"name\":\"plmag\",\"value\":\"cyohpfkyrkdbd\"},{\"name\":\"ogsjkmnwqjno\",\"value\":\"iyhddvi\"}]}") - .toObject(DiagnosticDataProviderMetadata.class); - Assertions.assertEquals("kkudzp", model.providerName()); - Assertions.assertEquals("plmag", model.propertyBag().get(0).name()); - Assertions.assertEquals("cyohpfkyrkdbd", model.propertyBag().get(0).value()); - } - - @Test - public void testSerialize() { - DiagnosticDataProviderMetadata model = - new DiagnosticDataProviderMetadata() - .withProviderName("kkudzp") - .withPropertyBag( - Arrays - .asList( - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("plmag") - .withValue("cyohpfkyrkdbd"), - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("ogsjkmnwqjno") - .withValue("iyhddvi"))); - model = BinaryData.fromObject(model).toObject(DiagnosticDataProviderMetadata.class); - Assertions.assertEquals("kkudzp", model.providerName()); - Assertions.assertEquals("plmag", model.propertyBag().get(0).name()); - Assertions.assertEquals("cyohpfkyrkdbd", 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 495097569ebc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseColumnTests.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.DiagnosticDataTableResponseColumn; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticDataTableResponseColumnTests { - @Test - public void testDeserialize() { - DiagnosticDataTableResponseColumn model = - BinaryData - .fromString("{\"columnName\":\"orbteoy\",\"dataType\":\"hjxa\",\"columnType\":\"vjgsl\"}") - .toObject(DiagnosticDataTableResponseColumn.class); - Assertions.assertEquals("orbteoy", model.columnName()); - Assertions.assertEquals("hjxa", model.dataType()); - Assertions.assertEquals("vjgsl", model.columnType()); - } - - @Test - public void testSerialize() { - DiagnosticDataTableResponseColumn model = - new DiagnosticDataTableResponseColumn() - .withColumnName("orbteoy") - .withDataType("hjxa") - .withColumnType("vjgsl"); - model = BinaryData.fromObject(model).toObject(DiagnosticDataTableResponseColumn.class); - Assertions.assertEquals("orbteoy", model.columnName()); - Assertions.assertEquals("hjxa", model.dataType()); - Assertions.assertEquals("vjgsl", 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 2b8439a752ce..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseObjectTests.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.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; -import org.junit.jupiter.api.Test; - -public final class DiagnosticDataTableResponseObjectTests { - @Test - public void testDeserialize() { - DiagnosticDataTableResponseObject model = - BinaryData - .fromString( - "{\"tableName\":\"xkcgxxlxsffgcvi\",\"columns\":[{\"columnName\":\"wlvwlyoupf\",\"dataType\":\"bkjubdyhgkfmins\",\"columnType\":\"wzf\"},{\"columnName\":\"sttktlahbqa\",\"dataType\":\"xtgzukxitmmqtgqq\",\"columnType\":\"hrnxrxc\"},{\"columnName\":\"uisavokq\",\"dataType\":\"fvazivjlfrqttba\",\"columnType\":\"katnwxyi\"},{\"columnName\":\"id\",\"dataType\":\"qfkuvscxkdmli\",\"columnType\":\"vibrxkpmloazuruo\"}],\"rows\":[]}") - .toObject(DiagnosticDataTableResponseObject.class); - Assertions.assertEquals("xkcgxxlxsffgcvi", model.tableName()); - Assertions.assertEquals("wlvwlyoupf", model.columns().get(0).columnName()); - Assertions.assertEquals("bkjubdyhgkfmins", model.columns().get(0).dataType()); - Assertions.assertEquals("wzf", model.columns().get(0).columnType()); - } - - @Test - public void testSerialize() { - DiagnosticDataTableResponseObject model = - new DiagnosticDataTableResponseObject() - .withTableName("xkcgxxlxsffgcvi") - .withColumns( - Arrays - .asList( - new DiagnosticDataTableResponseColumn() - .withColumnName("wlvwlyoupf") - .withDataType("bkjubdyhgkfmins") - .withColumnType("wzf"), - new DiagnosticDataTableResponseColumn() - .withColumnName("sttktlahbqa") - .withDataType("xtgzukxitmmqtgqq") - .withColumnType("hrnxrxc"), - new DiagnosticDataTableResponseColumn() - .withColumnName("uisavokq") - .withDataType("fvazivjlfrqttba") - .withColumnType("katnwxyi"), - new DiagnosticDataTableResponseColumn() - .withColumnName("id") - .withDataType("qfkuvscxkdmli") - .withColumnType("vibrxkpmloazuruo"))) - .withRows(Arrays.asList()); - model = BinaryData.fromObject(model).toObject(DiagnosticDataTableResponseObject.class); - Assertions.assertEquals("xkcgxxlxsffgcvi", model.tableName()); - Assertions.assertEquals("wlvwlyoupf", model.columns().get(0).columnName()); - Assertions.assertEquals("bkjubdyhgkfmins", model.columns().get(0).dataType()); - Assertions.assertEquals("wzf", 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 57e77db319d4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticRenderingTests.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.DiagnosticRendering; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticRenderingTests { - @Test - public void testDeserialize() { - DiagnosticRendering model = - BinaryData - .fromString( - "{\"type\":1644045294,\"title\":\"lmywwtkgkxnyed\",\"description\":\"gyvudtjuewbc\",\"isVisible\":false}") - .toObject(DiagnosticRendering.class); - Assertions.assertEquals(1644045294, model.type()); - Assertions.assertEquals("lmywwtkgkxnyed", model.title()); - Assertions.assertEquals("gyvudtjuewbc", model.description()); - Assertions.assertEquals(false, model.isVisible()); - } - - @Test - public void testSerialize() { - DiagnosticRendering model = - new DiagnosticRendering() - .withType(1644045294) - .withTitle("lmywwtkgkxnyed") - .withDescription("gyvudtjuewbc") - .withIsVisible(false); - model = BinaryData.fromObject(model).toObject(DiagnosticRendering.class); - Assertions.assertEquals(1644045294, model.type()); - Assertions.assertEquals("lmywwtkgkxnyed", model.title()); - Assertions.assertEquals("gyvudtjuewbc", model.description()); - Assertions.assertEquals(false, model.isVisible()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java deleted file mode 100644 index cc714f85b1c3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.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.DiagnosticSupportTopic; -import org.junit.jupiter.api.Test; - -public final class DiagnosticSupportTopicTests { - @Test - public void testDeserialize() { - DiagnosticSupportTopic model = - BinaryData - .fromString("{\"id\":\"wjhhgdnhxmsivf\",\"pesId\":\"iloxggdufiq\"}") - .toObject(DiagnosticSupportTopic.class); - } - - @Test - public void testSerialize() { - 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 7a2a5be7570a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsCollectionInnerTests.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.DiagnosticsCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - -public final class DiagnosticsCollectionInnerTests { - @Test - public void testDeserialize() { - DiagnosticsCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"dataset\":[]},\"id\":\"ojgcyzt\",\"name\":\"fmznba\",\"type\":\"qphchqnrnrpxehuw\"}],\"nextLink\":\"k\"}") - .toObject(DiagnosticsCollectionInner.class); - } - - @Test - public void testSerialize() { - DiagnosticsCollectionInner model = - new DiagnosticsCollectionInner() - .withValue( - Arrays - .asList( - new DiagnosticsInner() - .withProperties(new DiagnosticsProperties().withDataset(Arrays.asList())))); - model = BinaryData.fromObject(model).toObject(DiagnosticsCollectionInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java deleted file mode 100644 index 04a2ef5693cd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.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; -import org.junit.jupiter.api.Test; - -public final class DiagnosticsDataApiResponseTests { - @Test - public void testDeserialize() { - DiagnosticsDataApiResponse model = - BinaryData - .fromString( - "{\"table\":{\"tableName\":\"euzaof\",\"columns\":[{\"columnName\":\"cyyysfgdot\",\"dataType\":\"biipuip\",\"columnType\":\"qonmacj\"},{\"columnName\":\"nizshqvcim\",\"dataType\":\"vfgmblrrilby\",\"columnType\":\"xsmiccwrwfscjf\"},{\"columnName\":\"nszqujiz\",\"dataType\":\"oqytibyowbblgy\",\"columnType\":\"utp\"}],\"rows\":[]},\"renderingProperties\":{\"type\":1814921702,\"title\":\"smsks\",\"description\":\"iml\",\"isVisible\":true}}") - .toObject(DiagnosticsDataApiResponse.class); - Assertions.assertEquals("euzaof", model.table().tableName()); - Assertions.assertEquals("cyyysfgdot", model.table().columns().get(0).columnName()); - Assertions.assertEquals("biipuip", model.table().columns().get(0).dataType()); - Assertions.assertEquals("qonmacj", model.table().columns().get(0).columnType()); - Assertions.assertEquals(1814921702, model.renderingProperties().type()); - Assertions.assertEquals("smsks", model.renderingProperties().title()); - Assertions.assertEquals("iml", model.renderingProperties().description()); - Assertions.assertEquals(true, model.renderingProperties().isVisible()); - } - - @Test - public void testSerialize() { - DiagnosticsDataApiResponse model = - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("euzaof") - .withColumns( - Arrays - .asList( - new DiagnosticDataTableResponseColumn() - .withColumnName("cyyysfgdot") - .withDataType("biipuip") - .withColumnType("qonmacj"), - new DiagnosticDataTableResponseColumn() - .withColumnName("nizshqvcim") - .withDataType("vfgmblrrilby") - .withColumnType("xsmiccwrwfscjf"), - new DiagnosticDataTableResponseColumn() - .withColumnName("nszqujiz") - .withDataType("oqytibyowbblgy") - .withColumnType("utp"))) - .withRows(Arrays.asList())) - .withRenderingProperties( - new DiagnosticRendering() - .withType(1814921702) - .withTitle("smsks") - .withDescription("iml") - .withIsVisible(true)); - model = BinaryData.fromObject(model).toObject(DiagnosticsDataApiResponse.class); - Assertions.assertEquals("euzaof", model.table().tableName()); - Assertions.assertEquals("cyyysfgdot", model.table().columns().get(0).columnName()); - Assertions.assertEquals("biipuip", model.table().columns().get(0).dataType()); - Assertions.assertEquals("qonmacj", model.table().columns().get(0).columnType()); - Assertions.assertEquals(1814921702, model.renderingProperties().type()); - Assertions.assertEquals("smsks", model.renderingProperties().title()); - Assertions.assertEquals("iml", model.renderingProperties().description()); - Assertions.assertEquals(true, 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 bc2f584110f8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDefinitionTests.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.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticsDefinitionTests { - @Test - public void testDeserialize() { - DiagnosticsDefinition model = - BinaryData - .fromString( - "{\"id\":\"wmd\",\"name\":\"wpklvxw\",\"description\":\"gdxpg\",\"author\":\"chisze\",\"category\":\"nb\",\"supportTopicList\":[{\"id\":\"gibbdaxc\",\"pesId\":\"fozauorsuk\"},{\"id\":\"wbqpl\",\"pesId\":\"vnuuepzl\"}],\"analysisTypes\":[\"wzsoldweyuqdunv\"],\"type\":\"nrwrbiork\",\"score\":33.805977}") - .toObject(DiagnosticsDefinition.class); - Assertions.assertEquals("wzsoldweyuqdunv", model.analysisTypes().get(0)); - } - - @Test - public void testSerialize() { - DiagnosticsDefinition model = - new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic(), new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("wzsoldweyuqdunv")); - model = BinaryData.fromObject(model).toObject(DiagnosticsDefinition.class); - Assertions.assertEquals("wzsoldweyuqdunv", 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 f69f93b1b094..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsInnerTests.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.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticsInnerTests { - @Test - public void testDeserialize() { - DiagnosticsInner model = - BinaryData - .fromString( - "{\"properties\":{\"metadata\":{\"id\":\"fmviklby\",\"name\":\"khbejdznxc\",\"description\":\"srhnjivo\",\"author\":\"tnovqfzgemjdftul\",\"category\":\"tduceamt\",\"supportTopicList\":[],\"analysisTypes\":[\"m\"],\"type\":\"wcw\",\"score\":57.057808},\"dataset\":[{},{},{}],\"status\":{\"message\":\"sv\",\"statusId\":750225964},\"dataProviderMetadata\":{\"providerName\":\"vk\",\"propertyBag\":[]}},\"id\":\"ql\",\"name\":\"yxgtczh\",\"type\":\"ydbsd\"}") - .toObject(DiagnosticsInner.class); - Assertions.assertEquals("m", model.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("sv", model.properties().status().message()); - Assertions.assertEquals(750225964, model.properties().status().statusId()); - Assertions.assertEquals("vk", model.properties().dataProviderMetadata().providerName()); - } - - @Test - public void testSerialize() { - DiagnosticsInner model = - new DiagnosticsInner() - .withProperties( - new DiagnosticsProperties() - .withMetadata( - new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList()) - .withAnalysisTypes(Arrays.asList("m"))) - .withDataset( - Arrays - .asList( - new DiagnosticsDataApiResponse(), - new DiagnosticsDataApiResponse(), - new DiagnosticsDataApiResponse())) - .withStatus(new DiagnosticsStatus().withMessage("sv").withStatusId(750225964)) - .withDataProviderMetadata( - new DiagnosticDataProviderMetadata() - .withProviderName("vk") - .withPropertyBag(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(DiagnosticsInner.class); - Assertions.assertEquals("m", model.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("sv", model.properties().status().message()); - Assertions.assertEquals(750225964, model.properties().status().statusId()); - Assertions.assertEquals("vk", model.properties().dataProviderMetadata().providerName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java deleted file mode 100644 index ead64e3b0d1a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticsPropertiesTests { - @Test - public void testDeserialize() { - DiagnosticsProperties model = - BinaryData - .fromString( - "{\"metadata\":{\"id\":\"kx\",\"name\":\"ehvbbxurip\",\"description\":\"fnhtbaxkgxyw\",\"author\":\"kpyklyhp\",\"category\":\"odpvruudlgzib\",\"supportTopicList\":[{\"id\":\"tgk\",\"pesId\":\"tvdxeclzedqb\"},{\"id\":\"hzlhplodqkdlww\",\"pesId\":\"bum\"}],\"analysisTypes\":[\"trqjfsmlmbtx\",\"w\"],\"type\":\"wsrt\",\"score\":70.81028},\"dataset\":[{\"table\":{\"tableName\":\"rhubskhud\",\"columns\":[],\"rows\":[]},\"renderingProperties\":{\"type\":328293320,\"title\":\"qfqjbvleorfm\",\"description\":\"iqtqzfavyvnq\",\"isVisible\":false}},{\"table\":{\"tableName\":\"yeua\",\"columns\":[],\"rows\":[]},\"renderingProperties\":{\"type\":1625919856,\"title\":\"gzslesjcbhernnti\",\"description\":\"djc\",\"isVisible\":true}},{\"table\":{\"tableName\":\"rbe\",\"columns\":[],\"rows\":[]},\"renderingProperties\":{\"type\":52673301,\"title\":\"uffkmrqemvvh\",\"description\":\"tdrjfutacoebj\",\"isVisible\":true}}],\"status\":{\"message\":\"jznmwcpmguaa\",\"statusId\":1984994243},\"dataProviderMetadata\":{\"providerName\":\"actkahzovajj\",\"propertyBag\":[{\"name\":\"xps\",\"value\":\"eekulfgslqubkwd\"},{\"name\":\"nrdsutujbazpjuoh\",\"value\":\"nyfln\"}]}}") - .toObject(DiagnosticsProperties.class); - Assertions.assertEquals("trqjfsmlmbtx", model.metadata().analysisTypes().get(0)); - Assertions.assertEquals("rhubskhud", model.dataset().get(0).table().tableName()); - Assertions.assertEquals(328293320, model.dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("qfqjbvleorfm", model.dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("iqtqzfavyvnq", model.dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(false, model.dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("jznmwcpmguaa", model.status().message()); - Assertions.assertEquals(1984994243, model.status().statusId()); - Assertions.assertEquals("actkahzovajj", model.dataProviderMetadata().providerName()); - Assertions.assertEquals("xps", model.dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("eekulfgslqubkwd", model.dataProviderMetadata().propertyBag().get(0).value()); - } - - @Test - public void testSerialize() { - DiagnosticsProperties model = - new DiagnosticsProperties() - .withMetadata( - new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic(), new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("trqjfsmlmbtx", "w"))) - .withDataset( - Arrays - .asList( - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("rhubskhud") - .withColumns(Arrays.asList()) - .withRows(Arrays.asList())) - .withRenderingProperties( - new DiagnosticRendering() - .withType(328293320) - .withTitle("qfqjbvleorfm") - .withDescription("iqtqzfavyvnq") - .withIsVisible(false)), - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("yeua") - .withColumns(Arrays.asList()) - .withRows(Arrays.asList())) - .withRenderingProperties( - new DiagnosticRendering() - .withType(1625919856) - .withTitle("gzslesjcbhernnti") - .withDescription("djc") - .withIsVisible(true)), - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("rbe") - .withColumns(Arrays.asList()) - .withRows(Arrays.asList())) - .withRenderingProperties( - new DiagnosticRendering() - .withType(52673301) - .withTitle("uffkmrqemvvh") - .withDescription("tdrjfutacoebj") - .withIsVisible(true)))) - .withStatus(new DiagnosticsStatus().withMessage("jznmwcpmguaa").withStatusId(1984994243)) - .withDataProviderMetadata( - new DiagnosticDataProviderMetadata() - .withProviderName("actkahzovajj") - .withPropertyBag( - Arrays - .asList( - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("xps") - .withValue("eekulfgslqubkwd"), - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("nrdsutujbazpjuoh") - .withValue("nyfln")))); - model = BinaryData.fromObject(model).toObject(DiagnosticsProperties.class); - Assertions.assertEquals("trqjfsmlmbtx", model.metadata().analysisTypes().get(0)); - Assertions.assertEquals("rhubskhud", model.dataset().get(0).table().tableName()); - Assertions.assertEquals(328293320, model.dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("qfqjbvleorfm", model.dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("iqtqzfavyvnq", model.dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(false, model.dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("jznmwcpmguaa", model.status().message()); - Assertions.assertEquals(1984994243, model.status().statusId()); - Assertions.assertEquals("actkahzovajj", model.dataProviderMetadata().providerName()); - Assertions.assertEquals("xps", model.dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("eekulfgslqubkwd", 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 f99b750e5ba0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsStatusTests.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.DiagnosticsStatus; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class DiagnosticsStatusTests { - @Test - public void testDeserialize() { - DiagnosticsStatus model = - BinaryData - .fromString("{\"message\":\"uwhcjyxccybv\",\"statusId\":940165825}") - .toObject(DiagnosticsStatus.class); - Assertions.assertEquals("uwhcjyxccybv", model.message()); - Assertions.assertEquals(940165825, model.statusId()); - } - - @Test - public void testSerialize() { - DiagnosticsStatus model = new DiagnosticsStatus().withMessage("uwhcjyxccybv").withStatusId(940165825); - model = BinaryData.fromObject(model).toObject(DiagnosticsStatus.class); - Assertions.assertEquals("uwhcjyxccybv", model.message()); - Assertions.assertEquals(940165825, model.statusId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentSkuPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentSkuPropertiesTests.java deleted file mode 100644 index 20e81e02a3b1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentSkuPropertiesTests.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.EnvironmentSkuProperties; -import com.azure.resourcemanager.appcontainers.models.SkuName; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class EnvironmentSkuPropertiesTests { - @Test - public void testDeserialize() { - EnvironmentSkuProperties model = - BinaryData.fromString("{\"name\":\"Consumption\"}").toObject(EnvironmentSkuProperties.class); - Assertions.assertEquals(SkuName.CONSUMPTION, model.name()); - } - - @Test - public void testSerialize() { - EnvironmentSkuProperties model = new EnvironmentSkuProperties().withName(SkuName.CONSUMPTION); - model = BinaryData.fromObject(model).toObject(EnvironmentSkuProperties.class); - Assertions.assertEquals(SkuName.CONSUMPTION, model.name()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentVarTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentVarTests.java deleted file mode 100644 index c3a507f7eeb2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/EnvironmentVarTests.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.EnvironmentVar; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class EnvironmentVarTests { - @Test - public void testDeserialize() { - EnvironmentVar model = - BinaryData - .fromString("{\"name\":\"washr\",\"value\":\"tkcnqxwb\",\"secretRef\":\"kulpiujwaasi\"}") - .toObject(EnvironmentVar.class); - Assertions.assertEquals("washr", model.name()); - Assertions.assertEquals("tkcnqxwb", model.value()); - Assertions.assertEquals("kulpiujwaasi", model.secretRef()); - } - - @Test - public void testSerialize() { - EnvironmentVar model = - new EnvironmentVar().withName("washr").withValue("tkcnqxwb").withSecretRef("kulpiujwaasi"); - model = BinaryData.fromObject(model).toObject(EnvironmentVar.class); - Assertions.assertEquals("washr", model.name()); - Assertions.assertEquals("tkcnqxwb", model.value()); - Assertions.assertEquals("kulpiujwaasi", model.secretRef()); - } -} 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 e6683542350b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.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.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ExtendedLocationTests { - @Test - public void testDeserialize() { - ExtendedLocation model = - BinaryData - .fromString("{\"name\":\"wrmjmwvvjektc\",\"type\":\"CustomLocation\"}") - .toObject(ExtendedLocation.class); - Assertions.assertEquals("wrmjmwvvjektc", model.name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.type()); - } - - @Test - public void testSerialize() { - ExtendedLocation model = - new ExtendedLocation().withName("wrmjmwvvjektc").withType(ExtendedLocationTypes.CUSTOM_LOCATION); - model = BinaryData.fromObject(model).toObject(ExtendedLocation.class); - Assertions.assertEquals("wrmjmwvvjektc", 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/FacebookTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/FacebookTests.java deleted file mode 100644 index 42ca4bdea2c1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/FacebookTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AppRegistration; -import com.azure.resourcemanager.appcontainers.models.Facebook; -import com.azure.resourcemanager.appcontainers.models.LoginScopes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class FacebookTests { - @Test - public void testDeserialize() { - Facebook model = - BinaryData - .fromString( - "{\"enabled\":false,\"registration\":{\"appId\":\"yulpkudjkr\",\"appSecretSettingName\":\"hbzhfepg\"},\"graphApiVersion\":\"qex\",\"login\":{\"scopes\":[\"xscpaierhhbc\"]}}") - .toObject(Facebook.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("yulpkudjkr", model.registration().appId()); - Assertions.assertEquals("hbzhfepg", model.registration().appSecretSettingName()); - Assertions.assertEquals("qex", model.graphApiVersion()); - Assertions.assertEquals("xscpaierhhbc", model.login().scopes().get(0)); - } - - @Test - public void testSerialize() { - Facebook model = - new Facebook() - .withEnabled(false) - .withRegistration(new AppRegistration().withAppId("yulpkudjkr").withAppSecretSettingName("hbzhfepg")) - .withGraphApiVersion("qex") - .withLogin(new LoginScopes().withScopes(Arrays.asList("xscpaierhhbc"))); - model = BinaryData.fromObject(model).toObject(Facebook.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("yulpkudjkr", model.registration().appId()); - Assertions.assertEquals("hbzhfepg", model.registration().appSecretSettingName()); - Assertions.assertEquals("qex", model.graphApiVersion()); - Assertions.assertEquals("xscpaierhhbc", model.login().scopes().get(0)); - } -} 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 34afcea8f5c4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ForwardProxyTests.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.ForwardProxy; -import com.azure.resourcemanager.appcontainers.models.ForwardProxyConvention; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ForwardProxyTests { - @Test - public void testDeserialize() { - ForwardProxy model = - BinaryData - .fromString( - "{\"convention\":\"Custom\",\"customHostHeaderName\":\"jdyggdtji\",\"customProtoHeaderName\":\"b\"}") - .toObject(ForwardProxy.class); - Assertions.assertEquals(ForwardProxyConvention.CUSTOM, model.convention()); - Assertions.assertEquals("jdyggdtji", model.customHostHeaderName()); - Assertions.assertEquals("b", model.customProtoHeaderName()); - } - - @Test - public void testSerialize() { - ForwardProxy model = - new ForwardProxy() - .withConvention(ForwardProxyConvention.CUSTOM) - .withCustomHostHeaderName("jdyggdtji") - .withCustomProtoHeaderName("b"); - model = BinaryData.fromObject(model).toObject(ForwardProxy.class); - Assertions.assertEquals(ForwardProxyConvention.CUSTOM, model.convention()); - Assertions.assertEquals("jdyggdtji", model.customHostHeaderName()); - Assertions.assertEquals("b", model.customProtoHeaderName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GitHubTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GitHubTests.java deleted file mode 100644 index f8ffb579c3cb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GitHubTests.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.ClientRegistration; -import com.azure.resourcemanager.appcontainers.models.GitHub; -import com.azure.resourcemanager.appcontainers.models.LoginScopes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class GitHubTests { - @Test - public void testDeserialize() { - GitHub model = - BinaryData - .fromString( - "{\"enabled\":true,\"registration\":{\"clientId\":\"mvdjwzrlovmc\",\"clientSecretSettingName\":\"hijco\"},\"login\":{\"scopes\":[\"bzaqsqsycbkbfk\",\"ukdkexxppofmxa\",\"c\",\"jpgd\"]}}") - .toObject(GitHub.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("mvdjwzrlovmc", model.registration().clientId()); - Assertions.assertEquals("hijco", model.registration().clientSecretSettingName()); - Assertions.assertEquals("bzaqsqsycbkbfk", model.login().scopes().get(0)); - } - - @Test - public void testSerialize() { - GitHub model = - new GitHub() - .withEnabled(true) - .withRegistration( - new ClientRegistration().withClientId("mvdjwzrlovmc").withClientSecretSettingName("hijco")) - .withLogin( - new LoginScopes().withScopes(Arrays.asList("bzaqsqsycbkbfk", "ukdkexxppofmxa", "c", "jpgd"))); - model = BinaryData.fromObject(model).toObject(GitHub.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("mvdjwzrlovmc", model.registration().clientId()); - Assertions.assertEquals("hijco", model.registration().clientSecretSettingName()); - Assertions.assertEquals("bzaqsqsycbkbfk", model.login().scopes().get(0)); - } -} 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 10020a6f8e96..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GlobalValidationTests.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.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class GlobalValidationTests { - @Test - public void testDeserialize() { - GlobalValidation model = - BinaryData - .fromString( - "{\"unauthenticatedClientAction\":\"AllowAnonymous\",\"redirectToProvider\":\"qnjaqwix\",\"excludedPaths\":[\"r\",\"zvcputegjvwmfda\",\"scmdvpjhulsuu\",\"mkjozkrwf\"]}") - .toObject(GlobalValidation.class); - Assertions.assertEquals(UnauthenticatedClientActionV2.ALLOW_ANONYMOUS, model.unauthenticatedClientAction()); - Assertions.assertEquals("qnjaqwix", model.redirectToProvider()); - Assertions.assertEquals("r", model.excludedPaths().get(0)); - } - - @Test - public void testSerialize() { - GlobalValidation model = - new GlobalValidation() - .withUnauthenticatedClientAction(UnauthenticatedClientActionV2.ALLOW_ANONYMOUS) - .withRedirectToProvider("qnjaqwix") - .withExcludedPaths(Arrays.asList("r", "zvcputegjvwmfda", "scmdvpjhulsuu", "mkjozkrwf")); - model = BinaryData.fromObject(model).toObject(GlobalValidation.class); - Assertions.assertEquals(UnauthenticatedClientActionV2.ALLOW_ANONYMOUS, model.unauthenticatedClientAction()); - Assertions.assertEquals("qnjaqwix", model.redirectToProvider()); - Assertions.assertEquals("r", model.excludedPaths().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GoogleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GoogleTests.java deleted file mode 100644 index 179b069ab5f6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GoogleTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AllowedAudiencesValidation; -import com.azure.resourcemanager.appcontainers.models.ClientRegistration; -import com.azure.resourcemanager.appcontainers.models.Google; -import com.azure.resourcemanager.appcontainers.models.LoginScopes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class GoogleTests { - @Test - public void testDeserialize() { - Google model = - BinaryData - .fromString( - "{\"enabled\":true,\"registration\":{\"clientId\":\"dntwndeicbtw\",\"clientSecretSettingName\":\"zao\"},\"login\":{\"scopes\":[\"rhcffcydd\",\"lmjthjq\",\"wpyeicxmqciwqvh\",\"hix\"]},\"validation\":{\"allowedAudiences\":[\"topbobjogh\",\"e\"]}}") - .toObject(Google.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("dntwndeicbtw", model.registration().clientId()); - Assertions.assertEquals("zao", model.registration().clientSecretSettingName()); - Assertions.assertEquals("rhcffcydd", model.login().scopes().get(0)); - Assertions.assertEquals("topbobjogh", model.validation().allowedAudiences().get(0)); - } - - @Test - public void testSerialize() { - Google model = - new Google() - .withEnabled(true) - .withRegistration( - new ClientRegistration().withClientId("dntwndeicbtw").withClientSecretSettingName("zao")) - .withLogin( - new LoginScopes().withScopes(Arrays.asList("rhcffcydd", "lmjthjq", "wpyeicxmqciwqvh", "hix"))) - .withValidation( - new AllowedAudiencesValidation().withAllowedAudiences(Arrays.asList("topbobjogh", "e"))); - model = BinaryData.fromObject(model).toObject(Google.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("dntwndeicbtw", model.registration().clientId()); - Assertions.assertEquals("zao", model.registration().clientSecretSettingName()); - Assertions.assertEquals("rhcffcydd", model.login().scopes().get(0)); - Assertions.assertEquals("topbobjogh", model.validation().allowedAudiences().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpScaleRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpScaleRuleTests.java deleted file mode 100644 index b7b63122ec5d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpScaleRuleTests.java +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.HttpScaleRule; -import com.azure.resourcemanager.appcontainers.models.ScaleRuleAuth; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class HttpScaleRuleTests { - @Test - public void testDeserialize() { - HttpScaleRule model = - BinaryData - .fromString( - "{\"metadata\":{\"x\":\"zuf\",\"khazxkhnzbonlwn\":\"iqopidoamciod\",\"szzcmrvexztv\":\"oegokdwbwh\",\"gsfraoyzkoow\":\"t\"},\"auth\":[{\"secretRef\":\"guxawqaldsyuuxi\",\"triggerParameter\":\"rqf\"},{\"secretRef\":\"wyznkbyku\",\"triggerParameter\":\"pfhpagmhrskdsnfd\"},{\"secretRef\":\"oakgtdlmkkzev\",\"triggerParameter\":\"hewpusdsttwv\"},{\"secretRef\":\"vbbejdcng\",\"triggerParameter\":\"m\"}]}") - .toObject(HttpScaleRule.class); - Assertions.assertEquals("zuf", model.metadata().get("x")); - Assertions.assertEquals("guxawqaldsyuuxi", model.auth().get(0).secretRef()); - Assertions.assertEquals("rqf", model.auth().get(0).triggerParameter()); - } - - @Test - public void testSerialize() { - HttpScaleRule model = - new HttpScaleRule() - .withMetadata( - mapOf( - "x", - "zuf", - "khazxkhnzbonlwn", - "iqopidoamciod", - "szzcmrvexztv", - "oegokdwbwh", - "gsfraoyzkoow", - "t")) - .withAuth( - Arrays - .asList( - new ScaleRuleAuth().withSecretRef("guxawqaldsyuuxi").withTriggerParameter("rqf"), - new ScaleRuleAuth().withSecretRef("wyznkbyku").withTriggerParameter("pfhpagmhrskdsnfd"), - new ScaleRuleAuth().withSecretRef("oakgtdlmkkzev").withTriggerParameter("hewpusdsttwv"), - new ScaleRuleAuth().withSecretRef("vbbejdcng").withTriggerParameter("m"))); - model = BinaryData.fromObject(model).toObject(HttpScaleRule.class); - Assertions.assertEquals("zuf", model.metadata().get("x")); - Assertions.assertEquals("guxawqaldsyuuxi", model.auth().get(0).secretRef()); - Assertions.assertEquals("rqf", model.auth().get(0).triggerParameter()); - } - - @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/HttpSettingsRoutesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.java deleted file mode 100644 index 3c0b760a04e2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.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.HttpSettingsRoutes; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class HttpSettingsRoutesTests { - @Test - public void testDeserialize() { - HttpSettingsRoutes model = - BinaryData.fromString("{\"apiPrefix\":\"ujjugwdkcglh\"}").toObject(HttpSettingsRoutes.class); - Assertions.assertEquals("ujjugwdkcglh", model.apiPrefix()); - } - - @Test - public void testSerialize() { - HttpSettingsRoutes model = new HttpSettingsRoutes().withApiPrefix("ujjugwdkcglh"); - model = BinaryData.fromObject(model).toObject(HttpSettingsRoutes.class); - Assertions.assertEquals("ujjugwdkcglh", 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 eca2bf69f4de..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsTests.java +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.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; -import org.junit.jupiter.api.Test; - -public final class HttpSettingsTests { - @Test - public void testDeserialize() { - HttpSettings model = - BinaryData - .fromString( - "{\"requireHttps\":false,\"routes\":{\"apiPrefix\":\"zwdejbavor\"},\"forwardProxy\":{\"convention\":\"NoProxy\",\"customHostHeaderName\":\"hctbqvudwxdn\",\"customProtoHeaderName\":\"vo\"}}") - .toObject(HttpSettings.class); - Assertions.assertEquals(false, model.requireHttps()); - Assertions.assertEquals("zwdejbavor", model.routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.forwardProxy().convention()); - Assertions.assertEquals("hctbqvudwxdn", model.forwardProxy().customHostHeaderName()); - Assertions.assertEquals("vo", model.forwardProxy().customProtoHeaderName()); - } - - @Test - public void testSerialize() { - HttpSettings model = - new HttpSettings() - .withRequireHttps(false) - .withRoutes(new HttpSettingsRoutes().withApiPrefix("zwdejbavor")) - .withForwardProxy( - new ForwardProxy() - .withConvention(ForwardProxyConvention.NO_PROXY) - .withCustomHostHeaderName("hctbqvudwxdn") - .withCustomProtoHeaderName("vo")); - model = BinaryData.fromObject(model).toObject(HttpSettings.class); - Assertions.assertEquals(false, model.requireHttps()); - Assertions.assertEquals("zwdejbavor", model.routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.forwardProxy().convention()); - Assertions.assertEquals("hctbqvudwxdn", model.forwardProxy().customHostHeaderName()); - Assertions.assertEquals("vo", model.forwardProxy().customProtoHeaderName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressTests.java deleted file mode 100644 index 13301ab6eee7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressTests.java +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Action; -import com.azure.resourcemanager.appcontainers.models.BindingType; -import com.azure.resourcemanager.appcontainers.models.CustomDomain; -import com.azure.resourcemanager.appcontainers.models.Ingress; -import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; -import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; -import com.azure.resourcemanager.appcontainers.models.TrafficWeight; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class IngressTests { - @Test - public void testDeserialize() { - Ingress model = - BinaryData - .fromString( - "{\"fqdn\":\"rqhakauha\",\"external\":true,\"targetPort\":706986266,\"exposedPort\":949379958,\"transport\":\"http\",\"traffic\":[{\"revisionName\":\"cugicjoox\",\"weight\":554056666,\"latestRevision\":true,\"label\":\"ucww\"}],\"customDomains\":[{\"name\":\"vbvmeu\",\"bindingType\":\"SniEnabled\",\"certificateId\":\"vyhzceuojgjrwj\"},{\"name\":\"eiotwmcdytdx\",\"bindingType\":\"Disabled\",\"certificateId\":\"xnrj\"},{\"name\":\"wgqwgxhn\",\"bindingType\":\"SniEnabled\",\"certificateId\":\"x\"}],\"allowInsecure\":true,\"ipSecurityRestrictions\":[{\"name\":\"cg\",\"description\":\"wndnhj\",\"ipAddressRange\":\"auwhvylwzbtdhx\",\"action\":\"Allow\"}]}") - .toObject(Ingress.class); - Assertions.assertEquals(true, model.external()); - Assertions.assertEquals(706986266, model.targetPort()); - Assertions.assertEquals(949379958, model.exposedPort()); - Assertions.assertEquals(IngressTransportMethod.HTTP, model.transport()); - Assertions.assertEquals("cugicjoox", model.traffic().get(0).revisionName()); - Assertions.assertEquals(554056666, model.traffic().get(0).weight()); - Assertions.assertEquals(true, model.traffic().get(0).latestRevision()); - Assertions.assertEquals("ucww", model.traffic().get(0).label()); - Assertions.assertEquals("vbvmeu", model.customDomains().get(0).name()); - Assertions.assertEquals(BindingType.SNI_ENABLED, model.customDomains().get(0).bindingType()); - Assertions.assertEquals("vyhzceuojgjrwj", model.customDomains().get(0).certificateId()); - Assertions.assertEquals(true, model.allowInsecure()); - Assertions.assertEquals("cg", model.ipSecurityRestrictions().get(0).name()); - Assertions.assertEquals("wndnhj", model.ipSecurityRestrictions().get(0).description()); - Assertions.assertEquals("auwhvylwzbtdhx", model.ipSecurityRestrictions().get(0).ipAddressRange()); - Assertions.assertEquals(Action.ALLOW, model.ipSecurityRestrictions().get(0).action()); - } - - @Test - public void testSerialize() { - Ingress model = - new Ingress() - .withExternal(true) - .withTargetPort(706986266) - .withExposedPort(949379958) - .withTransport(IngressTransportMethod.HTTP) - .withTraffic( - Arrays - .asList( - new TrafficWeight() - .withRevisionName("cugicjoox") - .withWeight(554056666) - .withLatestRevision(true) - .withLabel("ucww"))) - .withCustomDomains( - Arrays - .asList( - new CustomDomain() - .withName("vbvmeu") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId("vyhzceuojgjrwj"), - new CustomDomain() - .withName("eiotwmcdytdx") - .withBindingType(BindingType.DISABLED) - .withCertificateId("xnrj"), - new CustomDomain() - .withName("wgqwgxhn") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId("x"))) - .withAllowInsecure(true) - .withIpSecurityRestrictions( - Arrays - .asList( - new IpSecurityRestrictionRule() - .withName("cg") - .withDescription("wndnhj") - .withIpAddressRange("auwhvylwzbtdhx") - .withAction(Action.ALLOW))); - model = BinaryData.fromObject(model).toObject(Ingress.class); - Assertions.assertEquals(true, model.external()); - Assertions.assertEquals(706986266, model.targetPort()); - Assertions.assertEquals(949379958, model.exposedPort()); - Assertions.assertEquals(IngressTransportMethod.HTTP, model.transport()); - Assertions.assertEquals("cugicjoox", model.traffic().get(0).revisionName()); - Assertions.assertEquals(554056666, model.traffic().get(0).weight()); - Assertions.assertEquals(true, model.traffic().get(0).latestRevision()); - Assertions.assertEquals("ucww", model.traffic().get(0).label()); - Assertions.assertEquals("vbvmeu", model.customDomains().get(0).name()); - Assertions.assertEquals(BindingType.SNI_ENABLED, model.customDomains().get(0).bindingType()); - Assertions.assertEquals("vyhzceuojgjrwj", model.customDomains().get(0).certificateId()); - Assertions.assertEquals(true, model.allowInsecure()); - Assertions.assertEquals("cg", model.ipSecurityRestrictions().get(0).name()); - Assertions.assertEquals("wndnhj", model.ipSecurityRestrictions().get(0).description()); - Assertions.assertEquals("auwhvylwzbtdhx", model.ipSecurityRestrictions().get(0).ipAddressRange()); - Assertions.assertEquals(Action.ALLOW, model.ipSecurityRestrictions().get(0).action()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/InitContainerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/InitContainerTests.java deleted file mode 100644 index af16468c0e50..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/InitContainerTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVar; -import com.azure.resourcemanager.appcontainers.models.InitContainer; -import com.azure.resourcemanager.appcontainers.models.VolumeMount; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class InitContainerTests { - @Test - public void testDeserialize() { - InitContainer model = - BinaryData - .fromString( - "{\"image\":\"ogqxndlkzgxhuri\",\"name\":\"bpodxunkbebxm\",\"command\":[\"yntwlrbq\",\"koievseo\"],\"args\":[\"rlltmuwlauwzizx\"],\"env\":[{\"name\":\"cjefuzmu\",\"value\":\"bttdumorppxe\",\"secretRef\":\"nzbtbhj\"},{\"name\":\"lkfg\",\"value\":\"dneu\",\"secretRef\":\"fphsdyhtozfikdow\"},{\"name\":\"uuvxz\",\"value\":\"lvithhqzonosgg\",\"secretRef\":\"c\"}],\"resources\":{\"cpu\":61.21975235277173,\"memory\":\"jnkaljutiiswacff\",\"ephemeralStorage\":\"k\"},\"volumeMounts\":[{\"volumeName\":\"kfvhqcrailvpn\",\"mountPath\":\"fuflrwdmhdlx\"},{\"volumeName\":\"rxsagafcnihgwqa\",\"mountPath\":\"edgfbcvkcvq\"},{\"volumeName\":\"keqdcvdrhvoods\",\"mountPath\":\"bobzdopcjwvnhd\"}]}") - .toObject(InitContainer.class); - Assertions.assertEquals("ogqxndlkzgxhuri", model.image()); - Assertions.assertEquals("bpodxunkbebxm", model.name()); - Assertions.assertEquals("yntwlrbq", model.command().get(0)); - Assertions.assertEquals("rlltmuwlauwzizx", model.args().get(0)); - Assertions.assertEquals("cjefuzmu", model.env().get(0).name()); - Assertions.assertEquals("bttdumorppxe", model.env().get(0).value()); - Assertions.assertEquals("nzbtbhj", model.env().get(0).secretRef()); - Assertions.assertEquals(61.21975235277173D, model.resources().cpu()); - Assertions.assertEquals("jnkaljutiiswacff", model.resources().memory()); - Assertions.assertEquals("kfvhqcrailvpn", model.volumeMounts().get(0).volumeName()); - Assertions.assertEquals("fuflrwdmhdlx", model.volumeMounts().get(0).mountPath()); - } - - @Test - public void testSerialize() { - InitContainer model = - new InitContainer() - .withImage("ogqxndlkzgxhuri") - .withName("bpodxunkbebxm") - .withCommand(Arrays.asList("yntwlrbq", "koievseo")) - .withArgs(Arrays.asList("rlltmuwlauwzizx")) - .withEnv( - Arrays - .asList( - new EnvironmentVar() - .withName("cjefuzmu") - .withValue("bttdumorppxe") - .withSecretRef("nzbtbhj"), - new EnvironmentVar().withName("lkfg").withValue("dneu").withSecretRef("fphsdyhtozfikdow"), - new EnvironmentVar().withName("uuvxz").withValue("lvithhqzonosgg").withSecretRef("c"))) - .withResources(new ContainerResources().withCpu(61.21975235277173D).withMemory("jnkaljutiiswacff")) - .withVolumeMounts( - Arrays - .asList( - new VolumeMount().withVolumeName("kfvhqcrailvpn").withMountPath("fuflrwdmhdlx"), - new VolumeMount().withVolumeName("rxsagafcnihgwqa").withMountPath("edgfbcvkcvq"), - new VolumeMount().withVolumeName("keqdcvdrhvoods").withMountPath("bobzdopcjwvnhd"))); - model = BinaryData.fromObject(model).toObject(InitContainer.class); - Assertions.assertEquals("ogqxndlkzgxhuri", model.image()); - Assertions.assertEquals("bpodxunkbebxm", model.name()); - Assertions.assertEquals("yntwlrbq", model.command().get(0)); - Assertions.assertEquals("rlltmuwlauwzizx", model.args().get(0)); - Assertions.assertEquals("cjefuzmu", model.env().get(0).name()); - Assertions.assertEquals("bttdumorppxe", model.env().get(0).value()); - Assertions.assertEquals("nzbtbhj", model.env().get(0).secretRef()); - Assertions.assertEquals(61.21975235277173D, model.resources().cpu()); - Assertions.assertEquals("jnkaljutiiswacff", model.resources().memory()); - Assertions.assertEquals("kfvhqcrailvpn", model.volumeMounts().get(0).volumeName()); - Assertions.assertEquals("fuflrwdmhdlx", model.volumeMounts().get(0).mountPath()); - } -} 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 46ffee4349ed..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Action; -import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class IpSecurityRestrictionRuleTests { - @Test - public void testDeserialize() { - IpSecurityRestrictionRule model = - BinaryData - .fromString( - "{\"name\":\"gw\",\"description\":\"vlvqhjkbegi\",\"ipAddressRange\":\"t\",\"action\":\"Allow\"}") - .toObject(IpSecurityRestrictionRule.class); - Assertions.assertEquals("gw", model.name()); - Assertions.assertEquals("vlvqhjkbegi", model.description()); - Assertions.assertEquals("t", model.ipAddressRange()); - Assertions.assertEquals(Action.ALLOW, model.action()); - } - - @Test - public void testSerialize() { - IpSecurityRestrictionRule model = - new IpSecurityRestrictionRule() - .withName("gw") - .withDescription("vlvqhjkbegi") - .withIpAddressRange("t") - .withAction(Action.ALLOW); - model = BinaryData.fromObject(model).toObject(IpSecurityRestrictionRule.class); - Assertions.assertEquals("gw", model.name()); - Assertions.assertEquals("vlvqhjkbegi", model.description()); - Assertions.assertEquals("t", model.ipAddressRange()); - Assertions.assertEquals(Action.ALLOW, model.action()); - } -} 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 145f7fcb84cf..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JwtClaimChecksTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JwtClaimChecks; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class JwtClaimChecksTests { - @Test - public void testDeserialize() { - JwtClaimChecks model = - BinaryData - .fromString( - "{\"allowedGroups\":[\"qpteeh\",\"zvypyqrimzinp\"],\"allowedClientApplications\":[\"jdkirsoodqx\"]}") - .toObject(JwtClaimChecks.class); - Assertions.assertEquals("qpteeh", model.allowedGroups().get(0)); - Assertions.assertEquals("jdkirsoodqx", model.allowedClientApplications().get(0)); - } - - @Test - public void testSerialize() { - JwtClaimChecks model = - new JwtClaimChecks() - .withAllowedGroups(Arrays.asList("qpteeh", "zvypyqrimzinp")) - .withAllowedClientApplications(Arrays.asList("jdkirsoodqx")); - model = BinaryData.fromObject(model).toObject(JwtClaimChecks.class); - Assertions.assertEquals("qpteeh", model.allowedGroups().get(0)); - Assertions.assertEquals("jdkirsoodqx", model.allowedClientApplications().get(0)); - } -} 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 45f53f49ccab..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; -import org.junit.jupiter.api.Test; - -public final class LoginRoutesTests { - @Test - public void testDeserialize() { - LoginRoutes model = BinaryData.fromString("{\"logoutEndpoint\":\"ynpwlbj\"}").toObject(LoginRoutes.class); - Assertions.assertEquals("ynpwlbj", model.logoutEndpoint()); - } - - @Test - public void testSerialize() { - LoginRoutes model = new LoginRoutes().withLogoutEndpoint("ynpwlbj"); - model = BinaryData.fromObject(model).toObject(LoginRoutes.class); - Assertions.assertEquals("ynpwlbj", 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 17b344da6d8c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginScopesTests.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.LoginScopes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class LoginScopesTests { - @Test - public void testDeserialize() { - LoginScopes model = - BinaryData - .fromString("{\"scopes\":[\"nbdxk\",\"pxokajionp\",\"mexgstxgcp\",\"dg\"]}") - .toObject(LoginScopes.class); - Assertions.assertEquals("nbdxk", model.scopes().get(0)); - } - - @Test - public void testSerialize() { - LoginScopes model = new LoginScopes().withScopes(Arrays.asList("nbdxk", "pxokajionp", "mexgstxgcp", "dg")); - model = BinaryData.fromObject(model).toObject(LoginScopes.class); - Assertions.assertEquals("nbdxk", model.scopes().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginTests.java deleted file mode 100644 index 11562c775556..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CookieExpiration; -import com.azure.resourcemanager.appcontainers.models.CookieExpirationConvention; -import com.azure.resourcemanager.appcontainers.models.Login; -import com.azure.resourcemanager.appcontainers.models.LoginRoutes; -import com.azure.resourcemanager.appcontainers.models.Nonce; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class LoginTests { - @Test - public void testDeserialize() { - Login model = - BinaryData - .fromString( - "{\"routes\":{\"logoutEndpoint\":\"jumasx\"},\"preserveUrlFragmentsForLogins\":false,\"allowedExternalRedirectUrls\":[\"yegu\"],\"cookieExpiration\":{\"convention\":\"FixedTime\",\"timeToExpiration\":\"xhejjzzvdud\"},\"nonce\":{\"validateNonce\":false,\"nonceExpirationInterval\":\"fhotw\"}}") - .toObject(Login.class); - Assertions.assertEquals("jumasx", model.routes().logoutEndpoint()); - Assertions.assertEquals(false, model.preserveUrlFragmentsForLogins()); - Assertions.assertEquals("yegu", model.allowedExternalRedirectUrls().get(0)); - Assertions.assertEquals(CookieExpirationConvention.FIXED_TIME, model.cookieExpiration().convention()); - Assertions.assertEquals("xhejjzzvdud", model.cookieExpiration().timeToExpiration()); - Assertions.assertEquals(false, model.nonce().validateNonce()); - Assertions.assertEquals("fhotw", model.nonce().nonceExpirationInterval()); - } - - @Test - public void testSerialize() { - Login model = - new Login() - .withRoutes(new LoginRoutes().withLogoutEndpoint("jumasx")) - .withPreserveUrlFragmentsForLogins(false) - .withAllowedExternalRedirectUrls(Arrays.asList("yegu")) - .withCookieExpiration( - new CookieExpiration() - .withConvention(CookieExpirationConvention.FIXED_TIME) - .withTimeToExpiration("xhejjzzvdud")) - .withNonce(new Nonce().withValidateNonce(false).withNonceExpirationInterval("fhotw")); - model = BinaryData.fromObject(model).toObject(Login.class); - Assertions.assertEquals("jumasx", model.routes().logoutEndpoint()); - Assertions.assertEquals(false, model.preserveUrlFragmentsForLogins()); - Assertions.assertEquals("yegu", model.allowedExternalRedirectUrls().get(0)); - Assertions.assertEquals(CookieExpirationConvention.FIXED_TIME, model.cookieExpiration().convention()); - Assertions.assertEquals("xhejjzzvdud", model.cookieExpiration().timeToExpiration()); - Assertions.assertEquals(false, model.nonce().validateNonce()); - Assertions.assertEquals("fhotw", model.nonce().nonceExpirationInterval()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentOutboundSettingsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentOutboundSettingsTests.java deleted file mode 100644 index 44c4894e6653..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentOutboundSettingsTests.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.ManagedEnvironmentOutBoundType; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentOutboundSettings; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ManagedEnvironmentOutboundSettingsTests { - @Test - public void testDeserialize() { - ManagedEnvironmentOutboundSettings model = - BinaryData - .fromString("{\"outBoundType\":\"UserDefinedRouting\",\"virtualNetworkApplianceIp\":\"l\"}") - .toObject(ManagedEnvironmentOutboundSettings.class); - Assertions.assertEquals(ManagedEnvironmentOutBoundType.USER_DEFINED_ROUTING, model.outBoundType()); - Assertions.assertEquals("l", model.virtualNetworkApplianceIp()); - } - - @Test - public void testSerialize() { - ManagedEnvironmentOutboundSettings model = - new ManagedEnvironmentOutboundSettings() - .withOutBoundType(ManagedEnvironmentOutBoundType.USER_DEFINED_ROUTING) - .withVirtualNetworkApplianceIp("l"); - model = BinaryData.fromObject(model).toObject(ManagedEnvironmentOutboundSettings.class); - Assertions.assertEquals(ManagedEnvironmentOutBoundType.USER_DEFINED_ROUTING, model.outBoundType()); - Assertions.assertEquals("l", model.virtualNetworkApplianceIp()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentStoragesCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentStoragesCollectionInnerTests.java deleted file mode 100644 index 8cdd205d2c8c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentStoragesCollectionInnerTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStorageInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStoragesCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorageProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - -public final class ManagedEnvironmentStoragesCollectionInnerTests { - @Test - public void testDeserialize() { - ManagedEnvironmentStoragesCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{},\"id\":\"ob\",\"name\":\"lftidgfcwqmpim\",\"type\":\"qxzhem\"},{\"properties\":{},\"id\":\"hujswtwkozzwcul\",\"name\":\"bawpfajnjwltlwt\",\"type\":\"j\"},{\"properties\":{},\"id\":\"alhsnvkc\",\"name\":\"mxzrpoa\",\"type\":\"mlnwiaaomylweazu\"},{\"properties\":{},\"id\":\"thwwn\",\"name\":\"jhlfzswpchwahf\",\"type\":\"ousnfepgfewe\"}]}") - .toObject(ManagedEnvironmentStoragesCollectionInner.class); - } - - @Test - public void testSerialize() { - ManagedEnvironmentStoragesCollectionInner model = - new ManagedEnvironmentStoragesCollectionInner() - .withValue( - Arrays - .asList( - new ManagedEnvironmentStorageInner() - .withProperties(new ManagedEnvironmentStorageProperties()), - new ManagedEnvironmentStorageInner() - .withProperties(new ManagedEnvironmentStorageProperties()), - new ManagedEnvironmentStorageInner() - .withProperties(new ManagedEnvironmentStorageProperties()), - new ManagedEnvironmentStorageInner() - .withProperties(new ManagedEnvironmentStorageProperties()))); - model = BinaryData.fromObject(model).toObject(ManagedEnvironmentStoragesCollectionInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.java deleted file mode 100644 index 89cd42aeeb10..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.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.core.util.Context; -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("owa", "iynknlq", 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 dc608af595c6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesMockTests.java +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.core.util.Context; -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\":1932910769,\"maximumCount\":356571550,\"currentCount\":150383679},\"id\":\"ygjbmzyospspsh\",\"name\":\"kfkyjp\",\"type\":\"sp\"}]}"; - - 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("zdvpiw", "xqszdtmaajquh", Context.NONE); - - Assertions.assertEquals(1932910769, response.iterator().next().properties().minimumCount()); - Assertions.assertEquals(356571550, response.iterator().next().properties().maximumCount()); - Assertions.assertEquals(150383679, response.iterator().next().properties().currentCount()); - } -} 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 9a173242c218..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.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; -import org.junit.jupiter.api.Test; - -public final class ManagedServiceIdentityTests { - @Test - public void testDeserialize() { - ManagedServiceIdentity model = - BinaryData - .fromString( - "{\"type\":\"UserAssigned\",\"userAssignedIdentities\":{\"frzpwvlqdqgb\":{},\"lihkaetcktvfc\":{},\"snkymuctq\":{},\"bebrjcxerfuwuttt\":{}}}") - .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); - } - - @Test - public void testSerialize() { - ManagedServiceIdentity model = - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.USER_ASSIGNED) - .withUserAssignedIdentities( - mapOf( - "frzpwvlqdqgb", - new UserAssignedIdentity(), - "lihkaetcktvfc", - new UserAssignedIdentity(), - "snkymuctq", - new UserAssignedIdentity(), - "bebrjcxerfuwuttt", - new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.USER_ASSIGNED, model.type()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java deleted file mode 100644 index 9edebf90dfe7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.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.Nonce; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class NonceTests { - @Test - public void testDeserialize() { - Nonce model = - BinaryData - .fromString("{\"validateNonce\":false,\"nonceExpirationInterval\":\"yfsoppu\"}") - .toObject(Nonce.class); - Assertions.assertEquals(false, model.validateNonce()); - Assertions.assertEquals("yfsoppu", model.nonceExpirationInterval()); - } - - @Test - public void testSerialize() { - Nonce model = new Nonce().withValidateNonce(false).withNonceExpirationInterval("yfsoppu"); - model = BinaryData.fromObject(model).toObject(Nonce.class); - Assertions.assertEquals(false, model.validateNonce()); - Assertions.assertEquals("yfsoppu", model.nonceExpirationInterval()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectClientCredentialTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectClientCredentialTests.java deleted file mode 100644 index ee854acd908a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectClientCredentialTests.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.ClientCredentialMethod; -import com.azure.resourcemanager.appcontainers.models.OpenIdConnectClientCredential; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OpenIdConnectClientCredentialTests { - @Test - public void testDeserialize() { - OpenIdConnectClientCredential model = - BinaryData - .fromString("{\"method\":\"ClientSecretPost\",\"clientSecretSettingName\":\"tzxdpnqbqqwx\"}") - .toObject(OpenIdConnectClientCredential.class); - Assertions.assertEquals(ClientCredentialMethod.CLIENT_SECRET_POST, model.method()); - Assertions.assertEquals("tzxdpnqbqqwx", model.clientSecretSettingName()); - } - - @Test - public void testSerialize() { - OpenIdConnectClientCredential model = - new OpenIdConnectClientCredential() - .withMethod(ClientCredentialMethod.CLIENT_SECRET_POST) - .withClientSecretSettingName("tzxdpnqbqqwx"); - model = BinaryData.fromObject(model).toObject(OpenIdConnectClientCredential.class); - Assertions.assertEquals(ClientCredentialMethod.CLIENT_SECRET_POST, model.method()); - Assertions.assertEquals("tzxdpnqbqqwx", model.clientSecretSettingName()); - } -} 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 6afae76954b8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectLoginTests.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.OpenIdConnectLogin; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OpenIdConnectLoginTests { - @Test - public void testDeserialize() { - OpenIdConnectLogin model = - BinaryData - .fromString( - "{\"nameClaimType\":\"scxaq\",\"scopes\":[\"chcbonqvpkvlrxnj\",\"ase\",\"pheoflokeyy\",\"enjbdlwtgrhp\"]}") - .toObject(OpenIdConnectLogin.class); - Assertions.assertEquals("scxaq", model.nameClaimType()); - Assertions.assertEquals("chcbonqvpkvlrxnj", model.scopes().get(0)); - } - - @Test - public void testSerialize() { - OpenIdConnectLogin model = - new OpenIdConnectLogin() - .withNameClaimType("scxaq") - .withScopes(Arrays.asList("chcbonqvpkvlrxnj", "ase", "pheoflokeyy", "enjbdlwtgrhp")); - model = BinaryData.fromObject(model).toObject(OpenIdConnectLogin.class); - Assertions.assertEquals("scxaq", model.nameClaimType()); - Assertions.assertEquals("chcbonqvpkvlrxnj", 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 bb6d2928426c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDetailInnerTests.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.fluent.models.OperationDetailInner; -import com.azure.resourcemanager.appcontainers.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OperationDetailInnerTests { - @Test - public void testDeserialize() { - OperationDetailInner model = - BinaryData - .fromString( - "{\"name\":\"qyuvvfonkp\",\"isDataAction\":false,\"display\":{\"provider\":\"kvylauyavl\",\"resource\":\"mncsttijfybvp\",\"operation\":\"krsgsgb\",\"description\":\"uzqgnjdgkynsc\"},\"origin\":\"qhzvhxnkomt\"}") - .toObject(OperationDetailInner.class); - Assertions.assertEquals("qyuvvfonkp", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("kvylauyavl", model.display().provider()); - Assertions.assertEquals("mncsttijfybvp", model.display().resource()); - Assertions.assertEquals("krsgsgb", model.display().operation()); - Assertions.assertEquals("uzqgnjdgkynsc", model.display().description()); - Assertions.assertEquals("qhzvhxnkomt", model.origin()); - } - - @Test - public void testSerialize() { - OperationDetailInner model = - new OperationDetailInner() - .withName("qyuvvfonkp") - .withIsDataAction(false) - .withDisplay( - new OperationDisplay() - .withProvider("kvylauyavl") - .withResource("mncsttijfybvp") - .withOperation("krsgsgb") - .withDescription("uzqgnjdgkynsc")) - .withOrigin("qhzvhxnkomt"); - model = BinaryData.fromObject(model).toObject(OperationDetailInner.class); - Assertions.assertEquals("qyuvvfonkp", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("kvylauyavl", model.display().provider()); - Assertions.assertEquals("mncsttijfybvp", model.display().resource()); - Assertions.assertEquals("krsgsgb", model.display().operation()); - Assertions.assertEquals("uzqgnjdgkynsc", model.display().description()); - Assertions.assertEquals("qhzvhxnkomt", 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 feb8216ddb9f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDisplayTests.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.OperationDisplay; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class OperationDisplayTests { - @Test - public void testDeserialize() { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"bo\",\"resource\":\"pnvdxz\",\"operation\":\"ihfrbbcevqa\",\"description\":\"ltd\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("bo", model.provider()); - Assertions.assertEquals("pnvdxz", model.resource()); - Assertions.assertEquals("ihfrbbcevqa", model.operation()); - Assertions.assertEquals("ltd", model.description()); - } - - @Test - public void testSerialize() { - OperationDisplay model = - new OperationDisplay() - .withProvider("bo") - .withResource("pnvdxz") - .withOperation("ihfrbbcevqa") - .withDescription("ltd"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("bo", model.provider()); - Assertions.assertEquals("pnvdxz", model.resource()); - Assertions.assertEquals("ihfrbbcevqa", model.operation()); - Assertions.assertEquals("ltd", 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 46c0b3a54f05..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationsListMockTests.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.core.util.Context; -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\":\"kgozxwop\",\"isDataAction\":false,\"display\":{\"provider\":\"izqaclnapxbiyg\",\"resource\":\"gjkn\",\"operation\":\"mfcttux\",\"description\":\"yilflqoiquvrehmr\"},\"origin\":\"hvsujztc\"}]}"; - - 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(Context.NONE); - - Assertions.assertEquals("kgozxwop", response.iterator().next().name()); - Assertions.assertEquals(false, response.iterator().next().isDataAction()); - Assertions.assertEquals("izqaclnapxbiyg", response.iterator().next().display().provider()); - Assertions.assertEquals("gjkn", response.iterator().next().display().resource()); - Assertions.assertEquals("mfcttux", response.iterator().next().display().operation()); - Assertions.assertEquals("yilflqoiquvrehmr", response.iterator().next().display().description()); - Assertions.assertEquals("hvsujztc", response.iterator().next().origin()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/QueueScaleRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/QueueScaleRuleTests.java deleted file mode 100644 index 71b0cc930752..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/QueueScaleRuleTests.java +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.QueueScaleRule; -import com.azure.resourcemanager.appcontainers.models.ScaleRuleAuth; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class QueueScaleRuleTests { - @Test - public void testDeserialize() { - QueueScaleRule model = - BinaryData - .fromString( - "{\"queueName\":\"bqwcsdbnwdcf\",\"queueLength\":1857074792,\"auth\":[{\"secretRef\":\"fuvglsbjjca\",\"triggerParameter\":\"xbvtvudu\"},{\"secretRef\":\"cormr\",\"triggerParameter\":\"qtvcofudflvkgj\"}]}") - .toObject(QueueScaleRule.class); - Assertions.assertEquals("bqwcsdbnwdcf", model.queueName()); - Assertions.assertEquals(1857074792, model.queueLength()); - Assertions.assertEquals("fuvglsbjjca", model.auth().get(0).secretRef()); - Assertions.assertEquals("xbvtvudu", model.auth().get(0).triggerParameter()); - } - - @Test - public void testSerialize() { - QueueScaleRule model = - new QueueScaleRule() - .withQueueName("bqwcsdbnwdcf") - .withQueueLength(1857074792) - .withAuth( - Arrays - .asList( - new ScaleRuleAuth().withSecretRef("fuvglsbjjca").withTriggerParameter("xbvtvudu"), - new ScaleRuleAuth().withSecretRef("cormr").withTriggerParameter("qtvcofudflvkgj"))); - model = BinaryData.fromObject(model).toObject(QueueScaleRule.class); - Assertions.assertEquals("bqwcsdbnwdcf", model.queueName()); - Assertions.assertEquals(1857074792, model.queueLength()); - Assertions.assertEquals("fuvglsbjjca", model.auth().get(0).secretRef()); - Assertions.assertEquals("xbvtvudu", model.auth().get(0).triggerParameter()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RegistryCredentialsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RegistryCredentialsTests.java deleted file mode 100644 index 361335f269c8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RegistryCredentialsTests.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.RegistryCredentials; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class RegistryCredentialsTests { - @Test - public void testDeserialize() { - RegistryCredentials model = - BinaryData - .fromString( - "{\"server\":\"iebwwaloayqcgwrt\",\"username\":\"uzgwyzmhtx\",\"passwordSecretRef\":\"gmtsavjcbpwxqpsr\",\"identity\":\"ftguv\"}") - .toObject(RegistryCredentials.class); - Assertions.assertEquals("iebwwaloayqcgwrt", model.server()); - Assertions.assertEquals("uzgwyzmhtx", model.username()); - Assertions.assertEquals("gmtsavjcbpwxqpsr", model.passwordSecretRef()); - Assertions.assertEquals("ftguv", model.identity()); - } - - @Test - public void testSerialize() { - RegistryCredentials model = - new RegistryCredentials() - .withServer("iebwwaloayqcgwrt") - .withUsername("uzgwyzmhtx") - .withPasswordSecretRef("gmtsavjcbpwxqpsr") - .withIdentity("ftguv"); - model = BinaryData.fromObject(model).toObject(RegistryCredentials.class); - Assertions.assertEquals("iebwwaloayqcgwrt", model.server()); - Assertions.assertEquals("uzgwyzmhtx", model.username()); - Assertions.assertEquals("gmtsavjcbpwxqpsr", model.passwordSecretRef()); - Assertions.assertEquals("ftguv", model.identity()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RegistryInfoTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RegistryInfoTests.java deleted file mode 100644 index d17152ba628e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RegistryInfoTests.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.RegistryInfo; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class RegistryInfoTests { - @Test - public void testDeserialize() { - RegistryInfo model = - BinaryData - .fromString( - "{\"registryUrl\":\"fakeUrlPlaceholder\",\"registryUserName\":\"fakeNamePlaceholder\",\"registryPassword\":\"fakePasswordPlaceholder\"}") - .toObject(RegistryInfo.class); - Assertions.assertEquals("fakeUrlPlaceholder", model.registryUrl()); - Assertions.assertEquals("fakeNamePlaceholder", model.registryUsername()); - Assertions.assertEquals("fakePasswordPlaceholder", model.registryPassword()); - } - - @Test - public void testSerialize() { - RegistryInfo model = - new RegistryInfo() - .withRegistryUrl("fakeUrlPlaceholder") - .withRegistryUsername("fakeNamePlaceholder") - .withRegistryPassword("fakePasswordPlaceholder"); - model = BinaryData.fromObject(model).toObject(RegistryInfo.class); - Assertions.assertEquals("fakeUrlPlaceholder", model.registryUrl()); - Assertions.assertEquals("fakeNamePlaceholder", model.registryUsername()); - Assertions.assertEquals("fakePasswordPlaceholder", model.registryPassword()); - } -} 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 5a74a66a414c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaCollectionInnerTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - -public final class ReplicaCollectionInnerTests { - @Test - public void testDeserialize() { - ReplicaCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-01-22T12:04:18Z\",\"containers\":[]},\"id\":\"fffiak\",\"name\":\"jpqqmted\",\"type\":\"tmmjihyeozph\"},{\"properties\":{\"createdTime\":\"2021-06-27T09:23:26Z\",\"containers\":[]},\"id\":\"ncyg\",\"name\":\"p\",\"type\":\"vipmdscwxqupevzh\"}]}") - .toObject(ReplicaCollectionInner.class); - } - - @Test - public void testSerialize() { - ReplicaCollectionInner model = - new ReplicaCollectionInner() - .withValue( - Arrays - .asList( - new ReplicaInner().withContainers(Arrays.asList()), - new ReplicaInner().withContainers(Arrays.asList()))); - model = BinaryData.fromObject(model).toObject(ReplicaCollectionInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.java deleted file mode 100644 index cc77f7b8f1c7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.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.ReplicaContainer; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ReplicaContainerTests { - @Test - public void testDeserialize() { - ReplicaContainer model = - BinaryData - .fromString( - "{\"name\":\"fhsxttaugz\",\"containerId\":\"faazpxdtnkdmkqjj\",\"ready\":false,\"started\":false,\"restartCount\":1886433502,\"logStreamEndpoint\":\"pyouaibrebqaays\",\"execEndpoint\":\"ixqtn\"}") - .toObject(ReplicaContainer.class); - Assertions.assertEquals("fhsxttaugz", model.name()); - Assertions.assertEquals("faazpxdtnkdmkqjj", model.containerId()); - Assertions.assertEquals(false, model.ready()); - Assertions.assertEquals(false, model.started()); - Assertions.assertEquals(1886433502, model.restartCount()); - } - - @Test - public void testSerialize() { - ReplicaContainer model = - new ReplicaContainer() - .withName("fhsxttaugz") - .withContainerId("faazpxdtnkdmkqjj") - .withReady(false) - .withStarted(false) - .withRestartCount(1886433502); - model = BinaryData.fromObject(model).toObject(ReplicaContainer.class); - Assertions.assertEquals("fhsxttaugz", model.name()); - Assertions.assertEquals("faazpxdtnkdmkqjj", model.containerId()); - Assertions.assertEquals(false, model.ready()); - Assertions.assertEquals(false, model.started()); - Assertions.assertEquals(1886433502, 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 2bc20409ed83..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaInnerTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ReplicaInnerTests { - @Test - public void testDeserialize() { - ReplicaInner model = - BinaryData - .fromString( - "{\"properties\":{\"createdTime\":\"2021-03-31T08:41:02Z\",\"containers\":[{\"name\":\"nkhtjsyingw\",\"containerId\":\"atmtdhtmdvy\",\"ready\":true,\"started\":true,\"restartCount\":624157964,\"logStreamEndpoint\":\"ywkbirryuzhlhkjo\",\"execEndpoint\":\"vqqaatjinrvgo\"},{\"name\":\"mfiibfggj\",\"containerId\":\"olvrw\",\"ready\":false,\"started\":false,\"restartCount\":1621053169,\"logStreamEndpoint\":\"lqwjygvjayvblm\",\"execEndpoint\":\"k\"}]},\"id\":\"hbxvvyhgsopbyrqu\",\"name\":\"egxuvwzf\",\"type\":\"nhlmctlpdng\"}") - .toObject(ReplicaInner.class); - Assertions.assertEquals("nkhtjsyingw", model.containers().get(0).name()); - Assertions.assertEquals("atmtdhtmdvy", model.containers().get(0).containerId()); - Assertions.assertEquals(true, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(624157964, model.containers().get(0).restartCount()); - } - - @Test - public void testSerialize() { - ReplicaInner model = - new ReplicaInner() - .withContainers( - Arrays - .asList( - new ReplicaContainer() - .withName("nkhtjsyingw") - .withContainerId("atmtdhtmdvy") - .withReady(true) - .withStarted(true) - .withRestartCount(624157964), - new ReplicaContainer() - .withName("mfiibfggj") - .withContainerId("olvrw") - .withReady(false) - .withStarted(false) - .withRestartCount(1621053169))); - model = BinaryData.fromObject(model).toObject(ReplicaInner.class); - Assertions.assertEquals("nkhtjsyingw", model.containers().get(0).name()); - Assertions.assertEquals("atmtdhtmdvy", model.containers().get(0).containerId()); - Assertions.assertEquals(true, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(624157964, model.containers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.java deleted file mode 100644 index 93258565b3ca..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.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.ReplicaProperties; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ReplicaPropertiesTests { - @Test - public void testDeserialize() { - ReplicaProperties model = - BinaryData - .fromString( - "{\"createdTime\":\"2021-01-29T19:24:27Z\",\"containers\":[{\"name\":\"hrixkwmy\",\"containerId\":\"ejvegrhbpnaixex\",\"ready\":false,\"started\":true,\"restartCount\":303838192,\"logStreamEndpoint\":\"hcexdrrvqa\",\"execEndpoint\":\"kghtpwijnh\"},{\"name\":\"svfycxzbfv\",\"containerId\":\"wvrvmtg\",\"ready\":true,\"started\":false,\"restartCount\":213302833,\"logStreamEndpoint\":\"ronzmyhgfip\",\"execEndpoint\":\"xkmcwaekrrjre\"},{\"name\":\"xt\",\"containerId\":\"umh\",\"ready\":false,\"started\":false,\"restartCount\":401545193,\"logStreamEndpoint\":\"slol\",\"execEndpoint\":\"pvuzlmv\"},{\"name\":\"lfktgplcrpwjxe\",\"containerId\":\"oi\",\"ready\":false,\"started\":true,\"restartCount\":509080980,\"logStreamEndpoint\":\"kpnb\",\"execEndpoint\":\"zejjoqk\"}]}") - .toObject(ReplicaProperties.class); - Assertions.assertEquals("hrixkwmy", model.containers().get(0).name()); - Assertions.assertEquals("ejvegrhbpnaixex", model.containers().get(0).containerId()); - Assertions.assertEquals(false, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(303838192, model.containers().get(0).restartCount()); - } - - @Test - public void testSerialize() { - ReplicaProperties model = - new ReplicaProperties() - .withContainers( - Arrays - .asList( - new ReplicaContainer() - .withName("hrixkwmy") - .withContainerId("ejvegrhbpnaixex") - .withReady(false) - .withStarted(true) - .withRestartCount(303838192), - new ReplicaContainer() - .withName("svfycxzbfv") - .withContainerId("wvrvmtg") - .withReady(true) - .withStarted(false) - .withRestartCount(213302833), - new ReplicaContainer() - .withName("xt") - .withContainerId("umh") - .withReady(false) - .withStarted(false) - .withRestartCount(401545193), - new ReplicaContainer() - .withName("lfktgplcrpwjxe") - .withContainerId("oi") - .withReady(false) - .withStarted(true) - .withRestartCount(509080980))); - model = BinaryData.fromObject(model).toObject(ReplicaProperties.class); - Assertions.assertEquals("hrixkwmy", model.containers().get(0).name()); - Assertions.assertEquals("ejvegrhbpnaixex", model.containers().get(0).containerId()); - Assertions.assertEquals(false, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(303838192, model.containers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionCollectionTests.java deleted file mode 100644 index a2f4ed6ce728..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionCollectionTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -import com.azure.resourcemanager.appcontainers.models.RevisionCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - -public final class RevisionCollectionTests { - @Test - public void testDeserialize() { - RevisionCollection model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-01-15T08:47:59Z\",\"lastActiveTime\":\"2021-05-14T06:41:01Z\",\"fqdn\":\"jabibsystawf\",\"active\":true,\"replicas\":591359047,\"trafficWeight\":226758731,\"provisioningError\":\"jxbkzbzkdvn\",\"healthState\":\"Healthy\",\"provisioningState\":\"Deprovisioned\"},\"id\":\"urgkakmokzhjjk\",\"name\":\"ffhmouwqlgzr\",\"type\":\"zeeyebi\"},{\"properties\":{\"createdTime\":\"2021-08-01T17:17:52Z\",\"lastActiveTime\":\"2021-02-02T12:35:30Z\",\"fqdn\":\"lbjbsyb\",\"active\":false,\"replicas\":146564330,\"trafficWeight\":1583288095,\"provisioningError\":\"mfpgv\",\"healthState\":\"None\",\"provisioningState\":\"Failed\"},\"id\":\"ltha\",\"name\":\"fxssm\",\"type\":\"u\"},{\"properties\":{\"createdTime\":\"2021-10-23T07:29:01Z\",\"lastActiveTime\":\"2021-01-02T11:55:22Z\",\"fqdn\":\"zpdrhneu\",\"active\":false,\"replicas\":150720980,\"trafficWeight\":2008248365,\"provisioningError\":\"i\",\"healthState\":\"None\",\"provisioningState\":\"Deprovisioned\"},\"id\":\"gpikpzimejza\",\"name\":\"lfzxiavrmbzonoki\",\"type\":\"rjqc\"}],\"nextLink\":\"gzpfrla\"}") - .toObject(RevisionCollection.class); - } - - @Test - public void testSerialize() { - 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/RevisionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionInnerTests.java deleted file mode 100644 index 60e7b11ae21e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionInnerTests.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 org.junit.jupiter.api.Test; - -public final class RevisionInnerTests { - @Test - public void testDeserialize() { - RevisionInner model = - BinaryData - .fromString( - "{\"properties\":{\"createdTime\":\"2021-07-24T19:53:33Z\",\"lastActiveTime\":\"2021-05-24T12:41:33Z\",\"fqdn\":\"iin\",\"template\":{\"revisionSuffix\":\"wp\",\"initContainers\":[],\"containers\":[],\"volumes\":[]},\"active\":false,\"replicas\":901371312,\"trafficWeight\":1612307116,\"provisioningError\":\"szfjvfbgofelja\",\"healthState\":\"None\",\"provisioningState\":\"Provisioned\"},\"id\":\"ldvriiiojnalghfk\",\"name\":\"tvsexsowuel\",\"type\":\"qhhahhxvrhmzkwpj\"}") - .toObject(RevisionInner.class); - } - - @Test - public void testSerialize() { - RevisionInner model = new RevisionInner(); - model = BinaryData.fromObject(model).toObject(RevisionInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionPropertiesTests.java deleted file mode 100644 index 71cfc9d363a4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionPropertiesTests.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.RevisionProperties; -import org.junit.jupiter.api.Test; - -public final class RevisionPropertiesTests { - @Test - public void testDeserialize() { - RevisionProperties model = - BinaryData - .fromString( - "{\"createdTime\":\"2021-06-22T16:52:42Z\",\"lastActiveTime\":\"2021-08-18T23:10:34Z\",\"fqdn\":\"ghftqsxhqxujxuk\",\"template\":{\"revisionSuffix\":\"digrjguufzdmsyqt\",\"initContainers\":[{\"image\":\"hbotzingamvppho\",\"name\":\"qzudphq\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]},{\"image\":\"ynwcvtbv\",\"name\":\"yhmtnvyqiat\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]},{\"image\":\"wzcjaesgvvsccy\",\"name\":\"g\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]},{\"image\":\"zlvdnkfxusemdw\",\"name\":\"muhapfcqdpsqxqv\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]}],\"containers\":[{\"probes\":[],\"image\":\"elvezrypq\",\"name\":\"feo\",\"command\":[],\"args\":[],\"env\":[],\"volumeMounts\":[]}],\"scale\":{\"minReplicas\":137094818,\"maxReplicas\":1870547697,\"rules\":[]},\"volumes\":[{\"name\":\"dkow\",\"storageType\":\"AzureFile\",\"storageName\":\"pc\"}]},\"active\":false,\"replicas\":2091376747,\"trafficWeight\":2104767633,\"provisioningError\":\"njv\",\"healthState\":\"Healthy\",\"provisioningState\":\"Provisioning\"}") - .toObject(RevisionProperties.class); - } - - @Test - public void testSerialize() { - RevisionProperties model = new RevisionProperties(); - model = BinaryData.fromObject(model).toObject(RevisionProperties.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleRuleAuthTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleRuleAuthTests.java deleted file mode 100644 index fde894377692..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleRuleAuthTests.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.ScaleRuleAuth; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ScaleRuleAuthTests { - @Test - public void testDeserialize() { - ScaleRuleAuth model = - BinaryData - .fromString("{\"secretRef\":\"gdknnqv\",\"triggerParameter\":\"znqntoru\"}") - .toObject(ScaleRuleAuth.class); - Assertions.assertEquals("gdknnqv", model.secretRef()); - Assertions.assertEquals("znqntoru", model.triggerParameter()); - } - - @Test - public void testSerialize() { - ScaleRuleAuth model = new ScaleRuleAuth().withSecretRef("gdknnqv").withTriggerParameter("znqntoru"); - model = BinaryData.fromObject(model).toObject(ScaleRuleAuth.class); - Assertions.assertEquals("gdknnqv", model.secretRef()); - Assertions.assertEquals("znqntoru", model.triggerParameter()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleRuleTests.java deleted file mode 100644 index ab65a2ea6cc8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleRuleTests.java +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; -import com.azure.resourcemanager.appcontainers.models.HttpScaleRule; -import com.azure.resourcemanager.appcontainers.models.QueueScaleRule; -import com.azure.resourcemanager.appcontainers.models.ScaleRule; -import com.azure.resourcemanager.appcontainers.models.ScaleRuleAuth; -import com.azure.resourcemanager.appcontainers.models.TcpScaleRule; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ScaleRuleTests { - @Test - public void testDeserialize() { - ScaleRule model = - BinaryData - .fromString( - "{\"name\":\"ubeddg\",\"azureQueue\":{\"queueName\":\"fwqmzqalkrmn\",\"queueLength\":1174672424,\"auth\":[{\"secretRef\":\"cqqudf\",\"triggerParameter\":\"yxbaaabjyvayf\"},{\"secretRef\":\"m\",\"triggerParameter\":\"rtuzqogs\"},{\"secretRef\":\"nevfdnw\",\"triggerParameter\":\"mewzsyyc\"}]},\"custom\":{\"type\":\"soibjudpfrx\",\"metadata\":{\"ytdw\":\"hzv\",\"pdtii\":\"qbrqubpaxhexiili\",\"d\":\"q\",\"fxrxxle\":\"oaxoruzfgsqu\"},\"auth\":[{\"secretRef\":\"mxjezwlw\",\"triggerParameter\":\"xuqlcvydypat\"},{\"secretRef\":\"oa\",\"triggerParameter\":\"kniod\"},{\"secretRef\":\"oebwnujhemms\",\"triggerParameter\":\"dkcrodt\"}]},\"http\":{\"metadata\":{\"fltkacjv\":\"wj\"},\"auth\":[{\"secretRef\":\"lfoakg\",\"triggerParameter\":\"fpagaowpulp\"},{\"secretRef\":\"lyls\",\"triggerParameter\":\"k\"}]},\"tcp\":{\"metadata\":{\"xsdszuempsb\":\"jervtia\",\"v\":\"kfzbeyvpnqicvi\"},\"auth\":[{\"secretRef\":\"dxrbuukzcle\",\"triggerParameter\":\"hmlwpaztzpo\"},{\"secretRef\":\"cckwyfzqwhxxbu\",\"triggerParameter\":\"a\"},{\"secretRef\":\"feqztppriol\",\"triggerParameter\":\"rjaltolmncw\"}]}}") - .toObject(ScaleRule.class); - Assertions.assertEquals("ubeddg", model.name()); - Assertions.assertEquals("fwqmzqalkrmn", model.azureQueue().queueName()); - Assertions.assertEquals(1174672424, model.azureQueue().queueLength()); - Assertions.assertEquals("cqqudf", model.azureQueue().auth().get(0).secretRef()); - Assertions.assertEquals("yxbaaabjyvayf", model.azureQueue().auth().get(0).triggerParameter()); - Assertions.assertEquals("soibjudpfrx", model.custom().type()); - Assertions.assertEquals("hzv", model.custom().metadata().get("ytdw")); - Assertions.assertEquals("mxjezwlw", model.custom().auth().get(0).secretRef()); - Assertions.assertEquals("xuqlcvydypat", model.custom().auth().get(0).triggerParameter()); - Assertions.assertEquals("wj", model.http().metadata().get("fltkacjv")); - Assertions.assertEquals("lfoakg", model.http().auth().get(0).secretRef()); - Assertions.assertEquals("fpagaowpulp", model.http().auth().get(0).triggerParameter()); - Assertions.assertEquals("jervtia", model.tcp().metadata().get("xsdszuempsb")); - Assertions.assertEquals("dxrbuukzcle", model.tcp().auth().get(0).secretRef()); - Assertions.assertEquals("hmlwpaztzpo", model.tcp().auth().get(0).triggerParameter()); - } - - @Test - public void testSerialize() { - ScaleRule model = - new ScaleRule() - .withName("ubeddg") - .withAzureQueue( - new QueueScaleRule() - .withQueueName("fwqmzqalkrmn") - .withQueueLength(1174672424) - .withAuth( - Arrays - .asList( - new ScaleRuleAuth().withSecretRef("cqqudf").withTriggerParameter("yxbaaabjyvayf"), - new ScaleRuleAuth().withSecretRef("m").withTriggerParameter("rtuzqogs"), - new ScaleRuleAuth().withSecretRef("nevfdnw").withTriggerParameter("mewzsyyc")))) - .withCustom( - new CustomScaleRule() - .withType("soibjudpfrx") - .withMetadata( - mapOf("ytdw", "hzv", "pdtii", "qbrqubpaxhexiili", "d", "q", "fxrxxle", "oaxoruzfgsqu")) - .withAuth( - Arrays - .asList( - new ScaleRuleAuth().withSecretRef("mxjezwlw").withTriggerParameter("xuqlcvydypat"), - new ScaleRuleAuth().withSecretRef("oa").withTriggerParameter("kniod"), - new ScaleRuleAuth().withSecretRef("oebwnujhemms").withTriggerParameter("dkcrodt")))) - .withHttp( - new HttpScaleRule() - .withMetadata(mapOf("fltkacjv", "wj")) - .withAuth( - Arrays - .asList( - new ScaleRuleAuth().withSecretRef("lfoakg").withTriggerParameter("fpagaowpulp"), - new ScaleRuleAuth().withSecretRef("lyls").withTriggerParameter("k")))) - .withTcp( - new TcpScaleRule() - .withMetadata(mapOf("xsdszuempsb", "jervtia", "v", "kfzbeyvpnqicvi")) - .withAuth( - Arrays - .asList( - new ScaleRuleAuth() - .withSecretRef("dxrbuukzcle") - .withTriggerParameter("hmlwpaztzpo"), - new ScaleRuleAuth().withSecretRef("cckwyfzqwhxxbu").withTriggerParameter("a"), - new ScaleRuleAuth() - .withSecretRef("feqztppriol") - .withTriggerParameter("rjaltolmncw")))); - model = BinaryData.fromObject(model).toObject(ScaleRule.class); - Assertions.assertEquals("ubeddg", model.name()); - Assertions.assertEquals("fwqmzqalkrmn", model.azureQueue().queueName()); - Assertions.assertEquals(1174672424, model.azureQueue().queueLength()); - Assertions.assertEquals("cqqudf", model.azureQueue().auth().get(0).secretRef()); - Assertions.assertEquals("yxbaaabjyvayf", model.azureQueue().auth().get(0).triggerParameter()); - Assertions.assertEquals("soibjudpfrx", model.custom().type()); - Assertions.assertEquals("hzv", model.custom().metadata().get("ytdw")); - Assertions.assertEquals("mxjezwlw", model.custom().auth().get(0).secretRef()); - Assertions.assertEquals("xuqlcvydypat", model.custom().auth().get(0).triggerParameter()); - Assertions.assertEquals("wj", model.http().metadata().get("fltkacjv")); - Assertions.assertEquals("lfoakg", model.http().auth().get(0).secretRef()); - Assertions.assertEquals("fpagaowpulp", model.http().auth().get(0).triggerParameter()); - Assertions.assertEquals("jervtia", model.tcp().metadata().get("xsdszuempsb")); - Assertions.assertEquals("dxrbuukzcle", model.tcp().auth().get(0).secretRef()); - Assertions.assertEquals("hmlwpaztzpo", model.tcp().auth().get(0).triggerParameter()); - } - - @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/ScaleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleTests.java deleted file mode 100644 index 704b38964089..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ScaleTests.java +++ /dev/null @@ -1,89 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; -import com.azure.resourcemanager.appcontainers.models.HttpScaleRule; -import com.azure.resourcemanager.appcontainers.models.QueueScaleRule; -import com.azure.resourcemanager.appcontainers.models.Scale; -import com.azure.resourcemanager.appcontainers.models.ScaleRule; -import com.azure.resourcemanager.appcontainers.models.TcpScaleRule; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class ScaleTests { - @Test - public void testDeserialize() { - Scale model = - BinaryData - .fromString( - "{\"minReplicas\":277220596,\"maxReplicas\":1475802306,\"rules\":[{\"name\":\"pxllrx\",\"azureQueue\":{\"queueName\":\"moadsuvarmy\",\"queueLength\":1450729079,\"auth\":[]},\"custom\":{\"type\":\"q\",\"metadata\":{},\"auth\":[]},\"http\":{\"metadata\":{},\"auth\":[]},\"tcp\":{\"metadata\":{},\"auth\":[]}},{\"name\":\"yc\",\"azureQueue\":{\"queueName\":\"hp\",\"queueLength\":1622537719,\"auth\":[]},\"custom\":{\"type\":\"areqna\",\"metadata\":{},\"auth\":[]},\"http\":{\"metadata\":{},\"auth\":[]},\"tcp\":{\"metadata\":{},\"auth\":[]}}]}") - .toObject(Scale.class); - Assertions.assertEquals(277220596, model.minReplicas()); - Assertions.assertEquals(1475802306, model.maxReplicas()); - Assertions.assertEquals("pxllrx", model.rules().get(0).name()); - Assertions.assertEquals("moadsuvarmy", model.rules().get(0).azureQueue().queueName()); - Assertions.assertEquals(1450729079, model.rules().get(0).azureQueue().queueLength()); - Assertions.assertEquals("q", model.rules().get(0).custom().type()); - } - - @Test - public void testSerialize() { - Scale model = - new Scale() - .withMinReplicas(277220596) - .withMaxReplicas(1475802306) - .withRules( - Arrays - .asList( - new ScaleRule() - .withName("pxllrx") - .withAzureQueue( - new QueueScaleRule() - .withQueueName("moadsuvarmy") - .withQueueLength(1450729079) - .withAuth(Arrays.asList())) - .withCustom( - new CustomScaleRule().withType("q").withMetadata(mapOf()).withAuth(Arrays.asList())) - .withHttp(new HttpScaleRule().withMetadata(mapOf()).withAuth(Arrays.asList())) - .withTcp(new TcpScaleRule().withMetadata(mapOf()).withAuth(Arrays.asList())), - new ScaleRule() - .withName("yc") - .withAzureQueue( - new QueueScaleRule() - .withQueueName("hp") - .withQueueLength(1622537719) - .withAuth(Arrays.asList())) - .withCustom( - new CustomScaleRule() - .withType("areqna") - .withMetadata(mapOf()) - .withAuth(Arrays.asList())) - .withHttp(new HttpScaleRule().withMetadata(mapOf()).withAuth(Arrays.asList())) - .withTcp(new TcpScaleRule().withMetadata(mapOf()).withAuth(Arrays.asList())))); - model = BinaryData.fromObject(model).toObject(Scale.class); - Assertions.assertEquals(277220596, model.minReplicas()); - Assertions.assertEquals(1475802306, model.maxReplicas()); - Assertions.assertEquals("pxllrx", model.rules().get(0).name()); - Assertions.assertEquals("moadsuvarmy", model.rules().get(0).azureQueue().queueName()); - Assertions.assertEquals(1450729079, model.rules().get(0).azureQueue().queueLength()); - Assertions.assertEquals("q", model.rules().get(0).custom().type()); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SecretTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SecretTests.java deleted file mode 100644 index f50d916afccb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SecretTests.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.Secret; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SecretTests { - @Test - public void testDeserialize() { - Secret model = BinaryData.fromString("{\"name\":\"k\",\"value\":\"ali\"}").toObject(Secret.class); - Assertions.assertEquals("k", model.name()); - Assertions.assertEquals("ali", model.value()); - } - - @Test - public void testSerialize() { - Secret model = new Secret().withName("k").withValue("ali"); - model = BinaryData.fromObject(model).toObject(Secret.class); - Assertions.assertEquals("k", model.name()); - Assertions.assertEquals("ali", model.value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SecretsCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SecretsCollectionInnerTests.java deleted file mode 100644 index 728c1021123f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SecretsCollectionInnerTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.SecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.ContainerAppSecret; -import java.util.Arrays; -import org.junit.jupiter.api.Test; - -public final class SecretsCollectionInnerTests { - @Test - public void testDeserialize() { - SecretsCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"racstwity\",\"value\":\"evxccedcp\"},{\"name\":\"dyodnwzxltj\",\"value\":\"nhltiugcxn\"},{\"name\":\"vwxqibyqunyo\",\"value\":\"wlmdjrkv\"},{\"name\":\"bvfvpdbod\",\"value\":\"izsjqlhkrr\"}]}") - .toObject(SecretsCollectionInner.class); - } - - @Test - public void testSerialize() { - SecretsCollectionInner model = - new SecretsCollectionInner() - .withValue( - Arrays - .asList( - new ContainerAppSecret(), - new ContainerAppSecret(), - new ContainerAppSecret(), - new ContainerAppSecret())); - model = BinaryData.fromObject(model).toObject(SecretsCollectionInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlCollectionTests.java deleted file mode 100644 index ca43891e15c8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlCollectionTests.java +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.SourceControlInner; -import com.azure.resourcemanager.appcontainers.models.SourceControlCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SourceControlCollectionTests { - @Test - public void testDeserialize() { - SourceControlCollection model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"operationState\":\"Canceled\",\"repoUrl\":\"mtggu\",\"branch\":\"ijr\"},\"id\":\"ivmmghfcfiwrxgk\",\"name\":\"euvyinzqodfvpgs\",\"type\":\"oxgsgbpfgzdjtx\"},{\"properties\":{\"operationState\":\"Canceled\",\"repoUrl\":\"q\",\"branch\":\"aqvlgafcqusr\"},\"id\":\"t\",\"name\":\"wsdtutnwl\",\"type\":\"uycvuzhyrmewip\"},{\"properties\":{\"operationState\":\"InProgress\",\"repoUrl\":\"xukuqgsj\",\"branch\":\"undxgketw\"},\"id\":\"zjhfjmhvv\",\"name\":\"uvgp\",\"type\":\"uneqsxvmhf\"},{\"properties\":{\"operationState\":\"Canceled\",\"repoUrl\":\"ihsasb\",\"branch\":\"dyp\"},\"id\":\"uemsly\",\"name\":\"sqy\",\"type\":\"pfoobr\"}],\"nextLink\":\"tyms\"}") - .toObject(SourceControlCollection.class); - Assertions.assertEquals("mtggu", model.value().get(0).repoUrl()); - Assertions.assertEquals("ijr", model.value().get(0).branch()); - } - - @Test - public void testSerialize() { - SourceControlCollection model = - new SourceControlCollection() - .withValue( - Arrays - .asList( - new SourceControlInner().withRepoUrl("mtggu").withBranch("ijr"), - new SourceControlInner().withRepoUrl("q").withBranch("aqvlgafcqusr"), - new SourceControlInner().withRepoUrl("xukuqgsj").withBranch("undxgketw"), - new SourceControlInner().withRepoUrl("ihsasb").withBranch("dyp"))); - model = BinaryData.fromObject(model).toObject(SourceControlCollection.class); - Assertions.assertEquals("mtggu", model.value().get(0).repoUrl()); - Assertions.assertEquals("ijr", model.value().get(0).branch()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlInnerTests.java deleted file mode 100644 index dfd718e91ff0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/SourceControlInnerTests.java +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.SourceControlInner; -import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class SourceControlInnerTests { - @Test - public void testDeserialize() { - SourceControlInner model = - BinaryData - .fromString( - "{\"properties\":{\"operationState\":\"Failed\",\"repoUrl\":\"dnfwqzdzg\",\"branch\":\"la\",\"githubActionConfiguration\":{\"contextPath\":\"qlyvijo\",\"image\":\"iv\",\"publishType\":\"oyzunbixxr\",\"os\":\"kvcpwpgclr\",\"runtimeStack\":\"vtsoxf\",\"runtimeVersion\":\"enxpmyyefr\"}},\"id\":\"pdnqqskawaoqvmmb\",\"name\":\"pqfrtqlkz\",\"type\":\"egnitg\"}") - .toObject(SourceControlInner.class); - Assertions.assertEquals("dnfwqzdzg", model.repoUrl()); - Assertions.assertEquals("la", model.branch()); - Assertions.assertEquals("qlyvijo", model.githubActionConfiguration().contextPath()); - Assertions.assertEquals("iv", model.githubActionConfiguration().image()); - Assertions.assertEquals("oyzunbixxr", model.githubActionConfiguration().publishType()); - Assertions.assertEquals("kvcpwpgclr", model.githubActionConfiguration().os()); - Assertions.assertEquals("vtsoxf", model.githubActionConfiguration().runtimeStack()); - Assertions.assertEquals("enxpmyyefr", model.githubActionConfiguration().runtimeVersion()); - } - - @Test - public void testSerialize() { - SourceControlInner model = - new SourceControlInner() - .withRepoUrl("dnfwqzdzg") - .withBranch("la") - .withGithubActionConfiguration( - new GithubActionConfiguration() - .withContextPath("qlyvijo") - .withImage("iv") - .withPublishType("oyzunbixxr") - .withOs("kvcpwpgclr") - .withRuntimeStack("vtsoxf") - .withRuntimeVersion("enxpmyyefr")); - model = BinaryData.fromObject(model).toObject(SourceControlInner.class); - Assertions.assertEquals("dnfwqzdzg", model.repoUrl()); - Assertions.assertEquals("la", model.branch()); - Assertions.assertEquals("qlyvijo", model.githubActionConfiguration().contextPath()); - Assertions.assertEquals("iv", model.githubActionConfiguration().image()); - Assertions.assertEquals("oyzunbixxr", model.githubActionConfiguration().publishType()); - Assertions.assertEquals("kvcpwpgclr", model.githubActionConfiguration().os()); - Assertions.assertEquals("vtsoxf", model.githubActionConfiguration().runtimeStack()); - Assertions.assertEquals("enxpmyyefr", model.githubActionConfiguration().runtimeVersion()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpScaleRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpScaleRuleTests.java deleted file mode 100644 index d62489c363d6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TcpScaleRuleTests.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.ScaleRuleAuth; -import com.azure.resourcemanager.appcontainers.models.TcpScaleRule; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class TcpScaleRuleTests { - @Test - public void testDeserialize() { - TcpScaleRule model = - BinaryData - .fromString( - "{\"metadata\":{\"twaenuuzko\":\"ufgmjzrwrdg\",\"iefozbhdmsml\":\"bminrfdwoyuhhzi\"},\"auth\":[{\"secretRef\":\"oftrmaequia\",\"triggerParameter\":\"icslfaoq\"},{\"secretRef\":\"iyylhalnswhccsp\",\"triggerParameter\":\"aivwitqscywu\"},{\"secretRef\":\"woluhczbwemhair\",\"triggerParameter\":\"rgzdwmsweyp\"},{\"secretRef\":\"dxggicccnxqhuexm\",\"triggerParameter\":\"tlstvlzywem\"}]}") - .toObject(TcpScaleRule.class); - Assertions.assertEquals("ufgmjzrwrdg", model.metadata().get("twaenuuzko")); - Assertions.assertEquals("oftrmaequia", model.auth().get(0).secretRef()); - Assertions.assertEquals("icslfaoq", model.auth().get(0).triggerParameter()); - } - - @Test - public void testSerialize() { - TcpScaleRule model = - new TcpScaleRule() - .withMetadata(mapOf("twaenuuzko", "ufgmjzrwrdg", "iefozbhdmsml", "bminrfdwoyuhhzi")) - .withAuth( - Arrays - .asList( - new ScaleRuleAuth().withSecretRef("oftrmaequia").withTriggerParameter("icslfaoq"), - new ScaleRuleAuth().withSecretRef("iyylhalnswhccsp").withTriggerParameter("aivwitqscywu"), - new ScaleRuleAuth().withSecretRef("woluhczbwemhair").withTriggerParameter("rgzdwmsweyp"), - new ScaleRuleAuth().withSecretRef("dxggicccnxqhuexm").withTriggerParameter("tlstvlzywem"))); - model = BinaryData.fromObject(model).toObject(TcpScaleRule.class); - Assertions.assertEquals("ufgmjzrwrdg", model.metadata().get("twaenuuzko")); - Assertions.assertEquals("oftrmaequia", model.auth().get(0).secretRef()); - Assertions.assertEquals("icslfaoq", model.auth().get(0).triggerParameter()); - } - - @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/TemplateTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TemplateTests.java deleted file mode 100644 index 4343123445bd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TemplateTests.java +++ /dev/null @@ -1,158 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Container; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.InitContainer; -import com.azure.resourcemanager.appcontainers.models.Scale; -import com.azure.resourcemanager.appcontainers.models.ScaleRule; -import com.azure.resourcemanager.appcontainers.models.StorageType; -import com.azure.resourcemanager.appcontainers.models.Template; -import com.azure.resourcemanager.appcontainers.models.Volume; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class TemplateTests { - @Test - public void testDeserialize() { - Template model = - BinaryData - .fromString( - "{\"revisionSuffix\":\"mcqibycnojv\",\"initContainers\":[{\"image\":\"fqsgzvahapjy\",\"name\":\"pvgqzcjrvxdjzlm\",\"command\":[\"kvugfhzovawjvzun\",\"uthnnprnxipeilpj\",\"uaejxdultsk\"],\"args\":[\"tdzumveekgpw\",\"zuhkfpbsjyof\",\"xl\"],\"env\":[],\"resources\":{\"cpu\":63.45978205100479,\"memory\":\"waboe\",\"ephemeralStorage\":\"v\"},\"volumeMounts\":[]},{\"image\":\"smv\",\"name\":\"wyjsflhhcaalnjix\",\"command\":[\"yaw\",\"oyaqcslyjpkiid\"],\"args\":[\"xznelixhnrztf\",\"lhbnxkna\",\"aulppggd\"],\"env\":[],\"resources\":{\"cpu\":62.44640700433306,\"memory\":\"ropuhpigv\",\"ephemeralStorage\":\"ylgqgitxmedjvcsl\"},\"volumeMounts\":[]},{\"image\":\"wncwzzhxgktrmg\",\"name\":\"napkteoellw\",\"command\":[\"d\",\"gpfqbuace\",\"pzfqrhhuaoppp\",\"qeqxo\"],\"args\":[\"ahzxctobgbk\",\"moizpos\",\"mgrcfbu\"],\"env\":[],\"resources\":{\"cpu\":39.820918987867984,\"memory\":\"kxbpvj\",\"ephemeralStorage\":\"jhxxjyn\"},\"volumeMounts\":[]},{\"image\":\"vkr\",\"name\":\"wbxqzvszjfau\",\"command\":[\"dxxiv\",\"tvtc\",\"aqtdoqmcbx\",\"wvxysl\"],\"args\":[\"sfxobl\",\"tkblmpewww\",\"bkrvrnsvshqj\"],\"env\":[],\"resources\":{\"cpu\":26.217415829732616,\"memory\":\"ovasrruvwbhsqfsu\",\"ephemeralStorage\":\"gjb\"},\"volumeMounts\":[]}],\"containers\":[{\"probes\":[],\"image\":\"rfbjf\",\"name\":\"w\",\"command\":[\"t\",\"tpvjzbexilzznfqq\",\"vwpm\",\"taruoujmkcj\"],\"args\":[\"ytjrybnwjewgdr\",\"ervnaenqpehi\",\"doy\",\"mifthnzdnd\"],\"env\":[],\"resources\":{\"cpu\":9.874823960807245,\"memory\":\"gynduha\",\"ephemeralStorage\":\"qlkth\"},\"volumeMounts\":[]},{\"probes\":[],\"image\":\"bgycduiertgccym\",\"name\":\"olpsslqlf\",\"command\":[\"n\",\"bglzpswi\",\"d\"],\"args\":[\"yhz\",\"xssadbzmnvdf\"],\"env\":[],\"resources\":{\"cpu\":6.678154863771269,\"memory\":\"xzb\",\"ephemeralStorage\":\"blylpstdbh\"},\"volumeMounts\":[]},{\"probes\":[],\"image\":\"zucerscdntnev\",\"name\":\"wjmy\",\"command\":[\"sslswtmweriof\",\"pyqs\"],\"args\":[\"abnetshh\"],\"env\":[],\"resources\":{\"cpu\":83.1289050402311,\"memory\":\"wiwubm\",\"ephemeralStorage\":\"besldnkwwtppjflc\"},\"volumeMounts\":[]}],\"scale\":{\"minReplicas\":97204853,\"maxReplicas\":244687825,\"rules\":[{\"name\":\"sikvmkqzeqqkdlt\"}]},\"volumes\":[{\"name\":\"gureodkwobdag\",\"storageType\":\"EmptyDir\",\"storageName\":\"qdxbxwa\"}]}") - .toObject(Template.class); - Assertions.assertEquals("mcqibycnojv", model.revisionSuffix()); - Assertions.assertEquals("fqsgzvahapjy", model.initContainers().get(0).image()); - Assertions.assertEquals("pvgqzcjrvxdjzlm", model.initContainers().get(0).name()); - Assertions.assertEquals("kvugfhzovawjvzun", model.initContainers().get(0).command().get(0)); - Assertions.assertEquals("tdzumveekgpw", model.initContainers().get(0).args().get(0)); - Assertions.assertEquals(63.45978205100479D, model.initContainers().get(0).resources().cpu()); - Assertions.assertEquals("waboe", model.initContainers().get(0).resources().memory()); - Assertions.assertEquals("rfbjf", model.containers().get(0).image()); - Assertions.assertEquals("w", model.containers().get(0).name()); - Assertions.assertEquals("t", model.containers().get(0).command().get(0)); - Assertions.assertEquals("ytjrybnwjewgdr", model.containers().get(0).args().get(0)); - Assertions.assertEquals(9.874823960807245D, model.containers().get(0).resources().cpu()); - Assertions.assertEquals("gynduha", model.containers().get(0).resources().memory()); - Assertions.assertEquals(97204853, model.scale().minReplicas()); - Assertions.assertEquals(244687825, model.scale().maxReplicas()); - Assertions.assertEquals("sikvmkqzeqqkdlt", model.scale().rules().get(0).name()); - Assertions.assertEquals("gureodkwobdag", model.volumes().get(0).name()); - Assertions.assertEquals(StorageType.EMPTY_DIR, model.volumes().get(0).storageType()); - Assertions.assertEquals("qdxbxwa", model.volumes().get(0).storageName()); - } - - @Test - public void testSerialize() { - Template model = - new Template() - .withRevisionSuffix("mcqibycnojv") - .withInitContainers( - Arrays - .asList( - new InitContainer() - .withImage("fqsgzvahapjy") - .withName("pvgqzcjrvxdjzlm") - .withCommand(Arrays.asList("kvugfhzovawjvzun", "uthnnprnxipeilpj", "uaejxdultsk")) - .withArgs(Arrays.asList("tdzumveekgpw", "zuhkfpbsjyof", "xl")) - .withEnv(Arrays.asList()) - .withResources(new ContainerResources().withCpu(63.45978205100479D).withMemory("waboe")) - .withVolumeMounts(Arrays.asList()), - new InitContainer() - .withImage("smv") - .withName("wyjsflhhcaalnjix") - .withCommand(Arrays.asList("yaw", "oyaqcslyjpkiid")) - .withArgs(Arrays.asList("xznelixhnrztf", "lhbnxkna", "aulppggd")) - .withEnv(Arrays.asList()) - .withResources( - new ContainerResources().withCpu(62.44640700433306D).withMemory("ropuhpigv")) - .withVolumeMounts(Arrays.asList()), - new InitContainer() - .withImage("wncwzzhxgktrmg") - .withName("napkteoellw") - .withCommand(Arrays.asList("d", "gpfqbuace", "pzfqrhhuaoppp", "qeqxo")) - .withArgs(Arrays.asList("ahzxctobgbk", "moizpos", "mgrcfbu")) - .withEnv(Arrays.asList()) - .withResources( - new ContainerResources().withCpu(39.820918987867984D).withMemory("kxbpvj")) - .withVolumeMounts(Arrays.asList()), - new InitContainer() - .withImage("vkr") - .withName("wbxqzvszjfau") - .withCommand(Arrays.asList("dxxiv", "tvtc", "aqtdoqmcbx", "wvxysl")) - .withArgs(Arrays.asList("sfxobl", "tkblmpewww", "bkrvrnsvshqj")) - .withEnv(Arrays.asList()) - .withResources( - new ContainerResources() - .withCpu(26.217415829732616D) - .withMemory("ovasrruvwbhsqfsu")) - .withVolumeMounts(Arrays.asList()))) - .withContainers( - Arrays - .asList( - new Container() - .withImage("rfbjf") - .withName("w") - .withCommand(Arrays.asList("t", "tpvjzbexilzznfqq", "vwpm", "taruoujmkcj")) - .withArgs(Arrays.asList("ytjrybnwjewgdr", "ervnaenqpehi", "doy", "mifthnzdnd")) - .withEnv(Arrays.asList()) - .withResources( - new ContainerResources().withCpu(9.874823960807245D).withMemory("gynduha")) - .withVolumeMounts(Arrays.asList()) - .withProbes(Arrays.asList()), - new Container() - .withImage("bgycduiertgccym") - .withName("olpsslqlf") - .withCommand(Arrays.asList("n", "bglzpswi", "d")) - .withArgs(Arrays.asList("yhz", "xssadbzmnvdf")) - .withEnv(Arrays.asList()) - .withResources(new ContainerResources().withCpu(6.678154863771269D).withMemory("xzb")) - .withVolumeMounts(Arrays.asList()) - .withProbes(Arrays.asList()), - new Container() - .withImage("zucerscdntnev") - .withName("wjmy") - .withCommand(Arrays.asList("sslswtmweriof", "pyqs")) - .withArgs(Arrays.asList("abnetshh")) - .withEnv(Arrays.asList()) - .withResources(new ContainerResources().withCpu(83.1289050402311D).withMemory("wiwubm")) - .withVolumeMounts(Arrays.asList()) - .withProbes(Arrays.asList()))) - .withScale( - new Scale() - .withMinReplicas(97204853) - .withMaxReplicas(244687825) - .withRules(Arrays.asList(new ScaleRule().withName("sikvmkqzeqqkdlt")))) - .withVolumes( - Arrays - .asList( - new Volume() - .withName("gureodkwobdag") - .withStorageType(StorageType.EMPTY_DIR) - .withStorageName("qdxbxwa"))); - model = BinaryData.fromObject(model).toObject(Template.class); - Assertions.assertEquals("mcqibycnojv", model.revisionSuffix()); - Assertions.assertEquals("fqsgzvahapjy", model.initContainers().get(0).image()); - Assertions.assertEquals("pvgqzcjrvxdjzlm", model.initContainers().get(0).name()); - Assertions.assertEquals("kvugfhzovawjvzun", model.initContainers().get(0).command().get(0)); - Assertions.assertEquals("tdzumveekgpw", model.initContainers().get(0).args().get(0)); - Assertions.assertEquals(63.45978205100479D, model.initContainers().get(0).resources().cpu()); - Assertions.assertEquals("waboe", model.initContainers().get(0).resources().memory()); - Assertions.assertEquals("rfbjf", model.containers().get(0).image()); - Assertions.assertEquals("w", model.containers().get(0).name()); - Assertions.assertEquals("t", model.containers().get(0).command().get(0)); - Assertions.assertEquals("ytjrybnwjewgdr", model.containers().get(0).args().get(0)); - Assertions.assertEquals(9.874823960807245D, model.containers().get(0).resources().cpu()); - Assertions.assertEquals("gynduha", model.containers().get(0).resources().memory()); - Assertions.assertEquals(97204853, model.scale().minReplicas()); - Assertions.assertEquals(244687825, model.scale().maxReplicas()); - Assertions.assertEquals("sikvmkqzeqqkdlt", model.scale().rules().get(0).name()); - Assertions.assertEquals("gureodkwobdag", model.volumes().get(0).name()); - Assertions.assertEquals(StorageType.EMPTY_DIR, model.volumes().get(0).storageType()); - Assertions.assertEquals("qdxbxwa", model.volumes().get(0).storageName()); - } -} 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 49d809a3ba2f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TrafficWeightTests.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.TrafficWeight; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class TrafficWeightTests { - @Test - public void testDeserialize() { - TrafficWeight model = - BinaryData - .fromString( - "{\"revisionName\":\"nbmpowuwprzq\",\"weight\":706936275,\"latestRevision\":false,\"label\":\"upjm\"}") - .toObject(TrafficWeight.class); - Assertions.assertEquals("nbmpowuwprzq", model.revisionName()); - Assertions.assertEquals(706936275, model.weight()); - Assertions.assertEquals(false, model.latestRevision()); - Assertions.assertEquals("upjm", model.label()); - } - - @Test - public void testSerialize() { - TrafficWeight model = - new TrafficWeight() - .withRevisionName("nbmpowuwprzq") - .withWeight(706936275) - .withLatestRevision(false) - .withLabel("upjm"); - model = BinaryData.fromObject(model).toObject(TrafficWeight.class); - Assertions.assertEquals("nbmpowuwprzq", model.revisionName()); - Assertions.assertEquals(706936275, model.weight()); - Assertions.assertEquals(false, model.latestRevision()); - Assertions.assertEquals("upjm", model.label()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.java deleted file mode 100644 index 1633158b2f51..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.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.UserAssignedIdentity; -import org.junit.jupiter.api.Test; - -public final class UserAssignedIdentityTests { - @Test - public void testDeserialize() { - UserAssignedIdentity model = BinaryData.fromString("{}").toObject(UserAssignedIdentity.class); - } - - @Test - public void testSerialize() { - 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 7da57ae8a6d6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VnetConfigurationTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentOutBoundType; -import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentOutboundSettings; -import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class VnetConfigurationTests { - @Test - public void testDeserialize() { - VnetConfiguration model = - BinaryData - .fromString( - "{\"internal\":true,\"infrastructureSubnetId\":\"er\",\"runtimeSubnetId\":\"pqbmfpjbab\",\"dockerBridgeCidr\":\"dfc\",\"platformReservedCidr\":\"spuunnoxyhkxgq\",\"platformReservedDnsIP\":\"rihpfhoq\",\"outboundSettings\":{\"outBoundType\":\"LoadBalancer\",\"virtualNetworkApplianceIp\":\"dao\"}}") - .toObject(VnetConfiguration.class); - Assertions.assertEquals(true, model.internal()); - Assertions.assertEquals("er", model.infrastructureSubnetId()); - Assertions.assertEquals("pqbmfpjbab", model.runtimeSubnetId()); - Assertions.assertEquals("dfc", model.dockerBridgeCidr()); - Assertions.assertEquals("spuunnoxyhkxgq", model.platformReservedCidr()); - Assertions.assertEquals("rihpfhoq", model.platformReservedDnsIp()); - Assertions.assertEquals(ManagedEnvironmentOutBoundType.LOAD_BALANCER, model.outboundSettings().outBoundType()); - Assertions.assertEquals("dao", model.outboundSettings().virtualNetworkApplianceIp()); - } - - @Test - public void testSerialize() { - VnetConfiguration model = - new VnetConfiguration() - .withInternal(true) - .withInfrastructureSubnetId("er") - .withRuntimeSubnetId("pqbmfpjbab") - .withDockerBridgeCidr("dfc") - .withPlatformReservedCidr("spuunnoxyhkxgq") - .withPlatformReservedDnsIp("rihpfhoq") - .withOutboundSettings( - new ManagedEnvironmentOutboundSettings() - .withOutBoundType(ManagedEnvironmentOutBoundType.LOAD_BALANCER) - .withVirtualNetworkApplianceIp("dao")); - model = BinaryData.fromObject(model).toObject(VnetConfiguration.class); - Assertions.assertEquals(true, model.internal()); - Assertions.assertEquals("er", model.infrastructureSubnetId()); - Assertions.assertEquals("pqbmfpjbab", model.runtimeSubnetId()); - Assertions.assertEquals("dfc", model.dockerBridgeCidr()); - Assertions.assertEquals("spuunnoxyhkxgq", model.platformReservedCidr()); - Assertions.assertEquals("rihpfhoq", model.platformReservedDnsIp()); - Assertions.assertEquals(ManagedEnvironmentOutBoundType.LOAD_BALANCER, model.outboundSettings().outBoundType()); - Assertions.assertEquals("dao", model.outboundSettings().virtualNetworkApplianceIp()); - } -} 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 eb336740d619..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeMountTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.VolumeMount; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class VolumeMountTests { - @Test - public void testDeserialize() { - VolumeMount model = - BinaryData - .fromString("{\"volumeName\":\"btkuwhh\",\"mountPath\":\"ykojoxafnndlpic\"}") - .toObject(VolumeMount.class); - Assertions.assertEquals("btkuwhh", model.volumeName()); - Assertions.assertEquals("ykojoxafnndlpic", model.mountPath()); - } - - @Test - public void testSerialize() { - VolumeMount model = new VolumeMount().withVolumeName("btkuwhh").withMountPath("ykojoxafnndlpic"); - model = BinaryData.fromObject(model).toObject(VolumeMount.class); - Assertions.assertEquals("btkuwhh", model.volumeName()); - Assertions.assertEquals("ykojoxafnndlpic", model.mountPath()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeTests.java deleted file mode 100644 index c384f073f8b2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeTests.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.StorageType; -import com.azure.resourcemanager.appcontainers.models.Volume; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class VolumeTests { - @Test - public void testDeserialize() { - Volume model = - BinaryData - .fromString("{\"name\":\"rncsdtclu\",\"storageType\":\"EmptyDir\",\"storageName\":\"bsfgytguslfea\"}") - .toObject(Volume.class); - Assertions.assertEquals("rncsdtclu", model.name()); - Assertions.assertEquals(StorageType.EMPTY_DIR, model.storageType()); - Assertions.assertEquals("bsfgytguslfea", model.storageName()); - } - - @Test - public void testSerialize() { - Volume model = - new Volume().withName("rncsdtclu").withStorageType(StorageType.EMPTY_DIR).withStorageName("bsfgytguslfea"); - model = BinaryData.fromObject(model).toObject(Volume.class); - Assertions.assertEquals("rncsdtclu", model.name()); - Assertions.assertEquals(StorageType.EMPTY_DIR, model.storageType()); - Assertions.assertEquals("bsfgytguslfea", model.storageName()); - } -} 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 dd61687caefa..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesCollectionTests.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.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; -import org.junit.jupiter.api.Test; - -public final class WorkloadProfileStatesCollectionTests { - @Test - public void testDeserialize() { - WorkloadProfileStatesCollection model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"minimumCount\":1215063805,\"maximumCount\":1612515115,\"currentCount\":75239046},\"id\":\"metttwgd\",\"name\":\"lqxihhrmooiz\",\"type\":\"seypxiutcxapz\"}],\"nextLink\":\"rpetogebjoxsl\"}") - .toObject(WorkloadProfileStatesCollection.class); - Assertions.assertEquals(1215063805, model.value().get(0).properties().minimumCount()); - Assertions.assertEquals(1612515115, model.value().get(0).properties().maximumCount()); - Assertions.assertEquals(75239046, model.value().get(0).properties().currentCount()); - } - - @Test - public void testSerialize() { - WorkloadProfileStatesCollection model = - new WorkloadProfileStatesCollection() - .withValue( - Arrays - .asList( - new WorkloadProfileStatesInner() - .withProperties( - new WorkloadProfileStatesProperties() - .withMinimumCount(1215063805) - .withMaximumCount(1612515115) - .withCurrentCount(75239046)))); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesCollection.class); - Assertions.assertEquals(1215063805, model.value().get(0).properties().minimumCount()); - Assertions.assertEquals(1612515115, model.value().get(0).properties().maximumCount()); - Assertions.assertEquals(75239046, 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 6ae23c1eb328..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesInnerTests.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.WorkloadProfileStatesInner; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class WorkloadProfileStatesInnerTests { - @Test - public void testDeserialize() { - WorkloadProfileStatesInner model = - BinaryData - .fromString( - "{\"properties\":{\"minimumCount\":1522179907,\"maximumCount\":255034362,\"currentCount\":1064191938},\"id\":\"nk\",\"name\":\"zjcjbtr\",\"type\":\"aehvvibrxjjstoq\"}") - .toObject(WorkloadProfileStatesInner.class); - Assertions.assertEquals(1522179907, model.properties().minimumCount()); - Assertions.assertEquals(255034362, model.properties().maximumCount()); - Assertions.assertEquals(1064191938, model.properties().currentCount()); - } - - @Test - public void testSerialize() { - WorkloadProfileStatesInner model = - new WorkloadProfileStatesInner() - .withProperties( - new WorkloadProfileStatesProperties() - .withMinimumCount(1522179907) - .withMaximumCount(255034362) - .withCurrentCount(1064191938)); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesInner.class); - Assertions.assertEquals(1522179907, model.properties().minimumCount()); - Assertions.assertEquals(255034362, model.properties().maximumCount()); - Assertions.assertEquals(1064191938, 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 7fe7ba5a869b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesPropertiesTests.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.WorkloadProfileStatesProperties; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class WorkloadProfileStatesPropertiesTests { - @Test - public void testDeserialize() { - WorkloadProfileStatesProperties model = - BinaryData - .fromString("{\"minimumCount\":449265761,\"maximumCount\":774286462,\"currentCount\":1086468364}") - .toObject(WorkloadProfileStatesProperties.class); - Assertions.assertEquals(449265761, model.minimumCount()); - Assertions.assertEquals(774286462, model.maximumCount()); - Assertions.assertEquals(1086468364, model.currentCount()); - } - - @Test - public void testSerialize() { - WorkloadProfileStatesProperties model = - new WorkloadProfileStatesProperties() - .withMinimumCount(449265761) - .withMaximumCount(774286462) - .withCurrentCount(1086468364); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesProperties.class); - Assertions.assertEquals(449265761, model.minimumCount()); - Assertions.assertEquals(774286462, model.maximumCount()); - Assertions.assertEquals(1086468364, 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 83588dd997c4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileTests.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.WorkloadProfile; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; - -public final class WorkloadProfileTests { - @Test - public void testDeserialize() { - WorkloadProfile model = - BinaryData - .fromString( - "{\"workloadProfileType\":\"wzjbh\",\"minimumCount\":1608749608,\"maximumCount\":1253939074}") - .toObject(WorkloadProfile.class); - Assertions.assertEquals("wzjbh", model.workloadProfileType()); - Assertions.assertEquals(1608749608, model.minimumCount()); - Assertions.assertEquals(1253939074, model.maximumCount()); - } - - @Test - public void testSerialize() { - WorkloadProfile model = - new WorkloadProfile() - .withWorkloadProfileType("wzjbh") - .withMinimumCount(1608749608) - .withMaximumCount(1253939074); - model = BinaryData.fromObject(model).toObject(WorkloadProfile.class); - Assertions.assertEquals("wzjbh", model.workloadProfileType()); - Assertions.assertEquals(1608749608, model.minimumCount()); - Assertions.assertEquals(1253939074, model.maximumCount()); - } -}