diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md index 92cf4d539768..0409b041af44 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.7 (Unreleased) +## 1.0.0-beta.1 (2024-03-09) + +- Azure Resource Manager ContainerAppsApi client library for Java. This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions extension resource. Package tag package-preview-2024-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md index 7e58ce2f26af..0a5f8422c7e3 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-2023-05. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions extension resource. Package tag package-preview-2024-02. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ## We'd love to hear your feedback @@ -32,7 +32,7 @@ Various documentation is available to help you get started com.azure.resourcemanager azure-resourcemanager-appcontainers - 1.0.0-beta.6 + 1.0.0-beta.7 ``` [//]: # ({x-version-update-end}) @@ -45,7 +45,7 @@ Azure Management Libraries require a `TokenCredential` implementation for authen ### Authentication -By default, Azure Active Directory token authentication depends on correct configuration of the following environment variables. +By default, Microsoft Entra ID 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. @@ -94,7 +94,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m [survey]: https://microsoft.qualtrics.com/jfe/form/SV_ehN0lIk2FKEBkwd?Q_CHL=DOCS [docs]: https://azure.github.io/azure-sdk-for-java/ -[jdk]: https://docs.microsoft.com/java/azure/jdk/ +[jdk]: https://learn.microsoft.com/azure/developer/java/fundamentals/ [azure_subscription]: https://azure.microsoft.com/free/ [azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity [azure_core_http_netty]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core-http-netty diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md index 961f0002cf98..b1d7f6405f82 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md @@ -1,6 +1,14 @@ # Code snippets and samples +## AppResiliency + +- [CreateOrUpdate](#appresiliency_createorupdate) +- [Delete](#appresiliency_delete) +- [Get](#appresiliency_get) +- [List](#appresiliency_list) +- [Update](#appresiliency_update) + ## AvailableWorkloadProfiles - [Get](#availableworkloadprofiles_get) @@ -9,6 +17,29 @@ - [Get](#billingmeters_get) +## BuildAuthToken + +- [List](#buildauthtoken_list) + +## Builders + +- [CreateOrUpdate](#builders_createorupdate) +- [Delete](#builders_delete) +- [GetByResourceGroup](#builders_getbyresourcegroup) +- [List](#builders_list) +- [ListByResourceGroup](#builders_listbyresourcegroup) +- [Update](#builders_update) + +## Builds + +- [CreateOrUpdate](#builds_createorupdate) +- [Delete](#builds_delete) +- [Get](#builds_get) + +## BuildsByBuilderResource + +- [List](#buildsbybuilderresource_list) + ## Certificates - [CreateOrUpdate](#certificates_createorupdate) @@ -99,6 +130,13 @@ - [Get](#containerappssourcecontrols_get) - [ListByContainerApp](#containerappssourcecontrols_listbycontainerapp) +## DaprComponentResiliencyPolicies + +- [CreateOrUpdate](#daprcomponentresiliencypolicies_createorupdate) +- [Delete](#daprcomponentresiliencypolicies_delete) +- [Get](#daprcomponentresiliencypolicies_get) +- [List](#daprcomponentresiliencypolicies_list) + ## DaprComponents - [CreateOrUpdate](#daprcomponents_createorupdate) @@ -107,14 +145,44 @@ - [List](#daprcomponents_list) - [ListSecrets](#daprcomponents_listsecrets) +## DaprSubscriptions + +- [CreateOrUpdate](#daprsubscriptions_createorupdate) +- [Delete](#daprsubscriptions_delete) +- [Get](#daprsubscriptions_get) +- [List](#daprsubscriptions_list) + +## DotNetComponents + +- [CreateOrUpdate](#dotnetcomponents_createorupdate) +- [Delete](#dotnetcomponents_delete) +- [Get](#dotnetcomponents_get) +- [List](#dotnetcomponents_list) +- [Update](#dotnetcomponents_update) + +## FunctionsExtension + +- [InvokeFunctionsHost](#functionsextension_invokefunctionshost) + +## JavaComponents + +- [CreateOrUpdate](#javacomponents_createorupdate) +- [Delete](#javacomponents_delete) +- [Get](#javacomponents_get) +- [List](#javacomponents_list) +- [Update](#javacomponents_update) + ## Jobs - [CreateOrUpdate](#jobs_createorupdate) - [Delete](#jobs_delete) - [GetByResourceGroup](#jobs_getbyresourcegroup) +- [GetDetector](#jobs_getdetector) - [List](#jobs_list) - [ListByResourceGroup](#jobs_listbyresourcegroup) +- [ListDetectors](#jobs_listdetectors) - [ListSecrets](#jobs_listsecrets) +- [ProxyGet](#jobs_proxyget) - [Start](#jobs_start) - [StopExecution](#jobs_stopexecution) - [StopMultipleExecutions](#jobs_stopmultipleexecutions) @@ -137,6 +205,10 @@ - [GetDetector](#managedenvironmentdiagnostics_getdetector) - [ListDetectors](#managedenvironmentdiagnostics_listdetectors) +## ManagedEnvironmentUsages + +- [List](#managedenvironmentusages_list) + ## ManagedEnvironments - [CreateOrUpdate](#managedenvironments_createorupdate) @@ -169,170 +241,263 @@ ## ResourceProvider +- [GetCustomDomainVerificationId](#resourceprovider_getcustomdomainverificationid) - [JobExecution](#resourceprovider_jobexecution) -### AvailableWorkloadProfiles_Get + +## Usages + +- [List](#usages_list) +### AppResiliency_CreateOrUpdate ```java -/** Samples for AvailableWorkloadProfiles Get. */ -public final class AvailableWorkloadProfilesGetSamples { +import com.azure.resourcemanager.appcontainers.models.CircuitBreakerPolicy; +import com.azure.resourcemanager.appcontainers.models.HeaderMatch; +import com.azure.resourcemanager.appcontainers.models.HttpConnectionPool; +import com.azure.resourcemanager.appcontainers.models.HttpRetryPolicy; +import com.azure.resourcemanager.appcontainers.models.TcpConnectionPool; +import com.azure.resourcemanager.appcontainers.models.TcpRetryPolicy; +import com.azure.resourcemanager.appcontainers.models.TimeoutPolicy; +import java.util.Arrays; + +/** + * Samples for AppResiliency CreateOrUpdate. + */ +public final class AppResiliencyCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AvailableWorkloadProfiles_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_CreateOrUpdate + * .json */ /** - * Sample code: BillingMeters_Get. - * + * Sample code: Create or Update App Resiliency. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void billingMetersGet(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.availableWorkloadProfiles().get("East US", com.azure.core.util.Context.NONE); + public static void + createOrUpdateAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.appResiliencies().define("resiliency-policy-1").withExistingContainerApp("rg", "testcontainerApp0") + .withTimeoutPolicy(new TimeoutPolicy().withResponseTimeoutInSeconds(15).withConnectionTimeoutInSeconds(5)) + .withHttpRetryPolicy(new HttpRetryPolicy().withMaxRetries(5).withInitialDelayInMilliseconds(1000L) + .withMaxIntervalInMilliseconds(10000L) + .withHeaders( + Arrays.asList(new HeaderMatch().withHeaderProperty("X-Content-Type").withPrefixMatch("GOATS"))) + .withHttpStatusCodes(Arrays.asList(502, 503)).withErrors( + Arrays.asList("5xx", "connect-failure", "reset", "retriable-headers", "retriable-status-codes"))) + .withTcpRetryPolicy(new TcpRetryPolicy().withMaxConnectAttempts(3)) + .withCircuitBreakerPolicy(new CircuitBreakerPolicy().withConsecutiveErrors(5).withIntervalInSeconds(10) + .withMaxEjectionPercent(50)) + .withHttpConnectionPool( + new HttpConnectionPool().withHttp1MaxPendingRequests(1024).withHttp2MaxRequests(1024)) + .withTcpConnectionPool(new TcpConnectionPool().withMaxConnections(100)).create(); } } ``` -### BillingMeters_Get +### AppResiliency_Delete ```java -/** Samples for BillingMeters Get. */ -public final class BillingMetersGetSamples { +/** + * Samples for AppResiliency Delete. + */ +public final class AppResiliencyDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/BillingMeters_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_Delete.json */ /** - * Sample code: BillingMeters_Get. - * + * Sample code: Delete App Resiliency. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void billingMetersGet(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.billingMeters().getWithResponse("East US", com.azure.core.util.Context.NONE); + public static void deleteAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.appResiliencies().deleteWithResponse("rg", "testcontainerApp0", "resiliency-policy-1", + com.azure.core.util.Context.NONE); } } ``` -### Certificates_CreateOrUpdate +### AppResiliency_Get ```java -import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; -import com.azure.resourcemanager.appcontainers.models.CertificateProperties; +/** + * Samples for AppResiliency Get. + */ +public final class AppResiliencyGetSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_Get.json + */ + /** + * Sample code: Get App Resiliency. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.appResiliencies().getWithResponse("rg", "testcontainerApp0", "resiliency-policy-1", + com.azure.core.util.Context.NONE); + } +} +``` -/** Samples for Certificates CreateOrUpdate. */ -public final class CertificatesCreateOrUpdateSamples { +### AppResiliency_List + +```java +/** + * Samples for AppResiliency List. + */ +public final class AppResiliencyListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificate_CreateOrUpdate.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_List.json */ /** - * Sample code: Create or Update Certificate. - * + * Sample code: List App Resiliency. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateCertificate( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .certificates() - .createOrUpdateWithResponse( - "examplerg", - "testcontainerenv", - "certificate-firendly-name", - new CertificateInner() - .withLocation("East US") - .withProperties( - new CertificateProperties() - .withPassword("fakeTokenPlaceholder") - .withValue("Y2VydA==".getBytes())), - com.azure.core.util.Context.NONE); + public static void listAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.appResiliencies().list("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); } } ``` -### Certificates_Delete +### AppResiliency_Update ```java -/** Samples for Certificates Delete. */ -public final class CertificatesDeleteSamples { +import com.azure.resourcemanager.appcontainers.models.AppResiliency; +import com.azure.resourcemanager.appcontainers.models.TimeoutPolicy; + +/** + * Samples for AppResiliency Update. + */ +public final class AppResiliencyUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificate_Delete.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_Patch.json */ /** - * Sample code: Delete Certificate. - * + * Sample code: Update App Resiliency. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .certificates() - .deleteWithResponse( - "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); + public static void updateAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + AppResiliency resource = manager.appResiliencies() + .getWithResponse("rg", "testcontainerApp0", "resiliency-policy-1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTimeoutPolicy(new TimeoutPolicy().withResponseTimeoutInSeconds(30).withConnectionTimeoutInSeconds(40)) + .apply(); } } ``` -### Certificates_Get +### AvailableWorkloadProfiles_Get ```java -/** Samples for Certificates Get. */ -public final class CertificatesGetSamples { +/** + * Samples for AvailableWorkloadProfiles Get. + */ +public final class AvailableWorkloadProfilesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * AvailableWorkloadProfiles_Get.json */ /** - * Sample code: Get Certificate. - * + * Sample code: BillingMeters_Get. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .certificates() - .getWithResponse( - "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); + public static void billingMetersGet(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.availableWorkloadProfiles().get("East US", com.azure.core.util.Context.NONE); } } ``` -### Certificates_List +### BillingMeters_Get ```java -/** Samples for Certificates List. */ -public final class CertificatesListSamples { +/** + * Samples for BillingMeters Get. + */ +public final class BillingMetersGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificates_ListByManagedEnvironment.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/BillingMeters_Get.json */ /** - * Sample code: List Certificates by Managed Environment. - * + * Sample code: BillingMeters_Get. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listCertificatesByManagedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.certificates().list("examplerg", "testcontainerenv", com.azure.core.util.Context.NONE); + public static void billingMetersGet(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.billingMeters().getWithResponse("East US", com.azure.core.util.Context.NONE); } } ``` -### Certificates_Update +### BuildAuthToken_List ```java -import com.azure.resourcemanager.appcontainers.models.CertificatePatch; +/** + * Samples for BuildAuthToken List. + */ +public final class BuildAuthTokenListSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_ListAuthToken.json + */ + /** + * Sample code: Get Build Auth Token. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getBuildAuthToken(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.buildAuthTokens().listWithResponse("rg", "testBuilder", "testBuild", com.azure.core.util.Context.NONE); + } +} +``` + +### Builders_CreateOrUpdate + +```java +import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; +import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for Certificates Update. */ -public final class CertificatesUpdateSamples { +/** + * Samples for Builders CreateOrUpdate. + */ +public final class BuildersCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificates_Patch.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_CreateOrUpdate.json */ /** - * Sample code: Patch Certificate. - * + * Sample code: Builders_CreateOrUpdate_0. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .certificates() - .updateWithResponse( - "examplerg", - "testcontainerenv", - "certificate-firendly-name", - new CertificatePatch().withTags(mapOf("tag1", "value1", "tag2", "value2")), - com.azure.core.util.Context.NONE); + public static void + buildersCreateOrUpdate0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builders().define("testBuilder").withRegion("eastus").withExistingResourceGroup("rg") + .withTags(mapOf("company", "Microsoft")) + .withIdentity(new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", + new UserAssignedIdentity()))) + .withEnvironmentId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv") + .withContainerRegistries(Arrays.asList( + new ContainerRegistry().withContainerRegistryServer("test.azurecr.io").withIdentityResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"), + new ContainerRegistry().withContainerRegistryServer("test2.azurecr.io").withIdentityResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"))) + .create(); } // Use "Map.of" if available @@ -349,292 +514,414 @@ public final class CertificatesUpdateSamples { } ``` -### ConnectedEnvironments_CheckNameAvailability +### Builders_Delete ```java -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; +/** + * Samples for Builders Delete. + */ +public final class BuildersDeleteSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_Delete.json + */ + /** + * Sample code: Builders_Delete_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildersDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builders().delete("rg", "testBuilder", com.azure.core.util.Context.NONE); + } +} +``` -/** Samples for ConnectedEnvironments CheckNameAvailability. */ -public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { +### Builders_GetByResourceGroup + +```java +/** + * Samples for Builders GetByResourceGroup. + */ +public final class BuildersGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_Get.json */ /** - * Sample code: Certificates_CheckNameAvailability. - * + * Sample code: Builders_Get_0. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void certificatesCheckNameAvailability( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironments() - .checkNameAvailabilityWithResponse( - "examplerg", - "testcontainerenv", - new CheckNameAvailabilityRequest() - .withName("testcertificatename") - .withType("Microsoft.App/connectedEnvironments/certificates"), - com.azure.core.util.Context.NONE); + public static void buildersGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builders().getByResourceGroupWithResponse("rg", "testBuilder", com.azure.core.util.Context.NONE); } } ``` -### ConnectedEnvironments_CreateOrUpdate +### Builders_List ```java -import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; +/** + * Samples for Builders List. + */ +public final class BuildersListSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_ListBySubscription. + * json + */ + /** + * Sample code: Builders_ListBySubscription_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + buildersListBySubscription0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builders().list(com.azure.core.util.Context.NONE); + } +} +``` -/** Samples for ConnectedEnvironments CreateOrUpdate. */ -public final class ConnectedEnvironmentsCreateOrUpdateSamples { +### Builders_ListByResourceGroup + +```java +/** + * Samples for Builders ListByResourceGroup. + */ +public final class BuildersListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_CreateOrUpdate.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_ListByResourceGroup + * .json */ /** - * Sample code: Create kube environments. - * + * Sample code: Builders_ListByResourceGroup_0. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createKubeEnvironments(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironments() - .define("testenv") - .withRegion("East US") - .withExistingResourceGroup("examplerg") - .withStaticIp("1.2.3.4") - .withDaprAIConnectionString( - "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") - .withCustomDomainConfiguration( - new CustomDomainConfiguration() - .withDnsSuffix("www.my-name.com") - .withCertificateValue("Y2VydA==".getBytes()) - .withCertificatePassword("fakeTokenPlaceholder")) - .create(); + public static void + buildersListByResourceGroup0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builders().listByResourceGroup("rg", com.azure.core.util.Context.NONE); } } ``` -### ConnectedEnvironments_Delete +### Builders_Update ```java -/** Samples for ConnectedEnvironments Delete. */ -public final class ConnectedEnvironmentsDeleteSamples { +import com.azure.resourcemanager.appcontainers.models.BuilderResource; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Builders Update. + */ +public final class BuildersUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_Delete.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_Update.json */ /** - * Sample code: Delete connected environment by connectedEnvironmentName. - * + * Sample code: Builders_Update_0. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void deleteConnectedEnvironmentByConnectedEnvironmentName( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().delete("examplerg", "examplekenv", com.azure.core.util.Context.NONE); + public static void buildersUpdate0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + BuilderResource resource = manager.builders() + .getByResourceGroupWithResponse("rg", "testBuilder", com.azure.core.util.Context.NONE).getValue(); + resource.update().withTags(mapOf("mytag1", "myvalue1")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` -### ConnectedEnvironments_GetByResourceGroup +### Builds_CreateOrUpdate ```java -/** Samples for ConnectedEnvironments GetByResourceGroup. */ -public final class ConnectedEnvironmentsGetByResourceGroupSamples { +import com.azure.resourcemanager.appcontainers.models.BuildConfiguration; +import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; +import com.azure.resourcemanager.appcontainers.models.EnvironmentVariable; +import com.azure.resourcemanager.appcontainers.models.HttpGet; +import com.azure.resourcemanager.appcontainers.models.PreBuildStep; +import java.util.Arrays; + +/** + * Samples for Builds CreateOrUpdate. + */ +public final class BuildsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_CreateOrUpdate.json */ /** - * Sample code: Get connected environment by connectedEnvironmentName. - * + * Sample code: Builds_CreateOrUpdate_WithConfig. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getConnectedEnvironmentByConnectedEnvironmentName( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironments() - .getByResourceGroupWithResponse("examplerg", "examplekenv", com.azure.core.util.Context.NONE); + public static void + buildsCreateOrUpdateWithConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builds().define("testBuild-123456789az").withExistingBuilder("rg", "testBuilder") + .withDestinationContainerRegistry(new ContainerRegistryWithCustomImage().withServer("test.azurecr.io") + .withImage("test.azurecr.io/repo:tag")) + .withConfiguration( + new BuildConfiguration().withBaseOs("DebianBullseye").withPlatform("dotnetcore") + .withPlatformVersion("7.0") + .withEnvironmentVariables( + Arrays.asList(new EnvironmentVariable().withName("foo1").withValue("bar1"), + new EnvironmentVariable().withName("foo2").withValue("bar2"))) + .withPreBuildSteps(Arrays.asList( + new PreBuildStep().withDescription("First pre build step.") + .withScripts(Arrays.asList("echo 'hello'", "echo 'world'")) + .withHttpGet(new HttpGet().withUrl("https://microsoft.com").withFileName("output.txt") + .withHeaders(Arrays.asList("foo", "bar"))), + new PreBuildStep().withDescription("Second pre build step.") + .withScripts(Arrays.asList("echo 'hello'", "echo 'again'")) + .withHttpGet(new HttpGet().withUrl("https://microsoft.com").withFileName("output.txt") + .withHeaders(Arrays.asList("foo")))))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * Builds_CreateOrUpdate_NoConfig.json + */ + /** + * Sample code: Builds_CreateOrUpdate_NoConfig. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + buildsCreateOrUpdateNoConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builds().define("testBuild").withExistingBuilder("rg", "testBuilder").create(); } } ``` -### ConnectedEnvironments_List +### Builds_Delete ```java -/** Samples for ConnectedEnvironments List. */ -public final class ConnectedEnvironmentsListSamples { +/** + * Samples for Builds Delete. + */ +public final class BuildsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_ListBySubscription.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_Delete.json */ /** - * Sample code: List connected environments by subscription. - * + * Sample code: Builds_Delete_0. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listConnectedEnvironmentsBySubscription( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().list(com.azure.core.util.Context.NONE); + public static void buildsDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builds().delete("rg", "testBuilder", "testBuild", com.azure.core.util.Context.NONE); } } ``` -### ConnectedEnvironments_ListByResourceGroup +### Builds_Get ```java -/** Samples for ConnectedEnvironments ListByResourceGroup. */ -public final class ConnectedEnvironmentsListByResourceGroupSamples { +/** + * Samples for Builds Get. + */ +public final class BuildsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_ListByResourceGroup.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_Get.json */ /** - * Sample code: List environments by resource group. - * + * Sample code: Builds_Get_0. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listEnvironmentsByResourceGroup( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().listByResourceGroup("examplerg", com.azure.core.util.Context.NONE); + public static void buildsGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builds().getWithResponse("rg", "testBuilder", "testBuild", com.azure.core.util.Context.NONE); } } ``` -### ConnectedEnvironments_Update +### BuildsByBuilderResource_List ```java -/** Samples for ConnectedEnvironments Update. */ -public final class ConnectedEnvironmentsUpdateSamples { +/** + * Samples for BuildsByBuilderResource List. + */ +public final class BuildsByBuilderResourceListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_Patch.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_ListByBuilderResource + * .json */ /** - * Sample code: Patch Managed Environment. - * + * Sample code: Builds_ListByBuilderResource_0. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void patchManagedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.connectedEnvironments().updateWithResponse("examplerg", "testenv", com.azure.core.util.Context.NONE); + public static void + buildsListByBuilderResource0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.buildsByBuilderResources().list("rg", "testBuilder", com.azure.core.util.Context.NONE); } } ``` -### ConnectedEnvironmentsCertificates_CreateOrUpdate +### Certificates_CreateOrUpdate ```java +import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; +import com.azure.resourcemanager.appcontainers.models.CertificateKeyVaultProperties; import com.azure.resourcemanager.appcontainers.models.CertificateProperties; +import com.azure.resourcemanager.appcontainers.models.CertificateType; -/** Samples for ConnectedEnvironmentsCertificates CreateOrUpdate. */ -public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { +/** + * Samples for Certificates CreateOrUpdate. + */ +public final class CertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * Certificate_CreateOrUpdate_FromKeyVault.json */ /** - * Sample code: Create or Update Certificate. - * + * Sample code: Create or Update Certificate using Managed Identity. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateCertificate( + public static void createOrUpdateCertificateUsingManagedIdentity( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsCertificates() - .define("certificate-firendly-name") - .withRegion("East US") - .withExistingConnectedEnvironment("examplerg", "testcontainerenv") - .withProperties( - new CertificateProperties().withPassword("fakeTokenPlaceholder").withValue("Y2VydA==".getBytes())) - .create(); + manager.certificates().createOrUpdateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + new CertificateInner().withLocation("East US").withProperties(new CertificateProperties() + .withCertificateKeyVaultProperties(new CertificateKeyVaultProperties().withIdentity( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/microsoft.managedidentity/userassignedidentities/test-user-mi") + .withKeyVaultUrl("fakeTokenPlaceholder")) + .withCertificateType(CertificateType.SERVER_SSLCERTIFICATE)), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificate_CreateOrUpdate. + * json + */ + /** + * Sample code: Create or Update Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + createOrUpdateCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.certificates().createOrUpdateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + new CertificateInner().withLocation("East US") + .withProperties(new CertificateProperties().withPassword("fakeTokenPlaceholder") + .withValue("Y2VydA==".getBytes()).withCertificateType(CertificateType.IMAGE_PULL_TRUSTED_CA)), + com.azure.core.util.Context.NONE); } } ``` -### ConnectedEnvironmentsCertificates_Delete +### Certificates_Delete ```java -/** Samples for ConnectedEnvironmentsCertificates Delete. */ -public final class ConnectedEnvironmentsCertificatesDeleteSamples { +/** + * Samples for Certificates Delete. + */ +public final class CertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificate_Delete.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificate_Delete.json */ /** * Sample code: Delete Certificate. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsCertificates() - .deleteWithResponse( - "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); + manager.certificates().deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE); } } ``` -### ConnectedEnvironmentsCertificates_Get +### Certificates_Get ```java -/** Samples for ConnectedEnvironmentsCertificates Get. */ -public final class ConnectedEnvironmentsCertificatesGetSamples { +/** + * Samples for Certificates Get. + */ +public final class CertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificate_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificate_Get.json */ /** * Sample code: Get Certificate. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsCertificates() - .getWithResponse( - "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); + manager.certificates().getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE); } } ``` -### ConnectedEnvironmentsCertificates_List +### Certificates_List ```java -/** Samples for ConnectedEnvironmentsCertificates List. */ -public final class ConnectedEnvironmentsCertificatesListSamples { +/** + * Samples for Certificates List. + */ +public final class CertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * Certificates_ListByManagedEnvironment.json */ /** - * Sample code: List Certificates by Connected Environment. - * + * Sample code: List Certificates by Managed Environment. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listCertificatesByConnectedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsCertificates() - .list("examplerg", "testcontainerenv", com.azure.core.util.Context.NONE); + public static void + listCertificatesByManagedEnvironment(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.certificates().list("examplerg", "testcontainerenv", com.azure.core.util.Context.NONE); } } ``` -### ConnectedEnvironmentsCertificates_Update +### Certificates_Update ```java -import com.azure.resourcemanager.appcontainers.models.Certificate; +import com.azure.resourcemanager.appcontainers.models.CertificatePatch; import java.util.HashMap; import java.util.Map; -/** Samples for ConnectedEnvironmentsCertificates Update. */ -public final class ConnectedEnvironmentsCertificatesUpdateSamples { +/** + * Samples for Certificates Update. + */ +public final class CertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificates_Patch.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificates_Patch.json */ /** * Sample code: Patch Certificate. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - Certificate resource = - manager - .connectedEnvironmentsCertificates() - .getWithResponse( - "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE) - .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + manager.certificates().updateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + new CertificatePatch().withTags(mapOf("tag1", "value1", "tag2", "value2")), + com.azure.core.util.Context.NONE); } // Use "Map.of" if available @@ -651,85 +938,406 @@ public final class ConnectedEnvironmentsCertificatesUpdateSamples { } ``` -### ConnectedEnvironmentsDaprComponents_CreateOrUpdate +### ConnectedEnvironments_CheckNameAvailability ```java -import com.azure.resourcemanager.appcontainers.models.DaprMetadata; -import com.azure.resourcemanager.appcontainers.models.Secret; -import java.util.Arrays; +import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -/** Samples for ConnectedEnvironmentsDaprComponents CreateOrUpdate. */ -public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { +/** + * Samples for ConnectedEnvironments CheckNameAvailability. + */ +public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsCertificates_CheckNameAvailability.json */ /** - * Sample code: Create or update dapr component. - * + * Sample code: Certificates_CheckNameAvailability. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateDaprComponent( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsDaprComponents() - .define("reddog") - .withExistingConnectedEnvironment("examplerg", "myenvironment") - .withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) - .withMetadata( - Arrays - .asList( - new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")) - .create(); + public static void + certificatesCheckNameAvailability(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments() + .checkNameAvailabilityWithResponse("examplerg", "testcontainerenv", new CheckNameAvailabilityRequest() + .withName("testcertificatename").withType("Microsoft.App/connectedEnvironments/certificates"), + com.azure.core.util.Context.NONE); } } ``` -### ConnectedEnvironmentsDaprComponents_Delete +### ConnectedEnvironments_CreateOrUpdate ```java -/** Samples for ConnectedEnvironmentsDaprComponents Delete. */ -public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { +import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; + +/** + * Samples for ConnectedEnvironments CreateOrUpdate. + */ +public final class ConnectedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironments_CreateOrUpdate.json */ /** - * Sample code: Delete dapr component. - * + * Sample code: Create kube environments. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void deleteDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsDaprComponents() - .deleteWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); - } -} -``` + public static void createKubeEnvironments(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments().define("testenv").withRegion("East US").withExistingResourceGroup("examplerg") + .withStaticIp("1.2.3.4") + .withDaprAIConnectionString( + "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") + .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("www.my-name.com") + .withCertificateValue("Y2VydA==".getBytes()).withCertificatePassword("fakeTokenPlaceholder")) + .create(); + } +} +``` + +### ConnectedEnvironments_Delete + +```java +/** + * Samples for ConnectedEnvironments Delete. + */ +public final class ConnectedEnvironmentsDeleteSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironments_Delete + * .json + */ + /** + * Sample code: Delete connected environment by connectedEnvironmentName. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void deleteConnectedEnvironmentByConnectedEnvironmentName( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments().delete("examplerg", "examplekenv", com.azure.core.util.Context.NONE); + } +} +``` + +### ConnectedEnvironments_GetByResourceGroup + +```java +/** + * Samples for ConnectedEnvironments GetByResourceGroup. + */ +public final class ConnectedEnvironmentsGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironments_Get. + * json + */ + /** + * Sample code: Get connected environment by connectedEnvironmentName. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getConnectedEnvironmentByConnectedEnvironmentName( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments().getByResourceGroupWithResponse("examplerg", "examplekenv", + com.azure.core.util.Context.NONE); + } +} +``` + +### ConnectedEnvironments_List + +```java +/** + * Samples for ConnectedEnvironments List. + */ +public final class ConnectedEnvironmentsListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironments_ListBySubscription.json + */ + /** + * Sample code: List connected environments by subscription. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listConnectedEnvironmentsBySubscription( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments().list(com.azure.core.util.Context.NONE); + } +} +``` + +### ConnectedEnvironments_ListByResourceGroup + +```java +/** + * Samples for ConnectedEnvironments ListByResourceGroup. + */ +public final class ConnectedEnvironmentsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironments_ListByResourceGroup.json + */ + /** + * Sample code: List environments by resource group. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + listEnvironmentsByResourceGroup(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments().listByResourceGroup("examplerg", com.azure.core.util.Context.NONE); + } +} +``` + +### ConnectedEnvironments_Update + +```java +/** + * Samples for ConnectedEnvironments Update. + */ +public final class ConnectedEnvironmentsUpdateSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironments_Patch. + * json + */ + /** + * Sample code: Patch Managed Environment. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + patchManagedEnvironment(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments().updateWithResponse("examplerg", "testenv", com.azure.core.util.Context.NONE); + } +} +``` + +### ConnectedEnvironmentsCertificates_CreateOrUpdate + +```java +import com.azure.resourcemanager.appcontainers.models.CertificateProperties; + +/** + * Samples for ConnectedEnvironmentsCertificates CreateOrUpdate. + */ +public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsCertificate_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + createOrUpdateCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsCertificates().define("certificate-firendly-name").withRegion("East US") + .withExistingConnectedEnvironment("examplerg", "testcontainerenv") + .withProperties( + new CertificateProperties().withPassword("fakeTokenPlaceholder").withValue("Y2VydA==".getBytes())) + .create(); + } +} +``` + +### ConnectedEnvironmentsCertificates_Delete + +```java +/** + * Samples for ConnectedEnvironmentsCertificates Delete. + */ +public final class ConnectedEnvironmentsCertificatesDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsCertificate_Delete.json + */ + /** + * Sample code: Delete Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsCertificates().deleteWithResponse("examplerg", "testcontainerenv", + "certificate-firendly-name", com.azure.core.util.Context.NONE); + } +} +``` + +### ConnectedEnvironmentsCertificates_Get + +```java +/** + * Samples for ConnectedEnvironmentsCertificates Get. + */ +public final class ConnectedEnvironmentsCertificatesGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsCertificate_Get.json + */ + /** + * Sample code: Get Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsCertificates().getWithResponse("examplerg", "testcontainerenv", + "certificate-firendly-name", com.azure.core.util.Context.NONE); + } +} +``` + +### ConnectedEnvironmentsCertificates_List + +```java +/** + * Samples for ConnectedEnvironmentsCertificates List. + */ +public final class ConnectedEnvironmentsCertificatesListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json + */ + /** + * Sample code: List Certificates by Connected Environment. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listCertificatesByConnectedEnvironment( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsCertificates().list("examplerg", "testcontainerenv", + com.azure.core.util.Context.NONE); + } +} +``` + +### ConnectedEnvironmentsCertificates_Update + +```java +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/2024-02-02-preview/examples/ + * ConnectedEnvironmentsCertificates_Patch.json + */ + /** + * Sample code: Patch Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + Certificate resource = manager.connectedEnvironmentsCertificates().getWithResponse("examplerg", + "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE).getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### ConnectedEnvironmentsDaprComponents_CreateOrUpdate + +```java +import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; +import com.azure.resourcemanager.appcontainers.models.DaprMetadata; +import com.azure.resourcemanager.appcontainers.models.DaprServiceBindMetadata; +import com.azure.resourcemanager.appcontainers.models.Secret; +import java.util.Arrays; + +/** + * Samples for ConnectedEnvironmentsDaprComponents CreateOrUpdate. + */ +public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json + */ + /** + * Sample code: Create or update dapr component. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + createOrUpdateDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsDaprComponents().define("reddog") + .withExistingConnectedEnvironment("examplerg", "myenvironment").withComponentType("state.azure.cosmosdb") + .withVersion("v1").withIgnoreErrors(false).withInitTimeout("50s") + .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) + .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .withServiceComponentBind(Arrays.asList(new DaprComponentServiceBinding().withName("statestore") + .withServiceId( + "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") + .withMetadata(new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind")))) + .create(); + } +} +``` + +### ConnectedEnvironmentsDaprComponents_Delete + +```java +/** + * Samples for ConnectedEnvironmentsDaprComponents Delete. + */ +public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsDaprComponents_Delete.json + */ + /** + * Sample code: Delete dapr component. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void deleteDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsDaprComponents().deleteWithResponse("examplerg", "myenvironment", "reddog", + com.azure.core.util.Context.NONE); + } +} +``` ### ConnectedEnvironmentsDaprComponents_Get ```java -/** Samples for ConnectedEnvironmentsDaprComponents Get. */ +/** + * Samples for ConnectedEnvironmentsDaprComponents Get. + */ public final class ConnectedEnvironmentsDaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsDaprComponents_Get.json */ /** * Sample code: Get Dapr Component. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsDaprComponents() - .getWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsDaprComponents().getWithResponse("examplerg", "myenvironment", "reddog", + com.azure.core.util.Context.NONE); } } ``` @@ -737,20 +1345,22 @@ public final class ConnectedEnvironmentsDaprComponentsGetSamples { ### ConnectedEnvironmentsDaprComponents_List ```java -/** Samples for ConnectedEnvironmentsDaprComponents List. */ +/** + * Samples for ConnectedEnvironmentsDaprComponents List. + */ public final class ConnectedEnvironmentsDaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsDaprComponents_List.json */ /** * Sample code: List Dapr Components. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void listDaprComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsDaprComponents() - .list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsDaprComponents().list("examplerg", "myenvironment", + com.azure.core.util.Context.NONE); } } ``` @@ -758,21 +1368,23 @@ public final class ConnectedEnvironmentsDaprComponentsListSamples { ### ConnectedEnvironmentsDaprComponents_ListSecrets ```java -/** Samples for ConnectedEnvironmentsDaprComponents ListSecrets. */ +/** + * Samples for ConnectedEnvironmentsDaprComponents ListSecrets. + */ public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsDaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listContainerAppsSecrets( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsDaprComponents() - .listSecretsWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); + public static void + listContainerAppsSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsDaprComponents().listSecretsWithResponse("examplerg", "myenvironment", "reddog", + com.azure.core.util.Context.NONE); } } ``` @@ -784,30 +1396,26 @@ import com.azure.resourcemanager.appcontainers.models.AccessMode; import com.azure.resourcemanager.appcontainers.models.AzureFileProperties; import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorageProperties; -/** Samples for ConnectedEnvironmentsStorages CreateOrUpdate. */ +/** + * Samples for ConnectedEnvironmentsStorages CreateOrUpdate. + */ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateEnvironmentsStorage( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsStorages() - .define("jlaw-demo1") + public static void + createOrUpdateEnvironmentsStorage(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsStorages().define("jlaw-demo1") .withExistingConnectedEnvironment("examplerg", "env") - .withProperties( - new ConnectedEnvironmentStorageProperties() - .withAzureFile( - new AzureFileProperties() - .withAccountName("account1") - .withAccountKey("fakeTokenPlaceholder") - .withAccessMode(AccessMode.READ_ONLY) - .withShareName("share1"))) + .withProperties(new ConnectedEnvironmentStorageProperties().withAzureFile( + new AzureFileProperties().withAccountName("account1").withAccountKey("fakeTokenPlaceholder") + .withAccessMode(AccessMode.READ_ONLY).withShareName("share1"))) .create(); } } @@ -816,21 +1424,23 @@ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { ### ConnectedEnvironmentsStorages_Delete ```java -/** Samples for ConnectedEnvironmentsStorages Delete. */ +/** + * Samples for ConnectedEnvironmentsStorages Delete. + */ public final class ConnectedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsStorages() - .deleteWithResponse("examplerg", "env", "jlaw-demo1", com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsStorages().deleteWithResponse("examplerg", "env", "jlaw-demo1", + com.azure.core.util.Context.NONE); } } ``` @@ -838,21 +1448,23 @@ public final class ConnectedEnvironmentsStoragesDeleteSamples { ### ConnectedEnvironmentsStorages_Get ```java -/** Samples for ConnectedEnvironmentsStorages Get. */ +/** + * Samples for ConnectedEnvironmentsStorages Get. + */ public final class ConnectedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage properties by subscription. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getAEnvironmentsStoragePropertiesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsStorages() - .getWithResponse("examplerg", "env", "jlaw-demo1", com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsStorages().getWithResponse("examplerg", "env", "jlaw-demo1", + com.azure.core.util.Context.NONE); } } ``` @@ -860,21 +1472,23 @@ public final class ConnectedEnvironmentsStoragesGetSamples { ### ConnectedEnvironmentsStorages_List ```java -/** Samples for ConnectedEnvironmentsStorages List. */ +/** + * Samples for ConnectedEnvironmentsStorages List. + */ public final class ConnectedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsStorages() - .listWithResponse("examplerg", "managedEnv", com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsStorages().listWithResponse("examplerg", "managedEnv", + com.azure.core.util.Context.NONE); } } ``` @@ -897,239 +1511,238 @@ import com.azure.resourcemanager.appcontainers.models.CorsPolicy; import com.azure.resourcemanager.appcontainers.models.CustomDomain; import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; import com.azure.resourcemanager.appcontainers.models.Dapr; +import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; +import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; import com.azure.resourcemanager.appcontainers.models.Ingress; import com.azure.resourcemanager.appcontainers.models.IngressClientCertificateMode; +import com.azure.resourcemanager.appcontainers.models.IngressPortMapping; import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; import com.azure.resourcemanager.appcontainers.models.InitContainer; import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; import com.azure.resourcemanager.appcontainers.models.LogLevel; +import com.azure.resourcemanager.appcontainers.models.Runtime; +import com.azure.resourcemanager.appcontainers.models.RuntimeDotnet; +import com.azure.resourcemanager.appcontainers.models.RuntimeJava; import com.azure.resourcemanager.appcontainers.models.Scale; import com.azure.resourcemanager.appcontainers.models.ScaleRule; import com.azure.resourcemanager.appcontainers.models.Service; import com.azure.resourcemanager.appcontainers.models.ServiceBind; +import com.azure.resourcemanager.appcontainers.models.StorageType; import com.azure.resourcemanager.appcontainers.models.TcpScaleRule; import com.azure.resourcemanager.appcontainers.models.Template; import com.azure.resourcemanager.appcontainers.models.TrafficWeight; import com.azure.resourcemanager.appcontainers.models.Type; +import com.azure.resourcemanager.appcontainers.models.Volume; +import com.azure.resourcemanager.appcontainers.models.VolumeMount; import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for ContainerApps CreateOrUpdate. */ +/** + * Samples for ContainerApps CreateOrUpdate. + */ public final class ContainerAppsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerApps_CreateOrUpdate_ConnectedEnvironment.json */ /** - * Sample code: Create or Update Container App. - * + * Sample code: Create or Update App On A Connected Environment. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateContainerApp( + public static void createOrUpdateAppOnAConnectedEnvironment( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerApps() - .define("testcontainerApp0") - .withRegion("East US") - .withExistingResourceGroup("rg") + manager.containerApps().define("testcontainerApp0").withRegion("East US").withExistingResourceGroup("rg") + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .withEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube") + .withConfiguration(new Configuration().withIngress(new Ingress().withExternal(true).withTargetPort(3000) + .withTraffic(Arrays.asList(new TrafficWeight().withRevisionName("testcontainerApp0-ab1234") + .withWeight(100).withLabel("production"))) + .withCustomDomains(Arrays.asList(new CustomDomain().withName("www.my-name.com") + .withBindingType(BindingType.SNI_ENABLED).withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), + new CustomDomain().withName("www.my-other-name.com").withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions(Arrays.asList( + new IpSecurityRestrictionRule().withName("Allow work IP A subnet") + .withDescription("Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/32").withAction(Action.ALLOW), + new IpSecurityRestrictionRule().withName("Allow work IP B subnet") + .withDescription("Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/8").withAction(Action.ALLOW))) + .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY)) + .withClientCertificateMode(IngressClientCertificateMode.ACCEPT) + .withCorsPolicy(new CorsPolicy() + .withAllowedOrigins(Arrays.asList("https://a.test.com", "https://b.test.com")) + .withAllowedMethods(Arrays.asList("GET", "POST")) + .withAllowedHeaders(Arrays.asList("HEADER1", "HEADER2")) + .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")).withMaxAge(1234).withAllowCredentials(true)) + .withAdditionalPortMappings( + Arrays.asList(new IngressPortMapping().withExternal(true).withTargetPort(1234), + new IngressPortMapping().withExternal(false).withTargetPort(2345).withExposedPort(3456)))) + .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000) + .withHttpReadBufferSize(30).withHttpMaxRequestSize(10).withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withRuntime(new Runtime().withJava(new RuntimeJava().withEnableMetrics(true)) + .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) + .withMaxInactiveRevisions(10)) + .withTemplate(new Template() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") + .withName("testinitcontainerApp0").withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers( + Arrays + .asList(new Container().withImage("repo/testcontainerApp0:v1").withName("testcontainerApp0") + .withProbes(Arrays.asList(new ContainerAppProbe() + .withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() + .withName("Custom-Header").withValue("Awesome"))) + .withPath("/health").withPort(8080)) + .withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) + .withScale(new Scale().withMinReplicas(1).withMaxReplicas(5) + .withRules(Arrays.asList(new ScaleRule().withName("httpscalingrule").withCustom( + new CustomScaleRule().withType("http").withMetadata(mapOf("concurrentRequests", "50"))))))) + .create(); + } + + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_CreateOrUpdate + * .json + */ + /** + * Sample code: Create or Update Container App. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + createOrUpdateContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().define("testcontainerApp0").withRegion("East US").withExistingResourceGroup("rg") .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") - .withWorkloadProfileName("My-GP-01") - .withConfiguration( - new Configuration() - .withIngress( - new Ingress() - .withExternal(true) - .withTargetPort(3000) - .withTraffic( - Arrays - .asList( - new TrafficWeight() - .withRevisionName("testcontainerApp0-ab1234") - .withWeight(100) - .withLabel("production"))) - .withCustomDomains( - Arrays - .asList( - new CustomDomain() - .withName("www.my-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), - new CustomDomain() - .withName("www.my-other-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) - .withIpSecurityRestrictions( - Arrays - .asList( - new IpSecurityRestrictionRule() - .withName("Allow work IP A subnet") - .withDescription( - "Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/32") - .withAction(Action.ALLOW), - new IpSecurityRestrictionRule() - .withName("Allow work IP B subnet") - .withDescription( - "Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/8") - .withAction(Action.ALLOW))) - .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY)) - .withClientCertificateMode(IngressClientCertificateMode.ACCEPT) - .withCorsPolicy( - new CorsPolicy() - .withAllowedOrigins(Arrays.asList("https://a.test.com", "https://b.test.com")) - .withAllowedMethods(Arrays.asList("GET", "POST")) - .withAllowedHeaders(Arrays.asList("HEADER1", "HEADER2")) - .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")) - .withMaxAge(1234) - .withAllowCredentials(true))) - .withDapr( - new Dapr() - .withEnabled(true) - .withAppProtocol(AppProtocol.HTTP) - .withAppPort(3000) - .withHttpReadBufferSize(30) - .withHttpMaxRequestSize(10) - .withLogLevel(LogLevel.DEBUG) - .withEnableApiLogging(true)) - .withMaxInactiveRevisions(10) - .withService(new Service().withType("redis"))) - .withTemplate( - new Template() - .withInitContainers( - Arrays - .asList( - new InitContainer() - .withImage("repo/testcontainerApp0:v4") - .withName("testinitcontainerApp0") - .withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers( - Arrays - .asList( - new Container() - .withImage("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( - Arrays - .asList( - new ScaleRule() - .withName("httpscalingrule") - .withCustom( - new CustomScaleRule() - .withType("http") - .withMetadata(mapOf("concurrentRequests", "50")))))) - .withServiceBinds( - Arrays - .asList( - new ServiceBind() - .withServiceId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService") - .withName("redisService")))) + .withWorkloadProfileName( + "My-GP-01") + .withConfiguration(new Configuration().withIngress(new Ingress().withExternal(true).withTargetPort(3000) + .withTraffic(Arrays.asList(new TrafficWeight().withRevisionName("testcontainerApp0-ab1234") + .withWeight(100).withLabel("production"))) + .withCustomDomains(Arrays.asList(new CustomDomain().withName("www.my-name.com") + .withBindingType(BindingType.SNI_ENABLED).withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), + new CustomDomain().withName("www.my-other-name.com").withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions(Arrays.asList( + new IpSecurityRestrictionRule().withName("Allow work IP A subnet") + .withDescription("Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/32").withAction(Action.ALLOW), + new IpSecurityRestrictionRule().withName("Allow work IP B subnet") + .withDescription("Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/8").withAction(Action.ALLOW))) + .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY)) + .withClientCertificateMode(IngressClientCertificateMode.ACCEPT) + .withCorsPolicy(new CorsPolicy() + .withAllowedOrigins(Arrays.asList("https://a.test.com", "https://b.test.com")) + .withAllowedMethods(Arrays.asList("GET", "POST")) + .withAllowedHeaders(Arrays.asList("HEADER1", "HEADER2")) + .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")).withMaxAge(1234).withAllowCredentials(true)) + .withAdditionalPortMappings( + Arrays.asList(new IngressPortMapping().withExternal(true).withTargetPort(1234), + new IngressPortMapping().withExternal(false).withTargetPort(2345).withExposedPort(3456)))) + .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000) + .withHttpReadBufferSize(30).withHttpMaxRequestSize(10).withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withRuntime(new Runtime().withJava(new RuntimeJava().withEnableMetrics(true)) + .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) + .withMaxInactiveRevisions(10).withService(new Service().withType("redis"))) + .withTemplate(new Template() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") + .withName("testinitcontainerApp0").withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers( + Arrays.asList(new Container().withImage("repo/testcontainerApp0:v1").withName("testcontainerApp0") + .withVolumeMounts(Arrays.asList( + new VolumeMount().withVolumeName("azurefile").withMountPath("/mnt/path1") + .withSubPath("subPath1"), + new VolumeMount().withVolumeName("nfsazurefile").withMountPath("/mnt/path2") + .withSubPath("subPath2"))) + .withProbes(Arrays.asList(new ContainerAppProbe() + .withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() + .withName("Custom-Header").withValue("Awesome"))) + .withPath("/health").withPort(8080)) + .withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) + .withScale(new Scale().withMinReplicas(1).withMaxReplicas(5) + .withRules(Arrays.asList(new ScaleRule().withName("httpscalingrule").withCustom( + new CustomScaleRule().withType("http").withMetadata(mapOf("concurrentRequests", "50")))))) + .withVolumes(Arrays.asList( + new Volume().withName("azurefile").withStorageType(StorageType.AZURE_FILE) + .withStorageName("storage"), + new Volume().withName("nfsazurefile").withStorageType(StorageType.NFS_AZURE_FILE) + .withStorageName("nfsStorage"))) + .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService") + .withName("redisService").withClientType("dotnet") + .withCustomizedKeys(mapOf("DesiredKey", "fakeTokenPlaceholder"))))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_TcpApp_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerApps_TcpApp_CreateOrUpdate.json */ /** * Sample code: Create or Update Tcp App. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void createOrUpdateTcpApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerApps() - .define("testcontainerAppTcp") - .withRegion("East US") - .withExistingResourceGroup("rg") + manager.containerApps().define("testcontainerAppTcp").withRegion("East US").withExistingResourceGroup("rg") .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") .withConfiguration( new Configuration() .withIngress( - new Ingress() - .withExternal(true) - .withTargetPort(3000) - .withExposedPort(4000) - .withTransport(IngressTransportMethod.TCP) + new Ingress().withExternal(true).withTargetPort(3000).withExposedPort(4000) + .withTransport( + IngressTransportMethod.TCP) .withTraffic( Arrays .asList( - new TrafficWeight() - .withRevisionName("testcontainerAppTcp-ab1234") - .withWeight(100))))) - .withTemplate( - new Template() - .withContainers( - Arrays - .asList( - new Container() - .withImage("repo/testcontainerAppTcp:v1") - .withName("testcontainerAppTcp") - .withProbes( - Arrays - .asList( - new ContainerAppProbe() - .withInitialDelaySeconds(3) - .withPeriodSeconds(3) - .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)) - .withType(Type.LIVENESS))))) - .withScale( - new Scale() - .withMinReplicas(1) - .withMaxReplicas(5) - .withRules( - Arrays - .asList( - new ScaleRule() - .withName("tcpscalingrule") - .withTcp( - new TcpScaleRule() - .withMetadata(mapOf("concurrentConnections", "50"))))))) + new TrafficWeight().withRevisionName( + "testcontainerAppTcp-ab1234").withWeight( + 100))))) + .withTemplate(new Template() + .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppTcp:v1") + .withName("testcontainerAppTcp") + .withProbes(Arrays.asList(new ContainerAppProbe().withInitialDelaySeconds(3).withPeriodSeconds(3) + .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)).withType(Type.LIVENESS))))) + .withScale( + new Scale().withMinReplicas(1).withMaxReplicas(5) + .withRules(Arrays.asList(new ScaleRule().withName("tcpscalingrule") + .withTcp(new TcpScaleRule().withMetadata(mapOf("concurrentConnections", "50"))))))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ManagedBy_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerApps_ManagedBy_CreateOrUpdate.json */ /** * Sample code: Create or Update ManagedBy App. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateManagedByApp( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerApps() - .define("testcontainerAppManagedBy") - .withRegion("East US") + public static void + createOrUpdateManagedByApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().define("testcontainerAppManagedBy").withRegion("East US") .withExistingResourceGroup("rg") .withManagedBy( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.AppPlatform/Spring/springapp") @@ -1138,45 +1751,21 @@ public final class ContainerAppsCreateOrUpdateSamples { .withConfiguration( new Configuration() .withIngress( - new Ingress() - .withExternal(true) - .withTargetPort(3000) - .withExposedPort(4000) - .withTransport(IngressTransportMethod.TCP) - .withTraffic( + new Ingress().withExternal(true).withTargetPort(3000).withExposedPort(4000) + .withTransport(IngressTransportMethod.TCP).withTraffic( Arrays .asList( - new TrafficWeight() - .withRevisionName("testcontainerAppManagedBy-ab1234") + new TrafficWeight().withRevisionName("testcontainerAppManagedBy-ab1234") .withWeight(100))))) - .withTemplate( - new Template() - .withContainers( - Arrays - .asList( - new Container() - .withImage("repo/testcontainerAppManagedBy:v1") - .withName("testcontainerAppManagedBy") - .withProbes( - Arrays - .asList( - new ContainerAppProbe() - .withInitialDelaySeconds(3) - .withPeriodSeconds(3) - .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)) - .withType(Type.LIVENESS))))) - .withScale( - new Scale() - .withMinReplicas(1) - .withMaxReplicas(5) - .withRules( - Arrays - .asList( - new ScaleRule() - .withName("tcpscalingrule") - .withTcp( - new TcpScaleRule() - .withMetadata(mapOf("concurrentConnections", "50"))))))) + .withTemplate(new Template() + .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppManagedBy:v1") + .withName("testcontainerAppManagedBy") + .withProbes(Arrays.asList(new ContainerAppProbe().withInitialDelaySeconds(3).withPeriodSeconds(3) + .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)).withType(Type.LIVENESS))))) + .withScale( + new Scale().withMinReplicas(1).withMaxReplicas(5) + .withRules(Arrays.asList(new ScaleRule().withName("tcpscalingrule") + .withTcp(new TcpScaleRule().withMetadata(mapOf("concurrentConnections", "50"))))))) .create(); } @@ -1197,14 +1786,17 @@ public final class ContainerAppsCreateOrUpdateSamples { ### ContainerApps_Delete ```java -/** Samples for ContainerApps Delete. */ +/** + * Samples for ContainerApps Delete. + */ public final class ContainerAppsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Delete.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Delete.json */ /** * Sample code: Delete Container App. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { @@ -1216,1007 +1808,1794 @@ public final class ContainerAppsDeleteSamples { ### ContainerApps_GetAuthToken ```java -/** Samples for ContainerApps GetAuthToken. */ -public final class ContainerAppsGetAuthTokenSamples { +/** + * Samples for ContainerApps GetAuthToken. + */ +public final class ContainerAppsGetAuthTokenSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_GetAuthToken. + * json + */ + /** + * Sample code: Get Container App Auth Token. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + getContainerAppAuthToken(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().getAuthTokenWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerApps_GetByResourceGroup + +```java +/** + * Samples for ContainerApps GetByResourceGroup. + */ +public final class ContainerAppsGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Get.json + */ + /** + * Sample code: Get Container App. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().getByResourceGroupWithResponse("rg", "testcontainerApp0", + com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerApps_List + +```java +/** + * Samples for ContainerApps List. + */ +public final class ContainerAppsListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerApps_ListBySubscription.json + */ + /** + * Sample code: List Container Apps by subscription. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + listContainerAppsBySubscription(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().list(com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerApps_ListByResourceGroup + +```java +/** + * Samples for ContainerApps ListByResourceGroup. + */ +public final class ContainerAppsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerApps_ListByResourceGroup.json + */ + /** + * Sample code: List Container Apps by resource group. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + listContainerAppsByResourceGroup(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().listByResourceGroup("rg", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerApps_ListCustomHostnameAnalysis + +```java +/** + * Samples for ContainerApps ListCustomHostnameAnalysis. + */ +public final class ContainerAppsListCustomHostnameAnalysisSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerApps_ListCustomHostNameAnalysis.json + */ + /** + * Sample code: Analyze Custom Hostname. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void analyzeCustomHostname(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().listCustomHostnameAnalysisWithResponse("rg", "testcontainerApp0", "my.name.corp", + com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerApps_ListSecrets + +```java +/** + * Samples for ContainerApps ListSecrets. + */ +public final class ContainerAppsListSecretsSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_ListSecrets. + * json + */ + /** + * Sample code: List Container Apps Secrets. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + listContainerAppsSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().listSecretsWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerApps_Start + +```java +/** + * Samples for ContainerApps Start. + */ +public final class ContainerAppsStartSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Start.json + */ + /** + * Sample code: Start Container App. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void startContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().start("rg", "testWorkerApp0", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerApps_Stop + +```java +/** + * Samples for ContainerApps Stop. + */ +public final class ContainerAppsStopSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Stop.json + */ + /** + * Sample code: Stop Container App. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void stopContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().stop("rg", "testWorkerApp0", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerApps_Update + +```java +import com.azure.resourcemanager.appcontainers.models.Action; +import com.azure.resourcemanager.appcontainers.models.Affinity; +import com.azure.resourcemanager.appcontainers.models.AppProtocol; +import com.azure.resourcemanager.appcontainers.models.BindingType; +import com.azure.resourcemanager.appcontainers.models.Configuration; +import com.azure.resourcemanager.appcontainers.models.Container; +import com.azure.resourcemanager.appcontainers.models.ContainerApp; +import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; +import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; +import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; +import com.azure.resourcemanager.appcontainers.models.ContainerResources; +import com.azure.resourcemanager.appcontainers.models.CustomDomain; +import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; +import com.azure.resourcemanager.appcontainers.models.Dapr; +import com.azure.resourcemanager.appcontainers.models.Ingress; +import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; +import com.azure.resourcemanager.appcontainers.models.InitContainer; +import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; +import com.azure.resourcemanager.appcontainers.models.LogLevel; +import com.azure.resourcemanager.appcontainers.models.Runtime; +import com.azure.resourcemanager.appcontainers.models.RuntimeDotnet; +import com.azure.resourcemanager.appcontainers.models.RuntimeJava; +import com.azure.resourcemanager.appcontainers.models.Scale; +import com.azure.resourcemanager.appcontainers.models.ScaleRule; +import com.azure.resourcemanager.appcontainers.models.Service; +import com.azure.resourcemanager.appcontainers.models.ServiceBind; +import com.azure.resourcemanager.appcontainers.models.Template; +import com.azure.resourcemanager.appcontainers.models.TrafficWeight; +import com.azure.resourcemanager.appcontainers.models.Type; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for ContainerApps Update. + */ +public final class ContainerAppsUpdateSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Patch.json + */ + /** + * Sample code: Patch Container App. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + ContainerApp resource = manager.containerApps() + .getByResourceGroupWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE).getValue(); + resource + .update().withTags( + mapOf("tag1", "value1", "tag2", "value2")) + .withConfiguration(new Configuration().withIngress(new Ingress().withExternal(true).withTargetPort(3000) + .withTraffic(Arrays.asList(new TrafficWeight().withRevisionName("testcontainerApp0-ab1234") + .withWeight(100).withLabel("production"))) + .withCustomDomains(Arrays.asList(new CustomDomain().withName("www.my-name.com") + .withBindingType(BindingType.SNI_ENABLED).withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), + new CustomDomain().withName("www.my-other-name.com").withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions(Arrays.asList( + new IpSecurityRestrictionRule().withName("Allow work IP A subnet") + .withDescription("Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/32").withAction(Action.ALLOW), + new IpSecurityRestrictionRule().withName("Allow work IP B subnet") + .withDescription("Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/8").withAction(Action.ALLOW))) + .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY))) + .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000) + .withHttpReadBufferSize(30).withHttpMaxRequestSize(10).withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withRuntime(new Runtime().withJava(new RuntimeJava().withEnableMetrics(true)) + .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) + .withMaxInactiveRevisions(10).withService(new Service().withType("redis"))) + .withTemplate( + new Template() + .withInitContainers(Arrays.asList( + new InitContainer().withImage("repo/testcontainerApp0:v4").withName("testinitcontainerApp0") + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerApp0:v1") + .withName("testcontainerApp0").withProbes(Arrays.asList(new ContainerAppProbe() + .withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() + .withName("Custom-Header").withValue("Awesome"))) + .withPath("/health").withPort(8080)) + .withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) + .withScale(new Scale().withMinReplicas(1).withMaxReplicas(5) + .withRules(Arrays.asList(new ScaleRule().withName("httpscalingrule").withCustom( + new CustomScaleRule().withType("http").withMetadata(mapOf("concurrentRequests", "50")))))) + .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/service") + .withName("service").withClientType("dotnet") + .withCustomizedKeys(mapOf("DesiredKey", "fakeTokenPlaceholder"))))) + .apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} +``` + +### ContainerAppsAuthConfigs_CreateOrUpdate + +```java +import com.azure.resourcemanager.appcontainers.models.AppRegistration; +import com.azure.resourcemanager.appcontainers.models.AuthPlatform; +import com.azure.resourcemanager.appcontainers.models.EncryptionSettings; +import com.azure.resourcemanager.appcontainers.models.Facebook; +import com.azure.resourcemanager.appcontainers.models.GlobalValidation; +import com.azure.resourcemanager.appcontainers.models.IdentityProviders; +import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; + +/** + * Samples for ContainerAppsAuthConfigs CreateOrUpdate. + */ +public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AuthConfigs_CreateOrUpdate. + * json + */ + /** + * Sample code: Create or Update Container App AuthConfig. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + createOrUpdateContainerAppAuthConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsAuthConfigs().define("current") + .withExistingContainerApp("workerapps-rg-xj", "testcanadacentral") + .withPlatform(new AuthPlatform().withEnabled(true)) + .withGlobalValidation( + new GlobalValidation().withUnauthenticatedClientAction(UnauthenticatedClientActionV2.ALLOW_ANONYMOUS)) + .withIdentityProviders(new IdentityProviders().withFacebook(new Facebook().withRegistration( + new AppRegistration().withAppId("123").withAppSecretSettingName("fakeTokenPlaceholder")))) + .withEncryptionSettings( + new EncryptionSettings().withContainerAppAuthEncryptionSecretName("fakeTokenPlaceholder") + .withContainerAppAuthSigningSecretName("fakeTokenPlaceholder")) + .create(); + } +} +``` + +### ContainerAppsAuthConfigs_Delete + +```java +/** + * Samples for ContainerAppsAuthConfigs Delete. + */ +public final class ContainerAppsAuthConfigsDeleteSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AuthConfigs_Delete.json + */ + /** + * Sample code: Delete Container App AuthConfig. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + deleteContainerAppAuthConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsAuthConfigs().deleteWithResponse("workerapps-rg-xj", "testcanadacentral", "current", + com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsAuthConfigs_Get + +```java +/** + * Samples for ContainerAppsAuthConfigs Get. + */ +public final class ContainerAppsAuthConfigsGetSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AuthConfigs_Get.json + */ + /** + * Sample code: Get Container App's AuthConfig. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + getContainerAppSAuthConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsAuthConfigs().getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", + com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsAuthConfigs_ListByContainerApp + +```java +/** + * Samples for ContainerAppsAuthConfigs ListByContainerApp. + */ +public final class ContainerAppsAuthConfigsListByContainerAppSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AuthConfigs_ListByContainer. + * json + */ + /** + * Sample code: List Auth Configs by Container Apps. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + listAuthConfigsByContainerApps(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsAuthConfigs().listByContainerApp("workerapps-rg-xj", "testcanadacentral", + com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsDiagnostics_GetDetector + +```java +/** + * Samples for ContainerAppsDiagnostics GetDetector. + */ +public final class ContainerAppsDiagnosticsGetDetectorSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsDiagnostics_Get + * .json + */ + /** + * Sample code: Get Container App's diagnostics info. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + getContainerAppSDiagnosticsInfo(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsDiagnostics().getDetectorWithResponse("mikono-workerapp-test-rg", "mikono-capp-stage1", + "cappcontainerappnetworkIO", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsDiagnostics_GetRevision + +```java +/** + * Samples for ContainerAppsDiagnostics GetRevision. + */ +public final class ContainerAppsDiagnosticsGetRevisionSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Get.json + */ + /** + * Sample code: Get Container App's revision. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + getContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsDiagnostics().getRevisionWithResponse("rg", "testcontainerApp0", + "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsDiagnostics_GetRoot + +```java +/** + * Samples for ContainerAppsDiagnostics GetRoot. + */ +public final class ContainerAppsDiagnosticsGetRootSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Get.json + */ + /** + * Sample code: Get Container App. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsDiagnostics().getRootWithResponse("rg", "testcontainerApp0", + com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsDiagnostics_ListDetectors + +```java +/** + * Samples for ContainerAppsDiagnostics ListDetectors. + */ +public final class ContainerAppsDiagnosticsListDetectorsSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerAppsDiagnostics_List.json + */ + /** + * Sample code: Get the list of available diagnostics for a given Container App. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getTheListOfAvailableDiagnosticsForAGivenContainerApp( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsDiagnostics().listDetectors("mikono-workerapp-test-rg", "mikono-capp-stage1", + com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsDiagnostics_ListRevisions + +```java +/** + * Samples for ContainerAppsDiagnostics ListRevisions. + */ +public final class ContainerAppsDiagnosticsListRevisionsSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_List.json + */ + /** + * Sample code: List Container App's revisions. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + listContainerAppSRevisions(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsDiagnostics().listRevisions("rg", "testcontainerApp0", null, + com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsRevisionReplicas_GetReplica + +```java +/** + * Samples for ContainerAppsRevisionReplicas GetReplica. + */ +public final class ContainerAppsRevisionReplicasGetReplicaSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Replicas_Get.json + */ + /** + * Sample code: Get Container App's revision replica. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + getContainerAppSRevisionReplica(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisionReplicas().getReplicaWithResponse("workerapps-rg-xj", "myapp", "myapp--0wlqy09", + "myapp--0wlqy09-5d9774cff-5wnd8", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsRevisionReplicas_ListReplicas + +```java +/** + * Samples for ContainerAppsRevisionReplicas ListReplicas. + */ +public final class ContainerAppsRevisionReplicasListReplicasSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Replicas_List.json + */ + /** + * Sample code: List Container App's replicas. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + listContainerAppSReplicas(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisionReplicas().listReplicasWithResponse("workerapps-rg-xj", "myapp", "myapp--0wlqy09", + com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsRevisions_ActivateRevision + +```java +/** + * Samples for ContainerAppsRevisions ActivateRevision. + */ +public final class ContainerAppsRevisionsActivateRevisionSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Activate.json + */ + /** + * Sample code: Activate Container App's revision. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + activateContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisions().activateRevisionWithResponse("rg", "testcontainerApp0", + "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsRevisions_DeactivateRevision + +```java +/** + * Samples for ContainerAppsRevisions DeactivateRevision. + */ +public final class ContainerAppsRevisionsDeactivateRevisionSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Deactivate.json + */ + /** + * Sample code: Deactivate Container App's revision. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + deactivateContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisions().deactivateRevisionWithResponse("rg", "testcontainerApp0", + "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsRevisions_GetRevision + +```java +/** + * Samples for ContainerAppsRevisions GetRevision. + */ +public final class ContainerAppsRevisionsGetRevisionSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Get.json + */ + /** + * Sample code: Get Container App's revision. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + getContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisions().getRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", + com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsRevisions_ListRevisions + +```java +/** + * Samples for ContainerAppsRevisions ListRevisions. + */ +public final class ContainerAppsRevisionsListRevisionsSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_List.json + */ + /** + * Sample code: List Container App's revisions. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + listContainerAppSRevisions(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisions().listRevisions("rg", "testcontainerApp0", null, + com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsRevisions_RestartRevision + +```java +/** + * Samples for ContainerAppsRevisions RestartRevision. + */ +public final class ContainerAppsRevisionsRestartRevisionSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Restart.json + */ + /** + * Sample code: Restart Container App's revision. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + restartContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisions().restartRevisionWithResponse("rg", "testStaticSite0", + "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsSourceControls_CreateOrUpdate + +```java +import com.azure.resourcemanager.appcontainers.models.AzureCredentials; +import com.azure.resourcemanager.appcontainers.models.EnvironmentVariable; +import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; +import com.azure.resourcemanager.appcontainers.models.RegistryInfo; +import java.util.Arrays; + +/** + * Samples for ContainerAppsSourceControls CreateOrUpdate. + */ +public final class ContainerAppsSourceControlsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * SourceControls_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update Container App SourceControl. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateContainerAppSourceControl( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSourceControls().define("current") + .withExistingContainerApp("workerapps-rg-xj", "testcanadacentral") + .withRepoUrl("https://github.com/xwang971/ghatest").withBranch("master") + .withGithubActionConfiguration(new GithubActionConfiguration() + .withRegistryInfo(new RegistryInfo().withRegistryUrl("test-registry.azurecr.io") + .withRegistryUsername("test-registry").withRegistryPassword("fakeTokenPlaceholder")) + .withAzureCredentials(new AzureCredentials().withClientId("") + .withClientSecret("fakeTokenPlaceholder").withTenantId("").withKind("feaderated")) + .withContextPath("./").withGithubPersonalAccessToken("fakeTokenPlaceholder").withImage("image/tag") + .withBuildEnvironmentVariables( + Arrays.asList(new EnvironmentVariable().withName("foo1").withValue("bar1"), + new EnvironmentVariable().withName("foo2").withValue("bar2")))) + .create(); + } +} +``` + +### ContainerAppsSourceControls_Delete + +```java +/** + * Samples for ContainerAppsSourceControls Delete. + */ +public final class ContainerAppsSourceControlsDeleteSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SourceControls_Delete.json + */ + /** + * Sample code: Delete Container App SourceControl. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + deleteContainerAppSourceControl(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSourceControls().delete("workerapps-rg-xj", "testcanadacentral", "current", + com.azure.core.util.Context.NONE); + } +} +``` + +### ContainerAppsSourceControls_Get + +```java +/** + * Samples for ContainerAppsSourceControls Get. + */ +public final class ContainerAppsSourceControlsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_GetAuthToken.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SourceControls_Get.json */ /** - * Sample code: Get Container App Auth Token. - * + * Sample code: Get Container App's SourceControl. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getContainerAppAuthToken( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().getAuthTokenWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); + public static void + getContainerAppSSourceControl(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSourceControls().getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", + com.azure.core.util.Context.NONE); } } ``` -### ContainerApps_GetByResourceGroup +### ContainerAppsSourceControls_ListByContainerApp ```java -/** Samples for ContainerApps GetByResourceGroup. */ -public final class ContainerAppsGetByResourceGroupSamples { +/** + * Samples for ContainerAppsSourceControls ListByContainerApp. + */ +public final class ContainerAppsSourceControlsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * SourceControls_ListByContainer.json */ /** - * Sample code: Get Container App. - * + * Sample code: List App's Source Controls. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerApps() - .getByResourceGroupWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); + public static void listAppSSourceControls(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSourceControls().listByContainerApp("workerapps-rg-xj", "testcanadacentral", + com.azure.core.util.Context.NONE); } } ``` -### ContainerApps_List +### DaprComponentResiliencyPolicies_CreateOrUpdate ```java -/** Samples for ContainerApps List. */ -public final class ContainerAppsListSamples { +import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; +import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; +import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; +import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; +import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; + +/** + * Samples for DaprComponentResiliencyPolicies CreateOrUpdate. + */ +public final class DaprComponentResiliencyPoliciesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprComponentResiliencyPolicy_CreateOrUpdate_OutboundOnly.json */ /** - * Sample code: List Container Apps by subscription. - * + * Sample code: Create or update dapr component resiliency policy with outbound policy only. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listContainerAppsBySubscription( + public static void createOrUpdateDaprComponentResiliencyPolicyWithOutboundPolicyOnly( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().list(com.azure.core.util.Context.NONE); + manager.daprComponentResiliencyPolicies().define("myresiliencypolicy") + .withExistingDaprComponent("examplerg", "myenvironment", "mydaprcomponent") + .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() + .withHttpRetryPolicy(new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(5) + .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() + .withInitialDelayInMilliseconds(100).withMaxIntervalInMilliseconds(30000))) + .withTimeoutPolicy( + new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(12)) + .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() + .withConsecutiveErrors(3).withTimeoutInSeconds(20).withIntervalInSeconds(60))) + .create(); } -} -``` - -### ContainerApps_ListByResourceGroup -```java -/** Samples for ContainerApps ListByResourceGroup. */ -public final class ContainerAppsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprComponentResiliencyPolicy_CreateOrUpdate_AllOptions.json */ /** - * Sample code: List Container Apps by resource group. - * + * Sample code: Create or update dapr component resiliency policy with all options. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listContainerAppsByResourceGroup( + public static void createOrUpdateDaprComponentResiliencyPolicyWithAllOptions( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().listByResourceGroup("rg", com.azure.core.util.Context.NONE); + manager.daprComponentResiliencyPolicies().define("myresiliencypolicy") + .withExistingDaprComponent("examplerg", "myenvironment", "mydaprcomponent") + .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() + .withHttpRetryPolicy(new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(15) + .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() + .withInitialDelayInMilliseconds(2000).withMaxIntervalInMilliseconds(5500))) + .withTimeoutPolicy( + new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(30)) + .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() + .withConsecutiveErrors(5).withTimeoutInSeconds(10).withIntervalInSeconds(4))) + .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() + .withHttpRetryPolicy(new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(5) + .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() + .withInitialDelayInMilliseconds(100).withMaxIntervalInMilliseconds(30000))) + .withTimeoutPolicy( + new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(12)) + .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() + .withConsecutiveErrors(3).withTimeoutInSeconds(20).withIntervalInSeconds(60))) + .create(); } -} -``` - -### ContainerApps_ListCustomHostnameAnalysis -```java -/** Samples for ContainerApps ListCustomHostnameAnalysis. */ -public final class ContainerAppsListCustomHostnameAnalysisSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ListCustomHostNameAnalysis.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprComponentResiliencyPolicy_CreateOrUpdate_SparseOptions.json */ /** - * Sample code: Analyze Custom Hostname. - * + * Sample code: Create or update dapr component resiliency policy with sparse options. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void analyzeCustomHostname(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerApps() - .listCustomHostnameAnalysisWithResponse( - "rg", "testcontainerApp0", "my.name.corp", com.azure.core.util.Context.NONE); + public static void createOrUpdateDaprComponentResiliencyPolicyWithSparseOptions( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponentResiliencyPolicies().define("myresiliencypolicy") + .withExistingDaprComponent("examplerg", "myenvironment", "mydaprcomponent") + .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() + .withHttpRetryPolicy(new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(5) + .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() + .withInitialDelayInMilliseconds(2000).withMaxIntervalInMilliseconds(5500))) + .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() + .withConsecutiveErrors(3).withTimeoutInSeconds(20))) + .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration().withTimeoutPolicy( + new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(12))) + .create(); } } ``` -### ContainerApps_ListSecrets +### DaprComponentResiliencyPolicies_Delete ```java -/** Samples for ContainerApps ListSecrets. */ -public final class ContainerAppsListSecretsSamples { +/** + * Samples for DaprComponentResiliencyPolicies Delete. + */ +public final class DaprComponentResiliencyPoliciesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprComponentResiliencyPolicies_Delete.json */ /** - * Sample code: List Container Apps Secrets. - * + * Sample code: Delete dapr component resiliency policy. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listContainerAppsSecrets( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().listSecretsWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); + public static void + deleteDaprComponentResiliencyPolicy(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponentResiliencyPolicies().deleteWithResponse("examplerg", "myenvironment", "mydaprcomponent", + "myresiliencypolicy", com.azure.core.util.Context.NONE); } } ``` -### ContainerApps_Start +### DaprComponentResiliencyPolicies_Get ```java -/** Samples for ContainerApps Start. */ -public final class ContainerAppsStartSamples { +/** + * Samples for DaprComponentResiliencyPolicies Get. + */ +public final class DaprComponentResiliencyPoliciesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Start.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprComponentResiliencyPolicies_Get.json */ /** - * Sample code: Start Container App. - * + * Sample code: Get Dapr component resiliency policy. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void startContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().start("rg", "testWorkerApp0", com.azure.core.util.Context.NONE); + public static void + getDaprComponentResiliencyPolicy(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponentResiliencyPolicies().getWithResponse("examplerg", "myenvironment", "mydaprcomponent", + "myresiliencypolicy", com.azure.core.util.Context.NONE); } } ``` -### ContainerApps_Stop +### DaprComponentResiliencyPolicies_List ```java -/** Samples for ContainerApps Stop. */ -public final class ContainerAppsStopSamples { +/** + * Samples for DaprComponentResiliencyPolicies List. + */ +public final class DaprComponentResiliencyPoliciesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Stop.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprComponentResiliencyPolicies_List.json */ /** - * Sample code: Stop Container App. - * + * Sample code: List Dapr component resiliency policies. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void stopContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.containerApps().stop("rg", "testWorkerApp0", com.azure.core.util.Context.NONE); + public static void + listDaprComponentResiliencyPolicies(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponentResiliencyPolicies().list("examplerg", "myenvironment", "mydaprcomponent", + com.azure.core.util.Context.NONE); } } ``` -### ContainerApps_Update +### DaprComponents_CreateOrUpdate ```java -import com.azure.resourcemanager.appcontainers.models.Action; -import com.azure.resourcemanager.appcontainers.models.Affinity; -import com.azure.resourcemanager.appcontainers.models.AppProtocol; -import com.azure.resourcemanager.appcontainers.models.BindingType; -import com.azure.resourcemanager.appcontainers.models.Configuration; -import com.azure.resourcemanager.appcontainers.models.Container; -import com.azure.resourcemanager.appcontainers.models.ContainerApp; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.CustomDomain; -import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; -import com.azure.resourcemanager.appcontainers.models.Dapr; -import com.azure.resourcemanager.appcontainers.models.Ingress; -import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; -import com.azure.resourcemanager.appcontainers.models.InitContainer; -import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; -import com.azure.resourcemanager.appcontainers.models.LogLevel; -import com.azure.resourcemanager.appcontainers.models.Scale; -import com.azure.resourcemanager.appcontainers.models.ScaleRule; -import com.azure.resourcemanager.appcontainers.models.Service; -import com.azure.resourcemanager.appcontainers.models.ServiceBind; -import com.azure.resourcemanager.appcontainers.models.Template; -import com.azure.resourcemanager.appcontainers.models.TrafficWeight; -import com.azure.resourcemanager.appcontainers.models.Type; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; +import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; +import com.azure.resourcemanager.appcontainers.models.DaprMetadata; +import com.azure.resourcemanager.appcontainers.models.DaprServiceBindMetadata; +import com.azure.resourcemanager.appcontainers.models.Secret; import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -/** Samples for ContainerApps Update. */ -public final class ContainerAppsUpdateSamples { +/** + * Samples for DaprComponents CreateOrUpdate. + */ +public final class DaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprComponents_CreateOrUpdate_Secrets.json */ /** - * Sample code: Patch Container App. - * + * Sample code: Create or update dapr component with secrets. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void patchContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - ContainerApp resource = - manager - .containerApps() - .getByResourceGroupWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() - .withTags(mapOf("tag1", "value1", "tag2", "value2")) - .withConfiguration( - new Configuration() - .withIngress( - new Ingress() - .withExternal(true) - .withTargetPort(3000) - .withTraffic( - Arrays - .asList( - new TrafficWeight() - .withRevisionName("testcontainerApp0-ab1234") - .withWeight(100) - .withLabel("production"))) - .withCustomDomains( - Arrays - .asList( - new CustomDomain() - .withName("www.my-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), - new CustomDomain() - .withName("www.my-other-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) - .withIpSecurityRestrictions( - Arrays - .asList( - new IpSecurityRestrictionRule() - .withName("Allow work IP A subnet") - .withDescription( - "Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/32") - .withAction(Action.ALLOW), - new IpSecurityRestrictionRule() - .withName("Allow work IP B subnet") - .withDescription( - "Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/8") - .withAction(Action.ALLOW))) - .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY))) - .withDapr( - new Dapr() - .withEnabled(true) - .withAppProtocol(AppProtocol.HTTP) - .withAppPort(3000) - .withHttpReadBufferSize(30) - .withHttpMaxRequestSize(10) - .withLogLevel(LogLevel.DEBUG) - .withEnableApiLogging(true)) - .withMaxInactiveRevisions(10) - .withService(new Service().withType("redis"))) - .withTemplate( - new Template() - .withInitContainers( - Arrays - .asList( - new InitContainer() - .withImage("repo/testcontainerApp0:v4") - .withName("testinitcontainerApp0") - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers( - Arrays - .asList( - new Container() - .withImage("repo/testcontainerApp0:v1") - .withName("testcontainerApp0") - .withProbes( - Arrays - .asList( - new ContainerAppProbe() - .withHttpGet( - new ContainerAppProbeHttpGet() - .withHttpHeaders( - Arrays - .asList( - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header") - .withValue("Awesome"))) - .withPath("/health") - .withPort(8080)) - .withInitialDelaySeconds(3) - .withPeriodSeconds(3) - .withType(Type.LIVENESS))))) - .withScale( - new Scale() - .withMinReplicas(1) - .withMaxReplicas(5) - .withRules( - Arrays - .asList( - new ScaleRule() - .withName("httpscalingrule") - .withCustom( - new CustomScaleRule() - .withType("http") - .withMetadata(mapOf("concurrentRequests", "50")))))) - .withServiceBinds( - Arrays - .asList( - new ServiceBind() - .withServiceId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/service") - .withName("service")))) - .apply(); + public static void createOrUpdateDaprComponentWithSecrets( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponents().createOrUpdateWithResponse("examplerg", "myenvironment", "reddog", + new DaprComponentInner().withComponentType("state.azure.cosmosdb").withVersion("v1").withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) + .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .withServiceComponentBind(Arrays.asList(new DaprComponentServiceBinding().withName("statestore") + .withServiceId( + "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") + .withMetadata( + new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind")))), + com.azure.core.util.Context.NONE); } - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprComponents_CreateOrUpdate_SecretStoreComponent.json + */ + /** + * Sample code: Create or update dapr component with secret store component. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateDaprComponentWithSecretStoreComponent( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponents().createOrUpdateWithResponse("examplerg", "myenvironment", "reddog", + new DaprComponentInner().withComponentType("state.azure.cosmosdb").withVersion("v1").withIgnoreErrors(false) + .withInitTimeout("50s").withSecretStoreComponent("fakeTokenPlaceholder") + .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .withServiceComponentBind(Arrays.asList(new DaprComponentServiceBinding().withName("statestore") + .withServiceId( + "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") + .withMetadata( + new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind")))), + com.azure.core.util.Context.NONE); } } ``` -### ContainerAppsAuthConfigs_CreateOrUpdate +### DaprComponents_Delete ```java -import com.azure.resourcemanager.appcontainers.models.AppRegistration; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import com.azure.resourcemanager.appcontainers.models.Facebook; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.IdentityProviders; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; - -/** Samples for ContainerAppsAuthConfigs CreateOrUpdate. */ -public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { +/** + * Samples for DaprComponents Delete. + */ +public final class DaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AuthConfigs_CreateOrUpdate.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_Delete.json */ /** - * Sample code: Create or Update Container App AuthConfig. - * + * Sample code: Delete dapr component. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateContainerAppAuthConfig( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsAuthConfigs() - .define("current") - .withExistingContainerApp("workerapps-rg-xj", "testcanadacentral") - .withPlatform(new AuthPlatform().withEnabled(true)) - .withGlobalValidation( - new GlobalValidation().withUnauthenticatedClientAction(UnauthenticatedClientActionV2.ALLOW_ANONYMOUS)) - .withIdentityProviders( - new IdentityProviders() - .withFacebook( - new Facebook() - .withRegistration( - new AppRegistration() - .withAppId("123") - .withAppSecretSettingName("fakeTokenPlaceholder")))) - .create(); + public static void deleteDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponents().deleteWithResponse("examplerg", "myenvironment", "reddog", + com.azure.core.util.Context.NONE); } } ``` -### ContainerAppsAuthConfigs_Delete +### DaprComponents_Get ```java -/** Samples for ContainerAppsAuthConfigs Delete. */ -public final class ContainerAppsAuthConfigsDeleteSamples { +/** + * Samples for DaprComponents Get. + */ +public final class DaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AuthConfigs_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprComponents_Get_SecretStoreComponent.json */ /** - * Sample code: Delete Container App AuthConfig. - * + * Sample code: Get Dapr Component with secret store component. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void deleteContainerAppAuthConfig( + public static void getDaprComponentWithSecretStoreComponent( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsAuthConfigs() - .deleteWithResponse("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); + manager.daprComponents().getWithResponse("examplerg", "myenvironment", "reddog", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_Get_Secrets. + * json + */ + /** + * Sample code: Get Dapr Component with secrets. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + getDaprComponentWithSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponents().getWithResponse("examplerg", "myenvironment", "reddog", + com.azure.core.util.Context.NONE); } } ``` -### ContainerAppsAuthConfigs_Get +### DaprComponents_List ```java -/** Samples for ContainerAppsAuthConfigs Get. */ -public final class ContainerAppsAuthConfigsGetSamples { +/** + * Samples for DaprComponents List. + */ +public final class DaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AuthConfigs_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_List.json */ /** - * Sample code: Get Container App's AuthConfig. - * + * Sample code: List Dapr Components. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getContainerAppSAuthConfig( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsAuthConfigs() - .getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); + public static void listDaprComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponents().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); } } ``` -### ContainerAppsAuthConfigs_ListByContainerApp +### DaprComponents_ListSecrets ```java -/** Samples for ContainerAppsAuthConfigs ListByContainerApp. */ -public final class ContainerAppsAuthConfigsListByContainerAppSamples { +/** + * Samples for DaprComponents ListSecrets. + */ +public final class DaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AuthConfigs_ListByContainer.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_ListSecrets. + * json */ /** - * Sample code: List Auth Configs by Container Apps. - * + * Sample code: List Container Apps Secrets. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listAuthConfigsByContainerApps( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsAuthConfigs() - .listByContainerApp("workerapps-rg-xj", "testcanadacentral", com.azure.core.util.Context.NONE); + public static void + listContainerAppsSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponents().listSecretsWithResponse("examplerg", "myenvironment", "reddog", + com.azure.core.util.Context.NONE); } } ``` -### ContainerAppsDiagnostics_GetDetector +### DaprSubscriptions_CreateOrUpdate ```java -/** Samples for ContainerAppsDiagnostics GetDetector. */ -public final class ContainerAppsDiagnosticsGetDetectorSamples { +import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; +import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule; +import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for DaprSubscriptions CreateOrUpdate. + */ +public final class DaprSubscriptionsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerAppsDiagnostics_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprSubscriptions_CreateOrUpdate_RouteRulesAndMetadata.json */ /** - * Sample code: Get Container App's diagnostics info. - * + * Sample code: Create or update dapr subscription with route rules and metadata. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getContainerAppSDiagnosticsInfo( + public static void createOrUpdateDaprSubscriptionWithRouteRulesAndMetadata( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsDiagnostics() - .getDetectorWithResponse( - "mikono-workerapp-test-rg", - "mikono-capp-stage1", - "cappcontainerappnetworkIO", - com.azure.core.util.Context.NONE); + manager.daprSubscriptions().define("mysubscription") + .withExistingManagedEnvironment("examplerg", "myenvironment").withPubsubName("mypubsubcomponent") + .withTopic("inventory") + .withRoutes(new DaprSubscriptionRoutes() + .withRules(Arrays.asList( + new DaprSubscriptionRouteRule().withMatch("event.type == 'widget'").withPath("/widgets"), + new DaprSubscriptionRouteRule().withMatch("event.type == 'gadget'").withPath("/gadgets"))) + .withDefaultProperty("/products")) + .withMetadata(mapOf("foo", "bar", "hello", "world")).create(); } -} -``` -### ContainerAppsDiagnostics_GetRevision + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprSubscriptions_CreateOrUpdate_DefaultRoute.json + */ + /** + * Sample code: Create or update dapr subscription with default route only. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateDaprSubscriptionWithDefaultRouteOnly( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprSubscriptions().define("mysubscription") + .withExistingManagedEnvironment("examplerg", "myenvironment").withPubsubName("mypubsubcomponent") + .withTopic("inventory").withRoutes(new DaprSubscriptionRoutes().withDefaultProperty("/products")).create(); + } -```java -/** Samples for ContainerAppsDiagnostics GetRevision. */ -public final class ContainerAppsDiagnosticsGetRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprSubscriptions_CreateOrUpdate_BulkSubscribeAndScopes.json */ /** - * Sample code: Get Container App's revision. - * + * Sample code: Create or update dapr subscription with bulk subscribe configuration and scopes. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getContainerAppSRevision( + public static void createOrUpdateDaprSubscriptionWithBulkSubscribeConfigurationAndScopes( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsDiagnostics() - .getRevisionWithResponse( - "rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); + manager.daprSubscriptions().define("mysubscription") + .withExistingManagedEnvironment("examplerg", "myenvironment").withPubsubName("mypubsubcomponent") + .withTopic("inventory").withRoutes(new DaprSubscriptionRoutes().withDefaultProperty("/products")) + .withScopes(Arrays.asList("warehouseapp", "customersupportapp")) + .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(true).withMaxMessagesCount(123) + .withMaxAwaitDurationMs(500)) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; } } ``` -### ContainerAppsDiagnostics_GetRoot +### DaprSubscriptions_Delete ```java -/** Samples for ContainerAppsDiagnostics GetRoot. */ -public final class ContainerAppsDiagnosticsGetRootSamples { +/** + * Samples for DaprSubscriptions Delete. + */ +public final class DaprSubscriptionsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_Delete. + * json */ /** - * Sample code: Get Container App. - * + * Sample code: Delete dapr subscription. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsDiagnostics() - .getRootWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); + public static void deleteDaprSubscription(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprSubscriptions().deleteWithResponse("examplerg", "myenvironment", "mysubscription", + com.azure.core.util.Context.NONE); } } ``` -### ContainerAppsDiagnostics_ListDetectors +### DaprSubscriptions_Get ```java -/** Samples for ContainerAppsDiagnostics ListDetectors. */ -public final class ContainerAppsDiagnosticsListDetectorsSamples { +/** + * Samples for DaprSubscriptions Get. + */ +public final class DaprSubscriptionsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerAppsDiagnostics_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprSubscriptions_Get_DefaultRoute.json */ /** - * Sample code: Get the list of available diagnostics for a given Container App. - * + * Sample code: Get Dapr subscription with bulk subscribe configuration and scopes. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getTheListOfAvailableDiagnosticsForAGivenContainerApp( + public static void getDaprSubscriptionWithBulkSubscribeConfigurationAndScopes( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsDiagnostics() - .listDetectors("mikono-workerapp-test-rg", "mikono-capp-stage1", com.azure.core.util.Context.NONE); + manager.daprSubscriptions().getWithResponse("examplerg", "myenvironment", "mypubsubcomponent", + com.azure.core.util.Context.NONE); } -} -``` - -### ContainerAppsDiagnostics_ListRevisions -```java -/** Samples for ContainerAppsDiagnostics ListRevisions. */ -public final class ContainerAppsDiagnosticsListRevisionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprSubscriptions_Get_BulkSubscribeAndScopes.json */ /** - * Sample code: List Container App's revisions. - * + * Sample code: Get Dapr subscription with default route only. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listContainerAppSRevisions( + public static void getDaprSubscriptionWithDefaultRouteOnly( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsDiagnostics() - .listRevisions("rg", "testcontainerApp0", null, com.azure.core.util.Context.NONE); + manager.daprSubscriptions().getWithResponse("examplerg", "myenvironment", "mypubsubcomponent", + com.azure.core.util.Context.NONE); } -} -``` -### ContainerAppsRevisionReplicas_GetReplica - -```java -/** Samples for ContainerAppsRevisionReplicas GetReplica. */ -public final class ContainerAppsRevisionReplicasGetReplicaSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Replicas_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprSubscriptions_Get_RouteRulesAndMetadata.json */ /** - * Sample code: Get Container App's revision replica. - * + * Sample code: GetDapr subscription with route rules and metadata. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getContainerAppSRevisionReplica( + public static void getDaprSubscriptionWithRouteRulesAndMetadata( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsRevisionReplicas() - .getReplicaWithResponse( - "workerapps-rg-xj", - "myapp", - "myapp--0wlqy09", - "myapp--0wlqy09-5d9774cff-5wnd8", - com.azure.core.util.Context.NONE); + manager.daprSubscriptions().getWithResponse("examplerg", "myenvironment", "mypubsubcomponent", + com.azure.core.util.Context.NONE); } } ``` -### ContainerAppsRevisionReplicas_ListReplicas +### DaprSubscriptions_List ```java -/** Samples for ContainerAppsRevisionReplicas ListReplicas. */ -public final class ContainerAppsRevisionReplicasListReplicasSamples { +/** + * Samples for DaprSubscriptions List. + */ +public final class DaprSubscriptionsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Replicas_List.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_List.json */ /** - * Sample code: List Container App's replicas. - * + * Sample code: List Dapr subscriptions. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listContainerAppSReplicas( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsRevisionReplicas() - .listReplicasWithResponse("workerapps-rg-xj", "myapp", "myapp--0wlqy09", com.azure.core.util.Context.NONE); + public static void listDaprSubscriptions(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprSubscriptions().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); } } ``` -### ContainerAppsRevisions_ActivateRevision +### DotNetComponents_CreateOrUpdate ```java -/** Samples for ContainerAppsRevisions ActivateRevision. */ -public final class ContainerAppsRevisionsActivateRevisionSamples { +import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; +import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; +import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; +import java.util.Arrays; + +/** + * Samples for DotNetComponents CreateOrUpdate. + */ +public final class DotNetComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Activate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DotNetComponents_CreateOrUpdate.json */ /** - * Sample code: Activate Container App's revision. - * + * Sample code: Create or Update .NET Component. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void activateContainerAppSRevision( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsRevisions() - .activateRevisionWithResponse( - "rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); + public static void + createOrUpdateNETComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.dotNetComponents().define("mydotnetcomponent") + .withExistingManagedEnvironment("examplerg", "myenvironment") + .withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) + .withConfigurations(Arrays.asList( + new DotNetComponentConfigurationProperty().withPropertyName("dashboard-theme").withValue("dark"))) + .create(); } -} -``` - -### ContainerAppsRevisions_DeactivateRevision -```java -/** Samples for ContainerAppsRevisions DeactivateRevision. */ -public final class ContainerAppsRevisionsDeactivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Deactivate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DotNetComponents_CreateOrUpdate_ServiceBind.json */ /** - * Sample code: Deactivate Container App's revision. - * + * Sample code: Create or Update .NET Component with ServiceBinds. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void deactivateContainerAppSRevision( + public static void createOrUpdateNETComponentWithServiceBinds( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsRevisions() - .deactivateRevisionWithResponse( - "rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); + manager.dotNetComponents().define("mydotnetcomponent") + .withExistingManagedEnvironment("examplerg", "myenvironment") + .withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) + .withConfigurations(Arrays.asList( + new DotNetComponentConfigurationProperty().withPropertyName("dashboard-theme").withValue("dark"))) + .withServiceBinds(Arrays.asList(new DotNetComponentServiceBind().withName("yellowcat").withServiceId( + "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/dotNetComponents/yellowcat"))) + .create(); } } ``` -### ContainerAppsRevisions_GetRevision +### DotNetComponents_Delete ```java -/** Samples for ContainerAppsRevisions GetRevision. */ -public final class ContainerAppsRevisionsGetRevisionSamples { +/** + * Samples for DotNetComponents Delete. + */ +public final class DotNetComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Delete.json */ /** - * Sample code: Get Container App's revision. - * + * Sample code: Delete .NET Component. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getContainerAppSRevision( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsRevisions() - .getRevisionWithResponse( - "rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); + public static void deleteNETComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.dotNetComponents().delete("examplerg", "myenvironment", "mydotnetcomponent", + com.azure.core.util.Context.NONE); } } ``` -### ContainerAppsRevisions_ListRevisions +### DotNetComponents_Get ```java -/** Samples for ContainerAppsRevisions ListRevisions. */ -public final class ContainerAppsRevisionsListRevisionsSamples { +/** + * Samples for DotNetComponents Get. + */ +public final class DotNetComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DotNetComponents_Get_ServiceBind.json */ /** - * Sample code: List Container App's revisions. - * + * Sample code: Get .NET Component with ServiceBinds. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listContainerAppSRevisions( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsRevisions() - .listRevisions("rg", "testcontainerApp0", null, com.azure.core.util.Context.NONE); + public static void + getNETComponentWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.dotNetComponents().getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", + com.azure.core.util.Context.NONE); } -} -``` - -### ContainerAppsRevisions_RestartRevision -```java -/** Samples for ContainerAppsRevisions RestartRevision. */ -public final class ContainerAppsRevisionsRestartRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Restart.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Get.json */ /** - * Sample code: Restart Container App's revision. - * + * Sample code: Get .NET Component. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void restartContainerAppSRevision( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsRevisions() - .restartRevisionWithResponse( - "rg", "testStaticSite0", "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); + public static void getNETComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.dotNetComponents().getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", + com.azure.core.util.Context.NONE); } } ``` -### ContainerAppsSourceControls_CreateOrUpdate +### DotNetComponents_List ```java -import com.azure.resourcemanager.appcontainers.models.AzureCredentials; -import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; -import com.azure.resourcemanager.appcontainers.models.RegistryInfo; +/** + * Samples for DotNetComponents List. + */ +public final class DotNetComponentsListSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_List.json + */ + /** + * Sample code: List .NET Components. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listNETComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.dotNetComponents().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); + } -/** Samples for ContainerAppsSourceControls CreateOrUpdate. */ -public final class ContainerAppsSourceControlsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/SourceControls_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DotNetComponents_List_ServiceBind.json */ /** - * Sample code: Create or Update Container App SourceControl. - * + * Sample code: List .NET Components with ServiceBinds. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateContainerAppSourceControl( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsSourceControls() - .define("current") - .withExistingContainerApp("workerapps-rg-xj", "testcanadacentral") - .withRepoUrl("https://github.com/xwang971/ghatest") - .withBranch("master") - .withGithubActionConfiguration( - new GithubActionConfiguration() - .withRegistryInfo( - new RegistryInfo() - .withRegistryUrl("test-registry.azurecr.io") - .withRegistryUsername("test-registry") - .withRegistryPassword("fakeTokenPlaceholder")) - .withAzureCredentials( - new AzureCredentials() - .withClientId("") - .withClientSecret("fakeTokenPlaceholder") - .withTenantId("") - .withKind("feaderated")) - .withContextPath("./") - .withGithubPersonalAccessToken("fakeTokenPlaceholder") - .withImage("image/tag")) - .create(); + public static void + listNETComponentsWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.dotNetComponents().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); } } ``` -### ContainerAppsSourceControls_Delete +### DotNetComponents_Update ```java -/** Samples for ContainerAppsSourceControls Delete. */ -public final class ContainerAppsSourceControlsDeleteSamples { +import com.azure.resourcemanager.appcontainers.models.DotNetComponent; +import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; +import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; +import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; +import java.util.Arrays; + +/** + * Samples for DotNetComponents Update. + */ +public final class DotNetComponentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/SourceControls_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DotNetComponents_Patch_ServiceBind.json */ /** - * Sample code: Delete Container App SourceControl. - * + * Sample code: Patch .NET Component with ServiceBinds. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void deleteContainerAppSourceControl( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsSourceControls() - .delete("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); + public static void + patchNETComponentWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + DotNetComponent resource = manager.dotNetComponents() + .getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) + .withConfigurations(Arrays.asList( + new DotNetComponentConfigurationProperty().withPropertyName("dashboard-theme").withValue("dark"))) + .withServiceBinds(Arrays.asList(new DotNetComponentServiceBind().withName("yellowcat").withServiceId( + "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/dotNetComponents/yellowcat"))) + .apply(); } -} -``` - -### ContainerAppsSourceControls_Get -```java -/** Samples for ContainerAppsSourceControls Get. */ -public final class ContainerAppsSourceControlsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/SourceControls_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Patch.json */ /** - * Sample code: Get Container App's SourceControl. - * + * Sample code: Patch .NET Component. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getContainerAppSSourceControl( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsSourceControls() - .getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); + public static void patchNETComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + DotNetComponent resource = manager.dotNetComponents() + .getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) + .withConfigurations(Arrays.asList( + new DotNetComponentConfigurationProperty().withPropertyName("dashboard-theme").withValue("dark"))) + .apply(); } } ``` -### ContainerAppsSourceControls_ListByContainerApp +### FunctionsExtension_InvokeFunctionsHost ```java -/** Samples for ContainerAppsSourceControls ListByContainerApp. */ -public final class ContainerAppsSourceControlsListByContainerAppSamples { +/** + * Samples for FunctionsExtension InvokeFunctionsHost. + */ +public final class FunctionsExtensionInvokeFunctionsHostSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/SourceControls_ListByContainer.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/FunctionsExtension_Post.json */ /** - * Sample code: List App's Source Controls. - * + * Sample code: Invoke Functions host using Functions Extension API. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listAppSSourceControls(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsSourceControls() - .listByContainerApp("workerapps-rg-xj", "testcanadacentral", com.azure.core.util.Context.NONE); + public static void invokeFunctionsHostUsingFunctionsExtensionAPI( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.functionsExtensions().invokeFunctionsHostWithResponse("rg", "testcontainerApp0", + "testcontainerApp0-pjxhsye", "testcontainerApp0", com.azure.core.util.Context.NONE); } } ``` -### DaprComponents_CreateOrUpdate +### JavaComponents_CreateOrUpdate ```java -import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -import com.azure.resourcemanager.appcontainers.models.DaprMetadata; -import com.azure.resourcemanager.appcontainers.models.Secret; +import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; +import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; +import com.azure.resourcemanager.appcontainers.models.JavaComponentType; import java.util.Arrays; -/** Samples for DaprComponents CreateOrUpdate. */ -public final class DaprComponentsCreateOrUpdateSamples { +/** + * Samples for JavaComponents CreateOrUpdate. + */ +public final class JavaComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_CreateOrUpdate_Secrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * JavaComponents_CreateOrUpdate_ServiceBind.json */ /** - * Sample code: Create or update dapr component with secrets. - * + * Sample code: Create or Update Java Component with ServiceBinds. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateDaprComponentWithSecrets( + public static void createOrUpdateJavaComponentWithServiceBinds( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .daprComponents() - .createOrUpdateWithResponse( - "examplerg", - "myenvironment", - "reddog", - new DaprComponentInner() - .withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) - .withMetadata( - Arrays - .asList( - new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")), - com.azure.core.util.Context.NONE); + manager.javaComponents().define("myjavacomponent").withExistingManagedEnvironment("examplerg", "myenvironment") + .withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) + .withConfigurations(Arrays.asList( + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") + .withValue("true"), + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") + .withValue("10000ms"))) + .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("yellowcat").withServiceId( + "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat"))) + .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * JavaComponents_CreateOrUpdate.json */ /** - * Sample code: Create or update dapr component with secret store component. - * + * Sample code: Create or Update Java Component. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateDaprComponentWithSecretStoreComponent( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .daprComponents() - .createOrUpdateWithResponse( - "examplerg", - "myenvironment", - "reddog", - new DaprComponentInner() - .withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecretStoreComponent("fakeTokenPlaceholder") - .withMetadata( - Arrays - .asList( - new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")), - com.azure.core.util.Context.NONE); + public static void + createOrUpdateJavaComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.javaComponents().define("myjavacomponent").withExistingManagedEnvironment("examplerg", "myenvironment") + .withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) + .withConfigurations(Arrays.asList( + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") + .withValue("true"), + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") + .withValue("10000ms"))) + .create(); } } ``` -### DaprComponents_Delete +### JavaComponents_Delete ```java -/** Samples for DaprComponents Delete. */ -public final class DaprComponentsDeleteSamples { +/** + * Samples for JavaComponents Delete. + */ +public final class JavaComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_Delete.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Delete.json */ /** - * Sample code: Delete dapr component. - * + * Sample code: Delete Java Component. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void deleteDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .daprComponents() - .deleteWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); + public static void deleteJavaComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.javaComponents().delete("examplerg", "myenvironment", "myjavacomponent", + com.azure.core.util.Context.NONE); } } ``` -### DaprComponents_Get +### JavaComponents_Get ```java -/** Samples for DaprComponents Get. */ -public final class DaprComponentsGetSamples { +/** + * Samples for JavaComponents Get. + */ +public final class JavaComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_Get_SecretStoreComponent.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Get.json */ /** - * Sample code: Get Dapr Component with secret store component. - * + * Sample code: Get Java Component. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getDaprComponentWithSecretStoreComponent( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .daprComponents() - .getWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); + public static void getJavaComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.javaComponents().getWithResponse("examplerg", "myenvironment", "myjavacomponent", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_Get_Secrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * JavaComponents_Get_ServiceBind.json */ /** - * Sample code: Get Dapr Component with secrets. - * + * Sample code: Get Java Component with ServiceBinds. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getDaprComponentWithSecrets( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .daprComponents() - .getWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); + public static void + getJavaComponentWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.javaComponents().getWithResponse("examplerg", "myenvironment", "myjavacomponent", + com.azure.core.util.Context.NONE); } } ``` -### DaprComponents_List +### JavaComponents_List ```java -/** Samples for DaprComponents List. */ -public final class DaprComponentsListSamples { +/** + * Samples for JavaComponents List. + */ +public final class JavaComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_List.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_List.json */ /** - * Sample code: List Dapr Components. - * + * Sample code: List Java Components. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listDaprComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.daprComponents().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); + public static void listJavaComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.javaComponents().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * JavaComponents_List_ServiceBind.json + */ + /** + * Sample code: List Java Components with ServiceBinds. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + listJavaComponentsWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.javaComponents().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); } } ``` -### DaprComponents_ListSecrets +### JavaComponents_Update ```java -/** Samples for DaprComponents ListSecrets. */ -public final class DaprComponentsListSecretsSamples { +import com.azure.resourcemanager.appcontainers.models.JavaComponent; +import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; +import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; +import com.azure.resourcemanager.appcontainers.models.JavaComponentType; +import java.util.Arrays; + +/** + * Samples for JavaComponents Update. + */ +public final class JavaComponentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_ListSecrets.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Patch.json */ /** - * Sample code: List Container Apps Secrets. - * + * Sample code: Patch Java Component. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listContainerAppsSecrets( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .daprComponents() - .listSecretsWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); + public static void patchJavaComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + JavaComponent resource = manager.javaComponents() + .getWithResponse("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) + .withConfigurations(Arrays.asList( + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") + .withValue("true"), + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") + .withValue("10000ms"))) + .apply(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * JavaComponents_Patch_ServiceBind.json + */ + /** + * Sample code: Patch Java Component with ServiceBinds. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + patchJavaComponentWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + JavaComponent resource = manager.javaComponents() + .getWithResponse("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) + .withConfigurations(Arrays.asList( + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") + .withValue("true"), + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") + .withValue("10000ms"))) + .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("yellowcat").withServiceId( + "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat"))) + .apply(); } } ``` @@ -2231,6 +3610,8 @@ import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; import com.azure.resourcemanager.appcontainers.models.ContainerResources; +import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; +import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; import com.azure.resourcemanager.appcontainers.models.InitContainer; import com.azure.resourcemanager.appcontainers.models.JobConfiguration; import com.azure.resourcemanager.appcontainers.models.JobConfigurationEventTriggerConfig; @@ -2240,133 +3621,118 @@ import com.azure.resourcemanager.appcontainers.models.JobScaleRule; import com.azure.resourcemanager.appcontainers.models.JobTemplate; import com.azure.resourcemanager.appcontainers.models.TriggerType; import com.azure.resourcemanager.appcontainers.models.Type; +import com.azure.resourcemanager.appcontainers.models.VolumeMount; import java.io.IOException; import java.util.Arrays; -/** Samples for Jobs CreateOrUpdate. */ +/** + * Samples for Jobs CreateOrUpdate. + */ public final class JobsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_CreateorUpdate_EventTrigger.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * Job_CreateorUpdate_ConnectedEnvironment.json + */ + /** + * Sample code: Create or Update Container Apps Job On A Connected Environment. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateContainerAppsJobOnAConnectedEnvironment( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.jobs().define("testcontainerAppsJob0").withRegion("East US").withExistingResourceGroup("rg") + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .withEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube") + .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.MANUAL).withReplicaTimeout(10) + .withReplicaRetryLimit(10).withManualTriggerConfig( + new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1).withParallelism(4))) + .withTemplate(new JobTemplate() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") + .withName("testinitcontainerAppsJob0").withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers(Arrays + .asList(new Container().withImage("repo/testcontainerAppsJob0:v1").withName("testcontainerAppsJob0") + .withProbes(Arrays.asList(new ContainerAppProbe() + .withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() + .withName("Custom-Header").withValue("Awesome"))) + .withPath("/health").withPort(8080)) + .withInitialDelaySeconds(5).withPeriodSeconds(3).withType(Type.LIVENESS)))))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * Job_CreateorUpdate_EventTrigger.json */ /** * Sample code: Create or Update Container Apps Job With Event Driven Trigger. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void createOrUpdateContainerAppsJobWithEventDrivenTrigger( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) throws IOException { - manager - .jobs() - .define("testcontainerAppsJob0") - .withRegion("East US") - .withExistingResourceGroup("rg") + manager.jobs().define("testcontainerAppsJob0").withRegion("East US").withExistingResourceGroup("rg") .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") - .withConfiguration( - new JobConfiguration() - .withTriggerType(TriggerType.EVENT) - .withReplicaTimeout(10) - .withReplicaRetryLimit(10) - .withEventTriggerConfig( - new JobConfigurationEventTriggerConfig() - .withReplicaCompletionCount(1) - .withParallelism(4) - .withScale( - new JobScale() - .withPollingInterval(40) - .withMinExecutions(1) - .withMaxExecutions(5) - .withRules( - Arrays - .asList( - new JobScaleRule() - .withName("servicebuscalingrule") - .withType("azure-servicebus") - .withMetadata( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"topicName\":\"my-topic\"}", - Object.class, - SerializerEncoding.JSON))))))) - .withTemplate( - new JobTemplate() - .withInitContainers( - Arrays - .asList( - new InitContainer() - .withImage("repo/testcontainerAppsJob0:v4") - .withName("testinitcontainerAppsJob0") - .withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers( - Arrays - .asList( - new Container() - .withImage("repo/testcontainerAppsJob0:v1") - .withName("testcontainerAppsJob0")))) + .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.EVENT).withReplicaTimeout(10) + .withReplicaRetryLimit(10).withEventTriggerConfig( + new JobConfigurationEventTriggerConfig().withReplicaCompletionCount(1).withParallelism(4) + .withScale(new JobScale().withPollingInterval(40).withMinExecutions(1).withMaxExecutions(5) + .withRules(Arrays.asList(new JobScaleRule().withName("servicebuscalingrule") + .withType("azure-servicebus") + .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter().deserialize( + "{\"topicName\":\"my-topic\"}", Object.class, SerializerEncoding.JSON))))))) + .withTemplate(new JobTemplate() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") + .withName("testinitcontainerAppsJob0").withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers(Arrays.asList( + new Container().withImage("repo/testcontainerAppsJob0:v1").withName("testcontainerAppsJob0")))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_CreateorUpdate.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_CreateorUpdate.json */ /** * Sample code: Create or Update Container Apps Job. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateContainerAppsJob( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .jobs() - .define("testcontainerAppsJob0") - .withRegion("East US") - .withExistingResourceGroup("rg") + public static void + createOrUpdateContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.jobs().define("testcontainerAppsJob0").withRegion("East US").withExistingResourceGroup("rg") .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") - .withConfiguration( - new JobConfiguration() - .withTriggerType(TriggerType.MANUAL) - .withReplicaTimeout(10) - .withReplicaRetryLimit(10) - .withManualTriggerConfig( - new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1).withParallelism(4))) + .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.MANUAL).withReplicaTimeout(10) + .withReplicaRetryLimit(10).withManualTriggerConfig( + new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1).withParallelism(4))) .withTemplate( new JobTemplate() - .withInitContainers( - Arrays - .asList( - new InitContainer() - .withImage("repo/testcontainerAppsJob0:v4") - .withName("testinitcontainerAppsJob0") - .withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers( - Arrays - .asList( - new Container() - .withImage("repo/testcontainerAppsJob0:v1") - .withName("testcontainerAppsJob0") - .withProbes( - Arrays - .asList( - new ContainerAppProbe() - .withHttpGet( - new ContainerAppProbeHttpGet() - .withHttpHeaders( - Arrays - .asList( - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header") - .withValue("Awesome"))) - .withPath("/health") - .withPort(8080)) - .withInitialDelaySeconds(5) - .withPeriodSeconds(3) - .withType(Type.LIVENESS)))))) + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") + .withName("testinitcontainerAppsJob0").withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers(Arrays.asList( + new Container().withImage("repo/testcontainerAppsJob0:v1").withName("testcontainerAppsJob0") + .withVolumeMounts(Arrays.asList( + new VolumeMount().withVolumeName("azurefile").withMountPath("/mnt/path1") + .withSubPath("subPath1"), + new VolumeMount().withVolumeName("nfsazurefile").withMountPath("/mnt/path2") + .withSubPath("subPath2"))) + .withProbes(Arrays.asList(new ContainerAppProbe() + .withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() + .withName("Custom-Header").withValue("Awesome"))) + .withPath("/health").withPort(8080)) + .withInitialDelaySeconds(5).withPeriodSeconds(3).withType(Type.LIVENESS)))))) .create(); } } @@ -2375,14 +3741,17 @@ public final class JobsCreateOrUpdateSamples { ### Jobs_Delete ```java -/** Samples for Jobs Delete. */ +/** + * Samples for Jobs Delete. + */ public final class JobsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Delete.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Delete.json */ /** * Sample code: Delete Container Apps Job. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { @@ -2394,14 +3763,17 @@ public final class JobsDeleteSamples { ### Jobs_GetByResourceGroup ```java -/** Samples for Jobs GetByResourceGroup. */ +/** + * Samples for Jobs GetByResourceGroup. + */ public final class JobsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Get.json */ /** * Sample code: Get Container Apps Job. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { @@ -2410,21 +3782,48 @@ public final class JobsGetByResourceGroupSamples { } ``` +### Jobs_GetDetector + +```java +/** + * Samples for Jobs GetDetector. + */ +public final class JobsGetDetectorSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_GetDetector.json + */ + /** + * Sample code: Get diagnostic data for a Container App Job. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + getDiagnosticDataForAContainerAppJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.jobs().getDetectorWithResponse("mikono-workerapp-test-rg", "mikonojob1", "containerappjobnetworkIO", + com.azure.core.util.Context.NONE); + } +} +``` + ### Jobs_List ```java -/** Samples for Jobs List. */ +/** + * Samples for Jobs List. + */ public final class JobsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Jobs_ListBySubscription.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Jobs_ListBySubscription.json */ /** * Sample code: List Container Apps Jobs by subscription. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listContainerAppsJobsBySubscription( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + listContainerAppsJobsBySubscription(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.jobs().list(com.azure.core.util.Context.NONE); } } @@ -2433,43 +3832,97 @@ public final class JobsListSamples { ### Jobs_ListByResourceGroup ```java -/** Samples for Jobs ListByResourceGroup. */ +/** + * Samples for Jobs ListByResourceGroup. + */ public final class JobsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Jobs_ListByResourceGroup.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Jobs_ListByResourceGroup. + * json */ /** * Sample code: List Container Apps Jobs by resource group. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listContainerAppsJobsByResourceGroup( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + listContainerAppsJobsByResourceGroup(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.jobs().listByResourceGroup("rg", com.azure.core.util.Context.NONE); } } ``` +### Jobs_ListDetectors + +```java +/** + * Samples for Jobs ListDetectors. + */ +public final class JobsListDetectorsSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_ListDetectors.json + */ + /** + * Sample code: Get the list of available diagnostic data for a Container App Job. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getTheListOfAvailableDiagnosticDataForAContainerAppJob( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.jobs().listDetectorsWithResponse("mikono-workerapp-test-rg", "mikonojob1", + com.azure.core.util.Context.NONE); + } +} +``` + ### Jobs_ListSecrets ```java -/** Samples for Jobs ListSecrets. */ +/** + * Samples for Jobs ListSecrets. + */ public final class JobsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_ListSecrets.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_ListSecrets.json */ /** * Sample code: List Container Apps Job Secrets. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listContainerAppsJobSecrets( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + listContainerAppsJobSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.jobs().listSecretsWithResponse("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE); } } ``` +### Jobs_ProxyGet + +```java +/** + * Samples for Jobs ProxyGet. + */ +public final class JobsProxyGetSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_ProxyGet.json + */ + /** + * Sample code: Get Container App Job by name. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + getContainerAppJobByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.jobs().proxyGetWithResponse("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE); + } +} +``` + ### Jobs_Start ```java @@ -2478,40 +3931,30 @@ import com.azure.resourcemanager.appcontainers.models.JobExecutionContainer; import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; import java.util.Arrays; -/** Samples for Jobs Start. */ +/** + * Samples for Jobs Start. + */ public final class JobsStartSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Start.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Start.json */ /** * Sample code: Run a Container Apps Job. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void runAContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .jobs() - .start( - "rg", - "testcontainerAppsJob0", - new JobExecutionTemplate() - .withContainers( - Arrays - .asList( - new JobExecutionContainer() - .withImage("repo/testcontainerAppsJob0:v4") - .withName("testcontainerAppsJob0") - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withInitContainers( - Arrays - .asList( - new JobExecutionContainer() - .withImage("repo/testcontainerAppsJob0:v4") - .withName("testinitcontainerAppsJob0") - .withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))), - com.azure.core.util.Context.NONE); + manager.jobs().start("rg", "testcontainerAppsJob0", + new JobExecutionTemplate() + .withContainers(Arrays.asList(new JobExecutionContainer().withImage("repo/testcontainerAppsJob0:v4") + .withName("testcontainerAppsJob0") + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withInitContainers(Arrays.asList(new JobExecutionContainer().withImage("repo/testcontainerAppsJob0:v4") + .withName("testinitcontainerAppsJob0").withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))), + com.azure.core.util.Context.NONE); } } ``` @@ -2519,18 +3962,21 @@ public final class JobsStartSamples { ### Jobs_StopExecution ```java -/** Samples for Jobs StopExecution. */ +/** + * Samples for Jobs StopExecution. + */ public final class JobsStopExecutionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Stop_Execution.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Stop_Execution.json */ /** * Sample code: Terminate a Container Apps Job. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void terminateAContainerAppsJob( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + terminateAContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.jobs().stopExecution("rg", "testcontainerAppsJob0", "jobExecution1", com.azure.core.util.Context.NONE); } } @@ -2539,18 +3985,21 @@ public final class JobsStopExecutionSamples { ### Jobs_StopMultipleExecutions ```java -/** Samples for Jobs StopMultipleExecutions. */ +/** + * Samples for Jobs StopMultipleExecutions. + */ public final class JobsStopMultipleExecutionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Stop_Multiple.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Stop_Multiple.json */ /** * Sample code: Terminate Multiple Container Apps Job. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void terminateMultipleContainerAppsJob( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + terminateMultipleContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.jobs().stopMultipleExecutions("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE); } } @@ -2574,69 +4023,43 @@ import com.azure.resourcemanager.appcontainers.models.TriggerType; import com.azure.resourcemanager.appcontainers.models.Type; import java.util.Arrays; -/** Samples for Jobs Update. */ +/** + * Samples for Jobs Update. + */ public final class JobsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Patch.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Patch.json */ /** * Sample code: Patch Container Apps Job. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void patchContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - Job resource = - manager - .jobs() - .getByResourceGroupWithResponse("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() + Job resource = manager.jobs() + .getByResourceGroupWithResponse("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE).getValue(); + resource.update() .withProperties( new JobPatchPropertiesProperties() .withConfiguration( - new JobConfiguration() - .withTriggerType(TriggerType.MANUAL) - .withReplicaTimeout(10) + new JobConfiguration().withTriggerType(TriggerType.MANUAL).withReplicaTimeout(10) .withReplicaRetryLimit(10) - .withManualTriggerConfig( - new JobConfigurationManualTriggerConfig() - .withReplicaCompletionCount(1) - .withParallelism(4))) - .withTemplate( - new JobTemplate() - .withInitContainers( - Arrays - .asList( - new InitContainer() - .withImage("repo/testcontainerAppsJob0:v4") - .withName("testinitcontainerAppsJob0") - .withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers( - Arrays - .asList( - new Container() - .withImage("repo/testcontainerAppsJob0:v1") - .withName("testcontainerAppsJob0") - .withProbes( - Arrays - .asList( - new ContainerAppProbe() - .withHttpGet( - new ContainerAppProbeHttpGet() - .withHttpHeaders( - Arrays - .asList( - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header") - .withValue("Awesome"))) - .withPath("/health") - .withPort(8080)) - .withInitialDelaySeconds(3) - .withPeriodSeconds(3) - .withType(Type.LIVENESS))))))) + .withManualTriggerConfig(new JobConfigurationManualTriggerConfig() + .withReplicaCompletionCount(1).withParallelism(4))) + .withTemplate(new JobTemplate() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") + .withName("testinitcontainerAppsJob0").withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers(Arrays.asList( + new Container().withImage("repo/testcontainerAppsJob0:v1").withName("testcontainerAppsJob0") + .withProbes(Arrays.asList(new ContainerAppProbe() + .withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() + .withName("Custom-Header").withValue("Awesome"))) + .withPath("/health").withPort(8080)) + .withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))))) .apply(); } } @@ -2645,18 +4068,21 @@ public final class JobsUpdateSamples { ### JobsExecutions_List ```java -/** Samples for JobsExecutions List. */ +/** + * Samples for JobsExecutions List. + */ public final class JobsExecutionsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Executions_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Executions_Get.json */ /** * Sample code: Get a Container Apps Job Executions. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getAContainerAppsJobExecutions( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + getAContainerAppsJobExecutions(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.jobsExecutions().list("rg", "testcontainerAppsJob0", null, com.azure.core.util.Context.NONE); } } @@ -2668,27 +4094,25 @@ public final class JobsExecutionsListSamples { import com.azure.resourcemanager.appcontainers.models.ManagedCertificateDomainControlValidation; import com.azure.resourcemanager.appcontainers.models.ManagedCertificateProperties; -/** Samples for ManagedCertificates CreateOrUpdate. */ +/** + * Samples for ManagedCertificates CreateOrUpdate. + */ public final class ManagedCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedCertificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateCertificate( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedCertificates() - .define("certificate-firendly-name") - .withRegion("East US") + public static void + createOrUpdateCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedCertificates().define("certificate-firendly-name").withRegion("East US") .withExistingManagedEnvironment("examplerg", "testcontainerenv") - .withProperties( - new ManagedCertificateProperties() - .withSubjectName("my-subject-name.company.country.net") - .withDomainControlValidation(ManagedCertificateDomainControlValidation.CNAME)) + .withProperties(new ManagedCertificateProperties().withSubjectName("my-subject-name.company.country.net") + .withDomainControlValidation(ManagedCertificateDomainControlValidation.CNAME)) .create(); } } @@ -2697,21 +4121,23 @@ public final class ManagedCertificatesCreateOrUpdateSamples { ### ManagedCertificates_Delete ```java -/** Samples for ManagedCertificates Delete. */ +/** + * Samples for ManagedCertificates Delete. + */ public final class ManagedCertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificate_Delete.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedCertificate_Delete. + * json */ /** * Sample code: Delete Certificate. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedCertificates() - .deleteWithResponse( - "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); + manager.managedCertificates().deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE); } } ``` @@ -2719,21 +4145,22 @@ public final class ManagedCertificatesDeleteSamples { ### ManagedCertificates_Get ```java -/** Samples for ManagedCertificates Get. */ +/** + * Samples for ManagedCertificates Get. + */ public final class ManagedCertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificate_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedCertificate_Get.json */ /** * Sample code: Get Certificate. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedCertificates() - .getWithResponse( - "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); + manager.managedCertificates().getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE); } } ``` @@ -2741,14 +4168,17 @@ public final class ManagedCertificatesGetSamples { ### ManagedCertificates_List ```java -/** Samples for ManagedCertificates List. */ +/** + * Samples for ManagedCertificates List. + */ public final class ManagedCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificates_ListByManagedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedCertificates_ListByManagedEnvironment.json */ /** * Sample code: List Managed Certificates by Managed Environment. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void listManagedCertificatesByManagedEnvironment( @@ -2765,24 +4195,24 @@ import com.azure.resourcemanager.appcontainers.models.ManagedCertificate; import java.util.HashMap; import java.util.Map; -/** Samples for ManagedCertificates Update. */ +/** + * Samples for ManagedCertificates Update. + */ public final class ManagedCertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificates_Patch.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedCertificates_Patch. + * json */ /** * Sample code: Patch Managed Certificate. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void patchManagedCertificate( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - ManagedCertificate resource = - manager - .managedCertificates() - .getWithResponse( - "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE) - .getValue(); + public static void + patchManagedCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + ManagedCertificate resource = manager.managedCertificates().getWithResponse("examplerg", "testcontainerenv", + "certificate-firendly-name", com.azure.core.util.Context.NONE).getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @@ -2803,25 +4233,23 @@ public final class ManagedCertificatesUpdateSamples { ### ManagedEnvironmentDiagnostics_GetDetector ```java -/** Samples for ManagedEnvironmentDiagnostics GetDetector. */ +/** + * Samples for ManagedEnvironmentDiagnostics GetDetector. + */ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentDiagnostics_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironmentDiagnostics_Get.json */ /** * Sample code: Get diagnostic data for a managed environments. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getDiagnosticDataForAManagedEnvironments( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironmentDiagnostics() - .getDetectorWithResponse( - "mikono-workerapp-test-rg", - "mikonokubeenv", - "ManagedEnvAvailabilityMetrics", - com.azure.core.util.Context.NONE); + manager.managedEnvironmentDiagnostics().getDetectorWithResponse("mikono-workerapp-test-rg", "mikonokubeenv", + "ManagedEnvAvailabilityMetrics", com.azure.core.util.Context.NONE); } } ``` @@ -2829,21 +4257,46 @@ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { ### ManagedEnvironmentDiagnostics_ListDetectors ```java -/** Samples for ManagedEnvironmentDiagnostics ListDetectors. */ +/** + * Samples for ManagedEnvironmentDiagnostics ListDetectors. + */ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentDiagnostics_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironmentDiagnostics_List.json */ /** * Sample code: Get the list of available diagnostic data for a managed environments. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getTheListOfAvailableDiagnosticDataForAManagedEnvironments( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironmentDiagnostics() - .listDetectorsWithResponse("mikono-workerapp-test-rg", "mikonokubeenv", com.azure.core.util.Context.NONE); + manager.managedEnvironmentDiagnostics().listDetectorsWithResponse("mikono-workerapp-test-rg", "mikonokubeenv", + com.azure.core.util.Context.NONE); + } +} +``` + +### ManagedEnvironmentUsages_List + +```java +/** + * Samples for ManagedEnvironmentUsages List. + */ +public final class ManagedEnvironmentUsagesListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironmentUsages_List.json + */ + /** + * Sample code: List managed environment usages. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + listManagedEnvironmentUsages(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironmentUsages().list("examplerg", "jlaw-demo1", com.azure.core.util.Context.NONE); } } ``` @@ -2851,142 +4304,154 @@ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { ### ManagedEnvironments_CreateOrUpdate ```java +import com.azure.resourcemanager.appcontainers.models.AppInsightsConfiguration; import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; +import com.azure.resourcemanager.appcontainers.models.DataDogConfiguration; +import com.azure.resourcemanager.appcontainers.models.DestinationsConfiguration; +import com.azure.resourcemanager.appcontainers.models.Header; import com.azure.resourcemanager.appcontainers.models.LogAnalyticsConfiguration; +import com.azure.resourcemanager.appcontainers.models.LogsConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.appcontainers.models.MetricsConfiguration; import com.azure.resourcemanager.appcontainers.models.Mtls; +import com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration; +import com.azure.resourcemanager.appcontainers.models.OtlpConfiguration; +import com.azure.resourcemanager.appcontainers.models.TracesConfiguration; +import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; -/** Samples for ManagedEnvironments CreateOrUpdate. */ +/** + * Samples for ManagedEnvironments CreateOrUpdate. + */ public final class ManagedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json */ /** * Sample code: Create environment with custom infrastructureResourceGroup. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void createEnvironmentWithCustomInfrastructureResourceGroup( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironments() - .define("testcontainerenv") - .withRegion("East US") + manager.managedEnvironments().define("testcontainerenv").withRegion("East US") .withExistingResourceGroup("examplerg") .withDaprAIConnectionString( "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") - .withVnetConfiguration( - new VnetConfiguration() - .withInfrastructureSubnetId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1")) - .withAppLogsConfiguration( - new AppLogsConfiguration() - .withLogAnalyticsConfiguration( - new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("fakeTokenPlaceholder"))) + .withVnetConfiguration(new VnetConfiguration().withInfrastructureSubnetId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1")) + .withAppLogsConfiguration(new AppLogsConfiguration().withLogAnalyticsConfiguration( + new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("fakeTokenPlaceholder"))) .withZoneRedundant(true) - .withCustomDomainConfiguration( - new CustomDomainConfiguration() - .withDnsSuffix("www.my-name.com") - .withCertificateValue("Y2VydA==".getBytes()) - .withCertificatePassword("fakeTokenPlaceholder")) - .withWorkloadProfiles( - Arrays - .asList( - new WorkloadProfile() - .withName("My-GP-01") - .withWorkloadProfileType("GeneralPurpose") - .withMinimumCount(3) - .withMaximumCount(12), - new WorkloadProfile() - .withName("My-MO-01") - .withWorkloadProfileType("MemoryOptimized") - .withMinimumCount(3) - .withMaximumCount(6), - new WorkloadProfile() - .withName("My-CO-01") - .withWorkloadProfileType("ComputeOptimized") - .withMinimumCount(3) - .withMaximumCount(6), - new WorkloadProfile().withName("My-consumption-01").withWorkloadProfileType("Consumption"))) - .withInfrastructureResourceGroup("myInfrastructureRgName") - .create(); + .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("www.my-name.com") + .withCertificateValue("Y2VydA==".getBytes()).withCertificatePassword("fakeTokenPlaceholder")) + .withWorkloadProfiles(Arrays.asList( + new WorkloadProfile().withName("My-GP-01").withWorkloadProfileType("GeneralPurpose").withMinimumCount(3) + .withMaximumCount(12), + new WorkloadProfile().withName("My-MO-01").withWorkloadProfileType("MemoryOptimized") + .withMinimumCount(3).withMaximumCount(6), + new WorkloadProfile().withName("My-CO-01").withWorkloadProfileType("ComputeOptimized") + .withMinimumCount(3).withMaximumCount(6), + new WorkloadProfile().withName("My-consumption-01").withWorkloadProfileType("Consumption"))) + .withInfrastructureResourceGroup("myInfrastructureRgName").create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create environments. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void createEnvironments(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironments() - .define("testcontainerenv") - .withRegion("East US") + manager.managedEnvironments().define("testcontainerenv").withRegion("East US") .withExistingResourceGroup("examplerg") + .withIdentity(new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.fromString("SystemAssigned, UserAssigned")) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity", + new UserAssignedIdentity()))) .withDaprAIConnectionString( "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") - .withVnetConfiguration( - new VnetConfiguration() - .withInfrastructureSubnetId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1")) + .withVnetConfiguration(new VnetConfiguration().withInfrastructureSubnetId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1")) .withAppLogsConfiguration( - new AppLogsConfiguration() - .withLogAnalyticsConfiguration( - new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("fakeTokenPlaceholder"))) + new AppLogsConfiguration().withLogAnalyticsConfiguration(new LogAnalyticsConfiguration() + .withCustomerId("string").withSharedKey("fakeTokenPlaceholder").withDynamicJsonColumns(true))) + .withAppInsightsConfiguration(new AppInsightsConfiguration().withConnectionString( + "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://eastus-8.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/")) + .withOpenTelemetryConfiguration( + new OpenTelemetryConfiguration() + .withDestinationsConfiguration( + new DestinationsConfiguration() + .withDataDogConfiguration( + new DataDogConfiguration().withSite("string").withKey("fakeTokenPlaceholder")) + .withOtlpConfigurations(Arrays.asList(new OtlpConfiguration().withName("dashboard") + .withEndpoint("dashboard.k8s.region.azurecontainerapps.io:80").withInsecure(true) + .withHeaders(Arrays + .asList(new Header().withKey("fakeTokenPlaceholder").withValue("xxxxxxxxxxx")))))) + .withTracesConfiguration(new TracesConfiguration().withDestinations(Arrays.asList("appInsights"))) + .withLogsConfiguration(new LogsConfiguration().withDestinations(Arrays.asList("appInsights"))) + .withMetricsConfiguration(new MetricsConfiguration().withDestinations(Arrays.asList("dataDog")))) .withZoneRedundant(true) - .withCustomDomainConfiguration( - new CustomDomainConfiguration() - .withDnsSuffix("www.my-name.com") - .withCertificateValue("Y2VydA==".getBytes()) - .withCertificatePassword("fakeTokenPlaceholder")) - .withWorkloadProfiles( - Arrays - .asList( - new WorkloadProfile() - .withName("My-GP-01") - .withWorkloadProfileType("GeneralPurpose") - .withMinimumCount(3) - .withMaximumCount(12), - new WorkloadProfile() - .withName("My-MO-01") - .withWorkloadProfileType("MemoryOptimized") - .withMinimumCount(3) - .withMaximumCount(6), - new WorkloadProfile() - .withName("My-CO-01") - .withWorkloadProfileType("ComputeOptimized") - .withMinimumCount(3) - .withMaximumCount(6), - new WorkloadProfile().withName("My-consumption-01").withWorkloadProfileType("Consumption"))) + .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("www.my-name.com") + .withCertificateValue("Y2VydA==".getBytes()).withCertificatePassword("fakeTokenPlaceholder")) + .withWorkloadProfiles(Arrays.asList( + new WorkloadProfile().withName("My-GP-01").withWorkloadProfileType("GeneralPurpose").withMinimumCount(3) + .withMaximumCount(12), + new WorkloadProfile().withName("My-MO-01").withWorkloadProfileType("MemoryOptimized") + .withMinimumCount(3).withMaximumCount(6), + new WorkloadProfile().withName("My-CO-01").withWorkloadProfileType("ComputeOptimized") + .withMinimumCount(3).withMaximumCount(6), + new WorkloadProfile().withName("My-consumption-01").withWorkloadProfileType("Consumption"))) .withPeerAuthentication( new ManagedEnvironmentPropertiesPeerAuthentication().withMtls(new Mtls().withEnabled(true))) .create(); } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } } ``` ### ManagedEnvironments_Delete ```java -/** Samples for ManagedEnvironments Delete. */ +/** + * Samples for ManagedEnvironments Delete. + */ public final class ManagedEnvironmentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_Delete.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_Delete. + * json */ /** * Sample code: Delete environment by name. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void deleteEnvironmentByName( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + deleteEnvironmentByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.managedEnvironments().delete("examplerg", "examplekenv", com.azure.core.util.Context.NONE); } } @@ -2995,18 +4460,21 @@ public final class ManagedEnvironmentsDeleteSamples { ### ManagedEnvironments_GetAuthToken ```java -/** Samples for ManagedEnvironments GetAuthToken. */ +/** + * Samples for ManagedEnvironments GetAuthToken. + */ public final class ManagedEnvironmentsGetAuthTokenSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_GetAuthToken.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironments_GetAuthToken.json */ /** * Sample code: Get Managed Environment Auth Token. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getManagedEnvironmentAuthToken( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + getManagedEnvironmentAuthToken(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.managedEnvironments().getAuthTokenWithResponse("rg", "testenv", com.azure.core.util.Context.NONE); } } @@ -3015,20 +4483,22 @@ public final class ManagedEnvironmentsGetAuthTokenSamples { ### ManagedEnvironments_GetByResourceGroup ```java -/** Samples for ManagedEnvironments GetByResourceGroup. */ +/** + * Samples for ManagedEnvironments GetByResourceGroup. + */ public final class ManagedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getEnvironmentsByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironments() - .getByResourceGroupWithResponse("examplerg", "jlaw-demo1", com.azure.core.util.Context.NONE); + manager.managedEnvironments().getByResourceGroupWithResponse("examplerg", "jlaw-demo1", + com.azure.core.util.Context.NONE); } } ``` @@ -3036,18 +4506,21 @@ public final class ManagedEnvironmentsGetByResourceGroupSamples { ### ManagedEnvironments_List ```java -/** Samples for ManagedEnvironments List. */ +/** + * Samples for ManagedEnvironments List. + */ public final class ManagedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironments_ListBySubscription.json */ /** * Sample code: List environments by subscription. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listEnvironmentsBySubscription( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + listEnvironmentsBySubscription(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.managedEnvironments().list(com.azure.core.util.Context.NONE); } } @@ -3056,18 +4529,21 @@ public final class ManagedEnvironmentsListSamples { ### ManagedEnvironments_ListByResourceGroup ```java -/** Samples for ManagedEnvironments ListByResourceGroup. */ +/** + * Samples for ManagedEnvironments ListByResourceGroup. + */ public final class ManagedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listEnvironmentsByResourceGroup( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + listEnvironmentsByResourceGroup(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.managedEnvironments().listByResourceGroup("examplerg", com.azure.core.util.Context.NONE); } } @@ -3076,21 +4552,23 @@ public final class ManagedEnvironmentsListByResourceGroupSamples { ### ManagedEnvironments_ListWorkloadProfileStates ```java -/** Samples for ManagedEnvironments ListWorkloadProfileStates. */ +/** + * Samples for ManagedEnvironments ListWorkloadProfileStates. + */ public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_ListWorkloadProfileStates.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironments_ListWorkloadProfileStates.json */ /** * Sample code: List environments by subscription. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listEnvironmentsBySubscription( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironments() - .listWorkloadProfileStates("examplerg", "jlaw-demo1", com.azure.core.util.Context.NONE); + public static void + listEnvironmentsBySubscription(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironments().listWorkloadProfileStates("examplerg", "jlaw-demo1", + com.azure.core.util.Context.NONE); } } ``` @@ -3102,23 +4580,25 @@ import com.azure.resourcemanager.appcontainers.models.ManagedEnvironment; import java.util.HashMap; import java.util.Map; -/** Samples for ManagedEnvironments Update. */ +/** + * Samples for ManagedEnvironments Update. + */ public final class ManagedEnvironmentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_Patch.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_Patch. + * json */ /** * Sample code: Patch Managed Environment. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void patchManagedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - ManagedEnvironment resource = - manager - .managedEnvironments() - .getByResourceGroupWithResponse("examplerg", "testcontainerenv", com.azure.core.util.Context.NONE) - .getValue(); + public static void + patchManagedEnvironment(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + ManagedEnvironment resource = manager.managedEnvironments() + .getByResourceGroupWithResponse("examplerg", "testcontainerenv", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } @@ -3139,20 +4619,22 @@ public final class ManagedEnvironmentsUpdateSamples { ### ManagedEnvironmentsDiagnostics_GetRoot ```java -/** Samples for ManagedEnvironmentsDiagnostics GetRoot. */ +/** + * Samples for ManagedEnvironmentsDiagnostics GetRoot. + */ public final class ManagedEnvironmentsDiagnosticsGetRootSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getEnvironmentsByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironmentsDiagnostics() - .getRootWithResponse("examplerg", "jlaw-demo1", com.azure.core.util.Context.NONE); + manager.managedEnvironmentsDiagnostics().getRootWithResponse("examplerg", "jlaw-demo1", + com.azure.core.util.Context.NONE); } } ``` @@ -3163,31 +4645,46 @@ public final class ManagedEnvironmentsDiagnosticsGetRootSamples { import com.azure.resourcemanager.appcontainers.models.AccessMode; import com.azure.resourcemanager.appcontainers.models.AzureFileProperties; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorageProperties; +import com.azure.resourcemanager.appcontainers.models.NfsAzureFileProperties; -/** Samples for ManagedEnvironmentsStorages CreateOrUpdate. */ +/** + * Samples for ManagedEnvironmentsStorages CreateOrUpdate. + */ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironmentsStorages_CreateOrUpdate_NfsAzureFile.json */ /** - * Sample code: Create or update environments storage. - * + * Sample code: Create or update environments storage for NFS Azure file. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateEnvironmentsStorage( + public static void createOrUpdateEnvironmentsStorageForNFSAzureFile( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironmentsStorages() - .define("jlaw-demo1") + manager.managedEnvironmentsStorages().define("jlaw-demo1") .withExistingManagedEnvironment("examplerg", "managedEnv") - .withProperties( - new ManagedEnvironmentStorageProperties() - .withAzureFile( - new AzureFileProperties() - .withAccountName("account1") - .withAccountKey("fakeTokenPlaceholder") - .withAccessMode(AccessMode.READ_ONLY) - .withShareName("share1"))) + .withProperties(new ManagedEnvironmentStorageProperties().withNfsAzureFile(new NfsAzureFileProperties() + .withServer("server1").withAccessMode(AccessMode.READ_ONLY).withShareName("share1"))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironmentsStorages_CreateOrUpdate.json + */ + /** + * Sample code: Create or update environments storage. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + createOrUpdateEnvironmentsStorage(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironmentsStorages().define("jlaw-demo1") + .withExistingManagedEnvironment("examplerg", "managedEnv") + .withProperties(new ManagedEnvironmentStorageProperties().withAzureFile( + new AzureFileProperties().withAccountName("account1").withAccountKey("fakeTokenPlaceholder") + .withAccessMode(AccessMode.READ_ONLY).withShareName("share1"))) .create(); } } @@ -3196,21 +4693,23 @@ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { ### ManagedEnvironmentsStorages_Delete ```java -/** Samples for ManagedEnvironmentsStorages Delete. */ +/** + * Samples for ManagedEnvironmentsStorages Delete. + */ public final class ManagedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironmentsStorages() - .deleteWithResponse("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE); + manager.managedEnvironmentsStorages().deleteWithResponse("examplerg", "managedEnv", "jlaw-demo1", + com.azure.core.util.Context.NONE); } } ``` @@ -3218,21 +4717,38 @@ public final class ManagedEnvironmentsStoragesDeleteSamples { ### ManagedEnvironmentsStorages_Get ```java -/** Samples for ManagedEnvironmentsStorages Get. */ +/** + * Samples for ManagedEnvironmentsStorages Get. + */ public final class ManagedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironmentsStorages_Get.json */ /** - * Sample code: get a environments storage properties by subscription. - * + * Sample code: get a environments storage. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getAEnvironmentsStoragePropertiesBySubscription( + public static void + getAEnvironmentsStorage(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironmentsStorages().getWithResponse("examplerg", "managedEnv", "jlaw-demo1", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironmentsStorages_Get_NfsAzureFile.json + */ + /** + * Sample code: get a environments storage for NFS Azure file. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getAEnvironmentsStorageForNFSAzureFile( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironmentsStorages() - .getWithResponse("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE); + manager.managedEnvironmentsStorages().getWithResponse("examplerg", "managedEnv", "jlaw-demo1", + com.azure.core.util.Context.NONE); } } ``` @@ -3240,21 +4756,23 @@ public final class ManagedEnvironmentsStoragesGetSamples { ### ManagedEnvironmentsStorages_List ```java -/** Samples for ManagedEnvironmentsStorages List. */ +/** + * Samples for ManagedEnvironmentsStorages List. + */ public final class ManagedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironmentsStorages() - .listWithResponse("examplerg", "managedEnv", com.azure.core.util.Context.NONE); + manager.managedEnvironmentsStorages().listWithResponse("examplerg", "managedEnv", + com.azure.core.util.Context.NONE); } } ``` @@ -3264,46 +4782,41 @@ public final class ManagedEnvironmentsStoragesListSamples { ```java import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -/** Samples for Namespaces CheckNameAvailability. */ +/** + * Samples for Namespaces CheckNameAvailability. + */ public final class NamespacesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * Certificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void certificatesCheckNameAvailability( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .namespaces() - .checkNameAvailabilityWithResponse( - "examplerg", - "testcontainerenv", - new CheckNameAvailabilityRequest() - .withName("testcertificatename") - .withType("Microsoft.App/managedEnvironments/certificates"), + public static void + certificatesCheckNameAvailability(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.namespaces() + .checkNameAvailabilityWithResponse("examplerg", "testcontainerenv", new CheckNameAvailabilityRequest() + .withName("testcertificatename").withType("Microsoft.App/managedEnvironments/certificates"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerApps_CheckNameAvailability.json */ /** * Sample code: ContainerApps_CheckNameAvailability. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void containerAppsCheckNameAvailability( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .namespaces() - .checkNameAvailabilityWithResponse( - "examplerg", - "testcontainerenv", - new CheckNameAvailabilityRequest().withName("testcappname").withType("Microsoft.App/containerApps"), - com.azure.core.util.Context.NONE); + public static void + containerAppsCheckNameAvailability(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.namespaces().checkNameAvailabilityWithResponse("examplerg", "testcontainerenv", + new CheckNameAvailabilityRequest().withName("testcappname").withType("Microsoft.App/containerApps"), + com.azure.core.util.Context.NONE); } } ``` @@ -3311,14 +4824,17 @@ public final class NamespacesCheckNameAvailabilitySamples { ### Operations_List ```java -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Operations_List.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Operations_List.json */ /** * Sample code: List all operations. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void listAllOperations(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { @@ -3327,23 +4843,69 @@ public final class OperationsListSamples { } ``` +### ResourceProvider_GetCustomDomainVerificationId + +```java +/** + * Samples for ResourceProvider GetCustomDomainVerificationId. + */ +public final class ResourceProviderGetCustomDomainVerificationIdSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * Subscriptions_GetCustomDomainVerificationId.json + */ + /** + * Sample code: List all operations. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listAllOperations(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.resourceProviders().getCustomDomainVerificationIdWithResponse(com.azure.core.util.Context.NONE); + } +} +``` + ### ResourceProvider_JobExecution ```java -/** Samples for ResourceProvider JobExecution. */ +/** + * Samples for ResourceProvider JobExecution. + */ public final class ResourceProviderJobExecutionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Execution_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Execution_Get.json */ /** * Sample code: Get a single Job Execution. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getASingleJobExecution(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .resourceProviders() - .jobExecutionWithResponse("rg", "testcontainerAppsJob0", "jobExecution1", com.azure.core.util.Context.NONE); + manager.resourceProviders().jobExecutionWithResponse("rg", "testcontainerAppsJob0", "jobExecution1", + com.azure.core.util.Context.NONE); + } +} +``` + +### Usages_List + +```java +/** + * Samples for Usages List. + */ +public final class UsagesListSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Usages_List.json + */ + /** + * Sample code: List usages. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listUsages(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.usages().list("westus", com.azure.core.util.Context.NONE); } } ``` diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml b/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml index b48996d53a6a..57c1d1ad9391 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml @@ -18,7 +18,7 @@ jar Microsoft Azure SDK for ContainerAppsApi Management - This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2023-05. + This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions extension resource. Package tag package-preview-2024-02. https://github.com/Azure/azure-sdk-for-java @@ -88,8 +88,6 @@ 4.11.0 test - - net.bytebuddy byte-buddy 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 a9b1dd45c81e..31ef26a444d1 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 @@ -24,8 +24,13 @@ import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsApiClient; +import com.azure.resourcemanager.appcontainers.implementation.AppResilienciesImpl; import com.azure.resourcemanager.appcontainers.implementation.AvailableWorkloadProfilesImpl; import com.azure.resourcemanager.appcontainers.implementation.BillingMetersImpl; +import com.azure.resourcemanager.appcontainers.implementation.BuildAuthTokensImpl; +import com.azure.resourcemanager.appcontainers.implementation.BuildersImpl; +import com.azure.resourcemanager.appcontainers.implementation.BuildsByBuilderResourcesImpl; +import com.azure.resourcemanager.appcontainers.implementation.BuildsImpl; import com.azure.resourcemanager.appcontainers.implementation.CertificatesImpl; import com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsCertificatesImpl; import com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsDaprComponentsImpl; @@ -38,19 +43,31 @@ import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionReplicasImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionsImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsSourceControlsImpl; +import com.azure.resourcemanager.appcontainers.implementation.DaprComponentResiliencyPoliciesImpl; import com.azure.resourcemanager.appcontainers.implementation.DaprComponentsImpl; +import com.azure.resourcemanager.appcontainers.implementation.DaprSubscriptionsImpl; +import com.azure.resourcemanager.appcontainers.implementation.DotNetComponentsImpl; +import com.azure.resourcemanager.appcontainers.implementation.FunctionsExtensionsImpl; +import com.azure.resourcemanager.appcontainers.implementation.JavaComponentsImpl; import com.azure.resourcemanager.appcontainers.implementation.JobsExecutionsImpl; import com.azure.resourcemanager.appcontainers.implementation.JobsImpl; import com.azure.resourcemanager.appcontainers.implementation.ManagedCertificatesImpl; import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentDiagnosticsImpl; +import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentUsagesImpl; import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsDiagnosticsImpl; import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsImpl; import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsStoragesImpl; import com.azure.resourcemanager.appcontainers.implementation.NamespacesImpl; import com.azure.resourcemanager.appcontainers.implementation.OperationsImpl; import com.azure.resourcemanager.appcontainers.implementation.ResourceProvidersImpl; +import com.azure.resourcemanager.appcontainers.implementation.UsagesImpl; +import com.azure.resourcemanager.appcontainers.models.AppResiliencies; import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfiles; import com.azure.resourcemanager.appcontainers.models.BillingMeters; +import com.azure.resourcemanager.appcontainers.models.BuildAuthTokens; +import com.azure.resourcemanager.appcontainers.models.Builders; +import com.azure.resourcemanager.appcontainers.models.Builds; +import com.azure.resourcemanager.appcontainers.models.BuildsByBuilderResources; import com.azure.resourcemanager.appcontainers.models.Certificates; import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironments; import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsCertificates; @@ -62,17 +79,24 @@ import com.azure.resourcemanager.appcontainers.models.ContainerAppsRevisionReplicas; import com.azure.resourcemanager.appcontainers.models.ContainerAppsRevisions; import com.azure.resourcemanager.appcontainers.models.ContainerAppsSourceControls; +import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicies; import com.azure.resourcemanager.appcontainers.models.DaprComponents; +import com.azure.resourcemanager.appcontainers.models.DaprSubscriptions; +import com.azure.resourcemanager.appcontainers.models.DotNetComponents; +import com.azure.resourcemanager.appcontainers.models.FunctionsExtensions; +import com.azure.resourcemanager.appcontainers.models.JavaComponents; import com.azure.resourcemanager.appcontainers.models.Jobs; import com.azure.resourcemanager.appcontainers.models.JobsExecutions; import com.azure.resourcemanager.appcontainers.models.ManagedCertificates; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentDiagnostics; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentUsages; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironments; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentsDiagnostics; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentsStorages; import com.azure.resourcemanager.appcontainers.models.Namespaces; import com.azure.resourcemanager.appcontainers.models.Operations; import com.azure.resourcemanager.appcontainers.models.ResourceProviders; +import com.azure.resourcemanager.appcontainers.models.Usages; import java.time.Duration; import java.time.temporal.ChronoUnit; import java.util.ArrayList; @@ -80,14 +104,29 @@ import java.util.Objects; import java.util.stream.Collectors; -/** Entry point to ContainerAppsApiManager. */ +/** + * Entry point to ContainerAppsApiManager. + * Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the + * function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions + * extension resource. + */ public final class ContainerAppsApiManager { + private AppResiliencies appResiliencies; + private ContainerAppsAuthConfigs containerAppsAuthConfigs; private AvailableWorkloadProfiles availableWorkloadProfiles; private BillingMeters billingMeters; + private Builders builders; + + private BuildsByBuilderResources buildsByBuilderResources; + + private Builds builds; + + private BuildAuthTokens buildAuthTokens; + private ConnectedEnvironments connectedEnvironments; private ConnectedEnvironmentsCertificates connectedEnvironmentsCertificates; @@ -108,9 +147,13 @@ public final class ContainerAppsApiManager { private ManagedEnvironmentsDiagnostics managedEnvironmentsDiagnostics; + private Jobs jobs; + + private DotNetComponents dotNetComponents; + private Operations operations; - private Jobs jobs; + private JavaComponents javaComponents; private JobsExecutions jobsExecutions; @@ -124,29 +167,35 @@ public final class ContainerAppsApiManager { private Namespaces namespaces; + private DaprComponentResiliencyPolicies daprComponentResiliencyPolicies; + private DaprComponents daprComponents; + private DaprSubscriptions daprSubscriptions; + private ManagedEnvironmentsStorages managedEnvironmentsStorages; private ContainerAppsSourceControls containerAppsSourceControls; + private Usages usages; + + private ManagedEnvironmentUsages managedEnvironmentUsages; + + private FunctionsExtensions functionsExtensions; + private final ContainerAppsApiClient clientObject; private ContainerAppsApiManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { Objects.requireNonNull(httpPipeline, "'httpPipeline' cannot be null."); Objects.requireNonNull(profile, "'profile' cannot be null."); - this.clientObject = - new ContainerAppsApiClientBuilder() - .pipeline(httpPipeline) - .endpoint(profile.getEnvironment().getResourceManagerEndpoint()) - .subscriptionId(profile.getSubscriptionId()) - .defaultPollInterval(defaultPollInterval) - .buildClient(); + this.clientObject = new ContainerAppsApiClientBuilder().pipeline(httpPipeline) + .endpoint(profile.getEnvironment().getResourceManagerEndpoint()).subscriptionId(profile.getSubscriptionId()) + .defaultPollInterval(defaultPollInterval).buildClient(); } /** * Creates an instance of ContainerAppsApi service API entry point. - * + * * @param credential the credential to use. * @param profile the Azure profile for client. * @return the ContainerAppsApi service API instance. @@ -159,7 +208,7 @@ public static ContainerAppsApiManager authenticate(TokenCredential credential, A /** * Creates an instance of ContainerAppsApi service API entry point. - * + * * @param httpPipeline the {@link HttpPipeline} configured with Azure authentication credential. * @param profile the Azure profile for client. * @return the ContainerAppsApi service API instance. @@ -172,14 +221,16 @@ public static ContainerAppsApiManager authenticate(HttpPipeline httpPipeline, Az /** * Gets a Configurable instance that can be used to create ContainerAppsApiManager with optional configuration. - * + * * @return the Configurable instance allowing configurations. */ public static Configurable configure() { return new ContainerAppsApiManager.Configurable(); } - /** The Configurable allowing configurations to be set. */ + /** + * The Configurable allowing configurations to be set. + */ public static final class Configurable { private static final ClientLogger LOGGER = new ClientLogger(Configurable.class); @@ -251,8 +302,8 @@ public Configurable withRetryPolicy(RetryPolicy retryPolicy) { /** * Sets the retry options for the HTTP pipeline retry policy. - * - *

This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. + *

+ * This setting has no effect, if retry policy is set via {@link #withRetryPolicy(RetryPolicy)}. * * @param retryOptions the retry options for the HTTP pipeline retry policy. * @return the configurable object itself. @@ -269,8 +320,8 @@ public Configurable withRetryOptions(RetryOptions retryOptions) { * @return the configurable object itself. */ public Configurable withDefaultPollInterval(Duration defaultPollInterval) { - this.defaultPollInterval = - Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); + this.defaultPollInterval + = Objects.requireNonNull(defaultPollInterval, "'defaultPollInterval' cannot be null."); if (this.defaultPollInterval.isNegative()) { throw LOGGER .logExceptionAsError(new IllegalArgumentException("'defaultPollInterval' cannot be negative")); @@ -290,21 +341,12 @@ public ContainerAppsApiManager authenticate(TokenCredential credential, AzurePro Objects.requireNonNull(profile, "'profile' cannot be null."); StringBuilder userAgentBuilder = new StringBuilder(); - userAgentBuilder - .append("azsdk-java") - .append("-") - .append("com.azure.resourcemanager.appcontainers") - .append("/") - .append("1.0.0-beta.6"); + userAgentBuilder.append("azsdk-java").append("-").append("com.azure.resourcemanager.appcontainers") + .append("/").append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { - userAgentBuilder - .append(" (") - .append(Configuration.getGlobalConfiguration().get("java.version")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.name")) - .append("; ") - .append(Configuration.getGlobalConfiguration().get("os.version")) - .append("; auto-generated)"); + userAgentBuilder.append(" (").append(Configuration.getGlobalConfiguration().get("java.version")) + .append("; ").append(Configuration.getGlobalConfiguration().get("os.name")).append("; ") + .append(Configuration.getGlobalConfiguration().get("os.version")).append("; auto-generated)"); } else { userAgentBuilder.append(" (auto-generated)"); } @@ -323,64 +365,63 @@ public ContainerAppsApiManager authenticate(TokenCredential credential, AzurePro policies.add(new UserAgentPolicy(userAgentBuilder.toString())); policies.add(new AddHeadersFromContextPolicy()); policies.add(new RequestIdPolicy()); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL) + .collect(Collectors.toList())); HttpPolicyProviders.addBeforeRetryPolicies(policies); policies.add(retryPolicy); policies.add(new AddDatePolicy()); policies.add(new ArmChallengeAuthenticationPolicy(credential, scopes.toArray(new String[0]))); - policies - .addAll( - this - .policies - .stream() - .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY) - .collect(Collectors.toList())); + policies.addAll(this.policies.stream() + .filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY).collect(Collectors.toList())); HttpPolicyProviders.addAfterRetryPolicies(policies); policies.add(new HttpLoggingPolicy(httpLogOptions)); - HttpPipeline httpPipeline = - new HttpPipelineBuilder() - .httpClient(httpClient) - .policies(policies.toArray(new HttpPipelinePolicy[0])) - .build(); + HttpPipeline httpPipeline = new HttpPipelineBuilder().httpClient(httpClient) + .policies(policies.toArray(new HttpPipelinePolicy[0])).build(); return new ContainerAppsApiManager(httpPipeline, profile, defaultPollInterval); } } + /** + * Gets the resource collection API of AppResiliencies. It manages AppResiliency. + * + * @return Resource collection API of AppResiliencies. + */ + public AppResiliencies appResiliencies() { + if (this.appResiliencies == null) { + this.appResiliencies = new AppResilienciesImpl(clientObject.getAppResiliencies(), this); + } + return appResiliencies; + } + /** * Gets the resource collection API of ContainerAppsAuthConfigs. It manages AuthConfig. - * + * * @return Resource collection API of ContainerAppsAuthConfigs. */ public ContainerAppsAuthConfigs containerAppsAuthConfigs() { if (this.containerAppsAuthConfigs == null) { - this.containerAppsAuthConfigs = - new ContainerAppsAuthConfigsImpl(clientObject.getContainerAppsAuthConfigs(), this); + this.containerAppsAuthConfigs + = new ContainerAppsAuthConfigsImpl(clientObject.getContainerAppsAuthConfigs(), this); } 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); + 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() { @@ -390,9 +431,58 @@ public BillingMeters billingMeters() { return billingMeters; } + /** + * Gets the resource collection API of Builders. It manages BuilderResource. + * + * @return Resource collection API of Builders. + */ + public Builders builders() { + if (this.builders == null) { + this.builders = new BuildersImpl(clientObject.getBuilders(), this); + } + return builders; + } + + /** + * Gets the resource collection API of BuildsByBuilderResources. + * + * @return Resource collection API of BuildsByBuilderResources. + */ + public BuildsByBuilderResources buildsByBuilderResources() { + if (this.buildsByBuilderResources == null) { + this.buildsByBuilderResources + = new BuildsByBuilderResourcesImpl(clientObject.getBuildsByBuilderResources(), this); + } + return buildsByBuilderResources; + } + + /** + * Gets the resource collection API of Builds. It manages BuildResource. + * + * @return Resource collection API of Builds. + */ + public Builds builds() { + if (this.builds == null) { + this.builds = new BuildsImpl(clientObject.getBuilds(), this); + } + return builds; + } + + /** + * Gets the resource collection API of BuildAuthTokens. + * + * @return Resource collection API of BuildAuthTokens. + */ + public BuildAuthTokens buildAuthTokens() { + if (this.buildAuthTokens == null) { + this.buildAuthTokens = new BuildAuthTokensImpl(clientObject.getBuildAuthTokens(), this); + } + return buildAuthTokens; + } + /** * Gets the resource collection API of ConnectedEnvironments. It manages ConnectedEnvironment. - * + * * @return Resource collection API of ConnectedEnvironments. */ public ConnectedEnvironments connectedEnvironments() { @@ -404,47 +494,46 @@ public ConnectedEnvironments 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); + 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); + 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); + this.connectedEnvironmentsStorages + = new ConnectedEnvironmentsStoragesImpl(clientObject.getConnectedEnvironmentsStorages(), this); } return connectedEnvironmentsStorages; } /** * Gets the resource collection API of ContainerApps. It manages ContainerApp. - * + * * @return Resource collection API of ContainerApps. */ public ContainerApps containerApps() { @@ -456,72 +545,96 @@ public ContainerApps containerApps() { /** * Gets the resource collection API of ContainerAppsRevisions. - * + * * @return Resource collection API of ContainerAppsRevisions. */ public ContainerAppsRevisions containerAppsRevisions() { if (this.containerAppsRevisions == null) { - this.containerAppsRevisions = - new ContainerAppsRevisionsImpl(clientObject.getContainerAppsRevisions(), this); + this.containerAppsRevisions + = new ContainerAppsRevisionsImpl(clientObject.getContainerAppsRevisions(), this); } return containerAppsRevisions; } /** * Gets the resource collection API of ContainerAppsRevisionReplicas. - * + * * @return Resource collection API of ContainerAppsRevisionReplicas. */ public ContainerAppsRevisionReplicas containerAppsRevisionReplicas() { if (this.containerAppsRevisionReplicas == null) { - this.containerAppsRevisionReplicas = - new ContainerAppsRevisionReplicasImpl(clientObject.getContainerAppsRevisionReplicas(), this); + this.containerAppsRevisionReplicas + = new ContainerAppsRevisionReplicasImpl(clientObject.getContainerAppsRevisionReplicas(), this); } return containerAppsRevisionReplicas; } /** * Gets the resource collection API of ContainerAppsDiagnostics. - * + * * @return Resource collection API of ContainerAppsDiagnostics. */ public ContainerAppsDiagnostics containerAppsDiagnostics() { if (this.containerAppsDiagnostics == null) { - this.containerAppsDiagnostics = - new ContainerAppsDiagnosticsImpl(clientObject.getContainerAppsDiagnostics(), this); + this.containerAppsDiagnostics + = new ContainerAppsDiagnosticsImpl(clientObject.getContainerAppsDiagnostics(), this); } return containerAppsDiagnostics; } /** * Gets the resource collection API of ManagedEnvironmentDiagnostics. - * + * * @return Resource collection API of ManagedEnvironmentDiagnostics. */ public ManagedEnvironmentDiagnostics managedEnvironmentDiagnostics() { if (this.managedEnvironmentDiagnostics == null) { - this.managedEnvironmentDiagnostics = - new ManagedEnvironmentDiagnosticsImpl(clientObject.getManagedEnvironmentDiagnostics(), this); + this.managedEnvironmentDiagnostics + = new ManagedEnvironmentDiagnosticsImpl(clientObject.getManagedEnvironmentDiagnostics(), this); } return managedEnvironmentDiagnostics; } /** * Gets the resource collection API of ManagedEnvironmentsDiagnostics. - * + * * @return Resource collection API of ManagedEnvironmentsDiagnostics. */ public ManagedEnvironmentsDiagnostics managedEnvironmentsDiagnostics() { if (this.managedEnvironmentsDiagnostics == null) { - this.managedEnvironmentsDiagnostics = - new ManagedEnvironmentsDiagnosticsImpl(clientObject.getManagedEnvironmentsDiagnostics(), this); + this.managedEnvironmentsDiagnostics + = new ManagedEnvironmentsDiagnosticsImpl(clientObject.getManagedEnvironmentsDiagnostics(), this); } return managedEnvironmentsDiagnostics; } + /** + * Gets the resource collection API of Jobs. It manages Job. + * + * @return Resource collection API of Jobs. + */ + public Jobs jobs() { + if (this.jobs == null) { + this.jobs = new JobsImpl(clientObject.getJobs(), this); + } + return jobs; + } + + /** + * Gets the resource collection API of DotNetComponents. It manages DotNetComponent. + * + * @return Resource collection API of DotNetComponents. + */ + public DotNetComponents dotNetComponents() { + if (this.dotNetComponents == null) { + this.dotNetComponents = new DotNetComponentsImpl(clientObject.getDotNetComponents(), this); + } + return dotNetComponents; + } + /** * Gets the resource collection API of Operations. - * + * * @return Resource collection API of Operations. */ public Operations operations() { @@ -532,20 +645,20 @@ public Operations operations() { } /** - * Gets the resource collection API of Jobs. It manages Job. - * - * @return Resource collection API of Jobs. + * Gets the resource collection API of JavaComponents. It manages JavaComponent. + * + * @return Resource collection API of JavaComponents. */ - public Jobs jobs() { - if (this.jobs == null) { - this.jobs = new JobsImpl(clientObject.getJobs(), this); + public JavaComponents javaComponents() { + if (this.javaComponents == null) { + this.javaComponents = new JavaComponentsImpl(clientObject.getJavaComponents(), this); } - return jobs; + return javaComponents; } /** * Gets the resource collection API of JobsExecutions. - * + * * @return Resource collection API of JobsExecutions. */ public JobsExecutions jobsExecutions() { @@ -557,7 +670,7 @@ public JobsExecutions jobsExecutions() { /** * Gets the resource collection API of ResourceProviders. - * + * * @return Resource collection API of ResourceProviders. */ public ResourceProviders resourceProviders() { @@ -569,7 +682,7 @@ public ResourceProviders resourceProviders() { /** * Gets the resource collection API of ManagedEnvironments. It manages ManagedEnvironment. - * + * * @return Resource collection API of ManagedEnvironments. */ public ManagedEnvironments managedEnvironments() { @@ -581,7 +694,7 @@ public ManagedEnvironments managedEnvironments() { /** * Gets the resource collection API of Certificates. - * + * * @return Resource collection API of Certificates. */ public Certificates certificates() { @@ -593,7 +706,7 @@ public Certificates certificates() { /** * Gets the resource collection API of ManagedCertificates. It manages ManagedCertificate. - * + * * @return Resource collection API of ManagedCertificates. */ public ManagedCertificates managedCertificates() { @@ -605,7 +718,7 @@ public ManagedCertificates managedCertificates() { /** * Gets the resource collection API of Namespaces. - * + * * @return Resource collection API of Namespaces. */ public Namespaces namespaces() { @@ -615,9 +728,22 @@ public Namespaces namespaces() { return namespaces; } + /** + * Gets the resource collection API of DaprComponentResiliencyPolicies. It manages DaprComponentResiliencyPolicy. + * + * @return Resource collection API of DaprComponentResiliencyPolicies. + */ + public DaprComponentResiliencyPolicies daprComponentResiliencyPolicies() { + if (this.daprComponentResiliencyPolicies == null) { + this.daprComponentResiliencyPolicies + = new DaprComponentResiliencyPoliciesImpl(clientObject.getDaprComponentResiliencyPolicies(), this); + } + return daprComponentResiliencyPolicies; + } + /** * Gets the resource collection API of DaprComponents. - * + * * @return Resource collection API of DaprComponents. */ public DaprComponents daprComponents() { @@ -627,36 +753,85 @@ public DaprComponents daprComponents() { return daprComponents; } + /** + * Gets the resource collection API of DaprSubscriptions. It manages DaprSubscription. + * + * @return Resource collection API of DaprSubscriptions. + */ + public DaprSubscriptions daprSubscriptions() { + if (this.daprSubscriptions == null) { + this.daprSubscriptions = new DaprSubscriptionsImpl(clientObject.getDaprSubscriptions(), this); + } + return daprSubscriptions; + } + /** * Gets the resource collection API of ManagedEnvironmentsStorages. It manages ManagedEnvironmentStorage. - * + * * @return Resource collection API of ManagedEnvironmentsStorages. */ public ManagedEnvironmentsStorages managedEnvironmentsStorages() { if (this.managedEnvironmentsStorages == null) { - this.managedEnvironmentsStorages = - new ManagedEnvironmentsStoragesImpl(clientObject.getManagedEnvironmentsStorages(), this); + this.managedEnvironmentsStorages + = new ManagedEnvironmentsStoragesImpl(clientObject.getManagedEnvironmentsStorages(), this); } return managedEnvironmentsStorages; } /** * Gets the resource collection API of ContainerAppsSourceControls. It manages SourceControl. - * + * * @return Resource collection API of ContainerAppsSourceControls. */ public ContainerAppsSourceControls containerAppsSourceControls() { if (this.containerAppsSourceControls == null) { - this.containerAppsSourceControls = - new ContainerAppsSourceControlsImpl(clientObject.getContainerAppsSourceControls(), this); + this.containerAppsSourceControls + = new ContainerAppsSourceControlsImpl(clientObject.getContainerAppsSourceControls(), this); } return containerAppsSourceControls; } + /** + * Gets the resource collection API of Usages. + * + * @return Resource collection API of Usages. + */ + public Usages usages() { + if (this.usages == null) { + this.usages = new UsagesImpl(clientObject.getUsages(), this); + } + return usages; + } + + /** + * Gets the resource collection API of ManagedEnvironmentUsages. + * + * @return Resource collection API of ManagedEnvironmentUsages. + */ + public ManagedEnvironmentUsages managedEnvironmentUsages() { + if (this.managedEnvironmentUsages == null) { + this.managedEnvironmentUsages + = new ManagedEnvironmentUsagesImpl(clientObject.getManagedEnvironmentUsages(), this); + } + return managedEnvironmentUsages; + } + + /** + * Gets the resource collection API of FunctionsExtensions. + * + * @return Resource collection API of FunctionsExtensions. + */ + public FunctionsExtensions functionsExtensions() { + if (this.functionsExtensions == null) { + this.functionsExtensions = new FunctionsExtensionsImpl(clientObject.getFunctionsExtensions(), this); + } + return functionsExtensions; + } + /** * Gets wrapped service client ContainerAppsApiClient providing direct access to the underlying auto-generated API * implementation, based on Azure REST API. - * + * * @return Wrapped service client ContainerAppsApiClient. */ public ContainerAppsApiClient serviceClient() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/AppResilienciesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/AppResilienciesClient.java new file mode 100644 index 000000000000..1a40d6420997 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/AppResilienciesClient.java @@ -0,0 +1,198 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.AppResiliencyInner; + +/** + * An instance of this class provides access to all the operations defined in AppResilienciesClient. + */ +public interface AppResilienciesClient { + /** + * Create or update an application's resiliency policy. + * + * Create or update container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param resiliencyEnvelope The resiliency policy to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration to setup App Resiliency along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String resourceGroupName, String appName, String name, + AppResiliencyInner resiliencyEnvelope, Context context); + + /** + * Create or update an application's resiliency policy. + * + * Create or update container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param resiliencyEnvelope The resiliency policy to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration to setup App Resiliency. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AppResiliencyInner createOrUpdate(String resourceGroupName, String appName, String name, + AppResiliencyInner resiliencyEnvelope); + + /** + * Update an application's resiliency policy. + * + * Update container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param resiliencyEnvelope The resiliency policy to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration to setup App Resiliency along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse(String resourceGroupName, String appName, String name, + AppResiliencyInner resiliencyEnvelope, Context context); + + /** + * Update an application's resiliency policy. + * + * Update container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param resiliencyEnvelope The resiliency policy to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration to setup App Resiliency. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AppResiliencyInner update(String resourceGroupName, String appName, String name, + AppResiliencyInner resiliencyEnvelope); + + /** + * Delete an application's resiliency policy. + * + * Delete container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String appName, String name, Context context); + + /** + * Delete an application's resiliency policy. + * + * Delete container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String appName, String name); + + /** + * Get an application's resiliency policy. + * + * Get container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container app resiliency policy along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String appName, String name, + Context context); + + /** + * Get an application's resiliency policy. + * + * Get container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container app resiliency policy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + AppResiliencyInner get(String resourceGroupName, String appName, String name); + + /** + * List an application's resiliency policies. + * + * List container app resiliency policies. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of AppResiliency policies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String appName); + + /** + * List an application's resiliency policies. + * + * List container app resiliency policies. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of AppResiliency policies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String appName, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/AvailableWorkloadProfilesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/AvailableWorkloadProfilesClient.java index 1c4ae5157f86..07b54b046db8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/AvailableWorkloadProfilesClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/AvailableWorkloadProfilesClient.java @@ -10,13 +10,15 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; -/** An instance of this class provides access to all the operations defined in AvailableWorkloadProfilesClient. */ +/** + * An instance of this class provides access to all the operations defined in AvailableWorkloadProfilesClient. + */ public interface AvailableWorkloadProfilesClient { /** * Get available workload profiles by location. - * - *

Get all available workload profiles for a location. - * + * + * Get all available workload profiles for a location. + * * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -28,9 +30,9 @@ public interface AvailableWorkloadProfilesClient { /** * Get available workload profiles by location. - * - *

Get all available workload profiles for a location. - * + * + * Get all available workload profiles for a location. + * * @param location The name of Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BillingMetersClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BillingMetersClient.java index b6877f2b5e11..114cdeccd72f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BillingMetersClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BillingMetersClient.java @@ -10,18 +10,20 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner; -/** An instance of this class provides access to all the operations defined in BillingMetersClient. */ +/** + * An instance of this class provides access to all the operations defined in BillingMetersClient. + */ public interface BillingMetersClient { /** * Get billing meters by location. - * - *

Get all billingMeters for a location. - * + * + * Get all billingMeters for a location. + * * @param location The name of Azure region. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all billingMeters for a location along with {@link Response}. */ @@ -30,13 +32,13 @@ public interface BillingMetersClient { /** * Get billing meters by location. - * - *

Get all billingMeters for a location. - * + * + * Get all billingMeters for a location. + * * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all billingMeters for a location. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildAuthTokensClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildAuthTokensClient.java new file mode 100644 index 000000000000..c794c5f7277a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildAuthTokensClient.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.BuildTokenInner; + +/** + * An instance of this class provides access to all the operations defined in BuildAuthTokensClient. + */ +public interface BuildAuthTokensClient { + /** + * Gets the token used to connect to the endpoint where source code can be uploaded for a build. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the token used to connect to the endpoint where source code can be uploaded for a build along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listWithResponse(String resourceGroupName, String builderName, String buildName, + Context context); + + /** + * Gets the token used to connect to the endpoint where source code can be uploaded for a build. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the token used to connect to the endpoint where source code can be uploaded for a build. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BuildTokenInner list(String resourceGroupName, String builderName, String buildName); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildersClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildersClient.java new file mode 100644 index 000000000000..65cd73fe23a4 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildersClient.java @@ -0,0 +1,270 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; +import com.azure.resourcemanager.appcontainers.models.BuilderResourceUpdate; + +/** + * An instance of this class provides access to all the operations defined in BuildersClient. + */ +public interface BuildersClient { + /** + * List BuilderResource resources by subscription ID. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(); + + /** + * List BuilderResource resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(Context context); + + /** + * List BuilderResource resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List BuilderResource resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuilderResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getByResourceGroupWithResponse(String resourceGroupName, String builderName, + Context context); + + /** + * Get a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuilderResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BuilderResourceInner getByResourceGroup(String resourceGroupName, String builderName); + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BuilderResourceInner> beginCreateOrUpdate(String resourceGroupName, + String builderName, BuilderResourceInner builderEnvelope); + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BuilderResourceInner> beginCreateOrUpdate(String resourceGroupName, + String builderName, BuilderResourceInner builderEnvelope, Context context); + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BuilderResourceInner createOrUpdate(String resourceGroupName, String builderName, + BuilderResourceInner builderEnvelope); + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BuilderResourceInner createOrUpdate(String resourceGroupName, String builderName, + BuilderResourceInner builderEnvelope, Context context); + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BuilderResourceInner> beginUpdate(String resourceGroupName, + String builderName, BuilderResourceUpdate builderEnvelope); + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BuilderResourceInner> beginUpdate(String resourceGroupName, + String builderName, BuilderResourceUpdate builderEnvelope, Context context); + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BuilderResourceInner update(String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope); + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BuilderResourceInner update(String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope, + Context context); + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String builderName); + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String builderName, Context context); + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String builderName); + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String builderName, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildsByBuilderResourcesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildsByBuilderResourcesClient.java new file mode 100644 index 000000000000..a957f2df2405 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildsByBuilderResourcesClient.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; + +/** + * An instance of this class provides access to all the operations defined in BuildsByBuilderResourcesClient. + */ +public interface BuildsByBuilderResourcesClient { + /** + * List BuildResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuildResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String builderName); + + /** + * List BuildResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuildResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String builderName, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildsClient.java new file mode 100644 index 000000000000..5cce1f950e18 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BuildsClient.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; + +/** + * An instance of this class provides access to all the operations defined in BuildsClient. + */ +public interface BuildsClient { + /** + * Get a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuildResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String builderName, String buildName, + Context context); + + /** + * Get a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuildResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BuildResourceInner get(String resourceGroupName, String builderName, String buildName); + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of information pertaining to an individual build. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BuildResourceInner> beginCreateOrUpdate(String resourceGroupName, + String builderName, String buildName, BuildResourceInner buildEnvelope); + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of information pertaining to an individual build. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, BuildResourceInner> beginCreateOrUpdate(String resourceGroupName, + String builderName, String buildName, BuildResourceInner buildEnvelope, Context context); + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information pertaining to an individual build. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BuildResourceInner createOrUpdate(String resourceGroupName, String builderName, String buildName, + BuildResourceInner buildEnvelope); + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information pertaining to an individual build. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BuildResourceInner createOrUpdate(String resourceGroupName, String builderName, String buildName, + BuildResourceInner buildEnvelope, Context context); + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String builderName, String buildName); + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String builderName, String buildName, + Context context); + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String builderName, String buildName); + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String builderName, String buildName, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/CertificatesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/CertificatesClient.java index 1e66f7dd0665..5963e2aaa823 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/CertificatesClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/CertificatesClient.java @@ -12,16 +12,18 @@ import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; import com.azure.resourcemanager.appcontainers.models.CertificatePatch; -/** An instance of this class provides access to all the operations defined in CertificatesClient. */ +/** + * An instance of this class provides access to all the operations defined in CertificatesClient. + */ public interface CertificatesClient { /** * Get the Certificates in a given managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Certificates in a given managed environment as paginated response with {@link PagedIterable}. */ @@ -30,13 +32,13 @@ public interface CertificatesClient { /** * Get the Certificates in a given managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Certificates in a given managed environment as paginated response with {@link PagedIterable}. */ @@ -45,30 +47,30 @@ public interface CertificatesClient { /** * Get the specified 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 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. + * 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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String environmentName, String certificateName, Context context); + Response getWithResponse(String resourceGroupName, String environmentName, String certificateName, + Context context); /** * Get the specified 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specified Certificate. */ @@ -77,7 +79,7 @@ Response getWithResponse( /** * 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. @@ -85,28 +87,24 @@ Response getWithResponse( * @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. + * 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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String environmentName, - String certificateName, - CertificateInner certificateEnvelope, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String environmentName, + String certificateName, CertificateInner certificateEnvelope, Context context); /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * 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. */ @@ -115,30 +113,30 @@ Response createOrUpdateWithResponse( /** * Deletes the specified 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 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String environmentName, String certificateName, Context context); + Response deleteWithResponse(String resourceGroupName, String environmentName, String certificateName, + Context context); /** * Deletes the specified 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -146,9 +144,9 @@ Response deleteWithResponse( /** * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * + * + * 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. @@ -156,35 +154,31 @@ Response deleteWithResponse( * @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. + * 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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String environmentName, - String certificateName, - CertificatePatch certificateEnvelope, - Context context); + Response updateWithResponse(String resourceGroupName, String environmentName, + String certificateName, CertificatePatch certificateEnvelope, Context context); /** * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * + * + * 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. + * 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - CertificateInner update( - String resourceGroupName, String environmentName, String certificateName, CertificatePatch certificateEnvelope); + CertificateInner update(String resourceGroupName, String environmentName, String certificateName, + CertificatePatch certificateEnvelope); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsCertificatesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsCertificatesClient.java index 3924eac328c3..b40e6779b501 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsCertificatesClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsCertificatesClient.java @@ -18,12 +18,12 @@ public interface ConnectedEnvironmentsCertificatesClient { /** * Get the Certificates in a given connected environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Connected Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Certificates in a given connected environment as paginated response with {@link PagedIterable}. */ @@ -32,13 +32,13 @@ public interface ConnectedEnvironmentsCertificatesClient { /** * Get the Certificates in a given connected environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Connected 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Certificates in a given connected environment as paginated response with {@link PagedIterable}. */ @@ -47,30 +47,30 @@ public interface ConnectedEnvironmentsCertificatesClient { /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * 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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context); + Response getWithResponse(String resourceGroupName, String connectedEnvironmentName, + String certificateName, Context context); /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specified Certificate. */ @@ -79,7 +79,7 @@ Response getWithResponse( /** * Create or Update a 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. @@ -87,28 +87,24 @@ Response getWithResponse( * @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. + * 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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificateInner certificateEnvelope, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String connectedEnvironmentName, + String certificateName, CertificateInner certificateEnvelope, Context context); /** * Create or Update a 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * 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. */ @@ -117,30 +113,30 @@ Response createOrUpdateWithResponse( /** * 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 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context); + Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, String certificateName, + Context context); /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -148,9 +144,9 @@ Response deleteWithResponse( /** * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * + * + * Patches a certificate. Currently only patching of tags is supported. + * * @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. @@ -158,38 +154,31 @@ Response deleteWithResponse( * @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. + * 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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificatePatch certificateEnvelope, - Context context); + Response updateWithResponse(String resourceGroupName, String connectedEnvironmentName, + String certificateName, CertificatePatch certificateEnvelope, Context context); /** * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * + * + * Patches a certificate. Currently only patching of tags is supported. + * * @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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - CertificateInner update( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, + CertificateInner update(String resourceGroupName, String connectedEnvironmentName, String certificateName, CertificatePatch certificateEnvelope); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsClient.java index efa280c81bfa..bf40789c9771 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsClient.java @@ -15,13 +15,15 @@ import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner; import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -/** An instance of this class provides access to all the operations defined in ConnectedEnvironmentsClient. */ +/** + * An instance of this class provides access to all the operations defined in ConnectedEnvironmentsClient. + */ public interface ConnectedEnvironmentsClient { /** * Get all connectedEnvironments for a subscription. - * + * * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all connectedEnvironments for a subscription as paginated response with {@link PagedIterable}. */ @@ -30,11 +32,11 @@ public interface ConnectedEnvironmentsClient { /** * Get all connectedEnvironments for a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all connectedEnvironments for a subscription as paginated response with {@link PagedIterable}. */ @@ -43,11 +45,11 @@ public interface ConnectedEnvironmentsClient { /** * Get all connectedEnvironments in a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all connectedEnvironments in a resource group as paginated response with {@link PagedIterable}. */ @@ -56,12 +58,12 @@ public interface ConnectedEnvironmentsClient { /** * Get all connectedEnvironments in a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all connectedEnvironments in a resource group as paginated response with {@link PagedIterable}. */ @@ -70,28 +72,28 @@ public interface ConnectedEnvironmentsClient { /** * Get the properties of an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of an connectedEnvironment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String connectedEnvironmentName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, + String connectedEnvironmentName, Context context); /** * Get the properties of an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of an connectedEnvironment. */ @@ -100,16 +102,16 @@ Response getByResourceGroupWithResponse( /** * Creates or updates an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @param environmentEnvelope Configuration details of the connectedEnvironment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * 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 an environment for Kubernetes cluster specialized for web workloads - * by Azure App Service. + * by Azure App Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConnectedEnvironmentInner> beginCreateOrUpdate( @@ -117,69 +119,64 @@ SyncPoller, ConnectedEnvironmentInner> beg /** * Creates or updates an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @param environmentEnvelope Configuration details of the connectedEnvironment. * @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. + * 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 an environment for Kubernetes cluster specialized for web workloads - * by Azure App Service. + * by Azure App Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ConnectedEnvironmentInner> beginCreateOrUpdate( - String resourceGroupName, - String connectedEnvironmentName, - ConnectedEnvironmentInner environmentEnvelope, + String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope, Context context); /** * Creates or updates an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @param environmentEnvelope Configuration details of the connectedEnvironment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service. */ @ServiceMethod(returns = ReturnType.SINGLE) - ConnectedEnvironmentInner createOrUpdate( - String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope); + ConnectedEnvironmentInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, + ConnectedEnvironmentInner environmentEnvelope); /** * Creates or updates an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @param environmentEnvelope Configuration details of the connectedEnvironment. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service. */ @ServiceMethod(returns = ReturnType.SINGLE) - ConnectedEnvironmentInner createOrUpdate( - String resourceGroupName, - String connectedEnvironmentName, - ConnectedEnvironmentInner environmentEnvelope, - Context context); + ConnectedEnvironmentInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, + ConnectedEnvironmentInner environmentEnvelope, Context context); /** * Delete an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * 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. */ @@ -188,28 +185,28 @@ ConnectedEnvironmentInner createOrUpdate( /** * Delete an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String connectedEnvironmentName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String connectedEnvironmentName, + Context context); /** * Delete an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -217,13 +214,13 @@ SyncPoller, Void> beginDelete( /** * Delete an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -231,33 +228,33 @@ SyncPoller, Void> beginDelete( /** * Update connected Environment's properties. - * - *

Patches a Managed Environment. Only patching of tags is supported currently. - * + * + * Patches a Managed Environment. Only patching of tags is supported currently. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service along with - * {@link Response}. + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, String connectedEnvironmentName, Context context); + Response updateWithResponse(String resourceGroupName, String connectedEnvironmentName, + Context context); /** * Update connected Environment's properties. - * - *

Patches a Managed Environment. Only patching of tags is supported currently. - * + * + * Patches a Managed Environment. Only patching of tags is supported currently. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service. */ @@ -266,43 +263,38 @@ Response updateWithResponse( /** * Checks the resource connectedEnvironmentName availability. - * - *

Checks if resource connectedEnvironmentName is available. - * + * + * Checks if resource connectedEnvironmentName is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Managed Environment. * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the check availability result along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response checkNameAvailabilityWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest, - Context context); + Response checkNameAvailabilityWithResponse(String resourceGroupName, + String connectedEnvironmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context); /** * Checks the resource connectedEnvironmentName availability. - * - *

Checks if resource connectedEnvironmentName is available. - * + * + * Checks if resource connectedEnvironmentName is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Managed Environment. * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the check availability result. */ @ServiceMethod(returns = ReturnType.SINGLE) - CheckNameAvailabilityResponseInner checkNameAvailability( - String resourceGroupName, - String connectedEnvironmentName, + CheckNameAvailabilityResponseInner checkNameAvailability(String resourceGroupName, String connectedEnvironmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsDaprComponentsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsDaprComponentsClient.java index f137979cc9f8..b0839ec31463 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsDaprComponentsClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsDaprComponentsClient.java @@ -13,17 +13,18 @@ import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; /** - * An instance of this class provides access to all the operations defined in ConnectedEnvironmentsDaprComponentsClient. + * An instance of this class provides access to all the operations defined in + * ConnectedEnvironmentsDaprComponentsClient. */ public interface ConnectedEnvironmentsDaprComponentsClient { /** * Get the Dapr Components for a connected environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connected environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Dapr Components for a connected environment as paginated response with {@link PagedIterable}. */ @@ -32,13 +33,13 @@ public interface ConnectedEnvironmentsDaprComponentsClient { /** * Get the Dapr Components for a connected environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connected 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Dapr Components for a connected environment as paginated response with {@link PagedIterable}. */ @@ -47,30 +48,30 @@ public interface ConnectedEnvironmentsDaprComponentsClient { /** * 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 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. + * 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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); + Response getWithResponse(String resourceGroupName, String connectedEnvironmentName, + String componentName, Context context); /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a dapr component. */ @@ -79,9 +80,9 @@ Response getWithResponse( /** * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in a connected environment. - * + * + * Creates or updates a Dapr Component in 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. @@ -89,70 +90,63 @@ Response getWithResponse( * @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. + * 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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String componentName, - DaprComponentInner daprComponentEnvelope, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String connectedEnvironmentName, + String componentName, DaprComponentInner daprComponentEnvelope, Context context); /** * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in a connected environment. - * + * + * Creates or updates a Dapr Component in 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return dapr Component. */ @ServiceMethod(returns = ReturnType.SINGLE) - DaprComponentInner createOrUpdate( - String resourceGroupName, - String connectedEnvironmentName, - String componentName, + DaprComponentInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, String componentName, DaprComponentInner daprComponentEnvelope); /** * Delete a Dapr Component. - * - *

Delete a Dapr Component from 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 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); + Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, String componentName, + Context context); /** * Delete a Dapr Component. - * - *

Delete a Dapr Component from 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -160,34 +154,34 @@ Response deleteWithResponse( /** * 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. * @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. + * 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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listSecretsWithResponse( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); + Response listSecretsWithResponse(String resourceGroupName, + String connectedEnvironmentName, String componentName, Context context); /** * 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. * @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. + * 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. */ @ServiceMethod(returns = ReturnType.SINGLE) - DaprSecretsCollectionInner listSecrets( - String resourceGroupName, String connectedEnvironmentName, String componentName); + DaprSecretsCollectionInner listSecrets(String resourceGroupName, String connectedEnvironmentName, + String componentName); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsStoragesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsStoragesClient.java index 2718921f835d..877de407b477 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsStoragesClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsStoragesClient.java @@ -11,32 +11,34 @@ import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner; import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner; -/** An instance of this class provides access to all the operations defined in ConnectedEnvironmentsStoragesClient. */ +/** + * An instance of this class provides access to all the operations defined in ConnectedEnvironmentsStoragesClient. + */ public interface ConnectedEnvironmentsStoragesClient { /** * Get all storages for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all storages for a connectedEnvironment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse( - String resourceGroupName, String connectedEnvironmentName, Context context); + Response listWithResponse(String resourceGroupName, + String connectedEnvironmentName, Context context); /** * Get all storages for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all storages for a connectedEnvironment. */ @@ -45,30 +47,30 @@ Response listWithResponse( /** * Get storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return storage for a connectedEnvironment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String connectedEnvironmentName, String storageName, Context context); + Response getWithResponse(String resourceGroupName, + String connectedEnvironmentName, String storageName, Context context); /** * Get storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return storage for a connectedEnvironment. */ @@ -77,7 +79,7 @@ Response getWithResponse( /** * Create or update storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. @@ -85,64 +87,58 @@ Response getWithResponse( * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return storage resource for connectedEnvironment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String storageName, - ConnectedEnvironmentStorageInner storageEnvelope, + Response createOrUpdateWithResponse(String resourceGroupName, + String connectedEnvironmentName, String storageName, ConnectedEnvironmentStorageInner storageEnvelope, Context context); /** * Create or update storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. * @param storageEnvelope Configuration details of storage. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return storage resource for connectedEnvironment. */ @ServiceMethod(returns = ReturnType.SINGLE) - ConnectedEnvironmentStorageInner createOrUpdate( - String resourceGroupName, - String connectedEnvironmentName, - String storageName, - ConnectedEnvironmentStorageInner storageEnvelope); + ConnectedEnvironmentStorageInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, + String storageName, ConnectedEnvironmentStorageInner storageEnvelope); /** * Delete storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String connectedEnvironmentName, String storageName, Context context); + Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, String storageName, + Context context); /** * Delete storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) 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 03bef3cfa47b..aaa95b8aaea8 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 @@ -7,208 +7,294 @@ import com.azure.core.http.HttpPipeline; import java.time.Duration; -/** The interface for ContainerAppsApiClient class. */ +/** + * The interface for ContainerAppsApiClient class. + */ public interface ContainerAppsApiClient { /** - * Gets The ID of the target subscription. - * + * Gets The ID of the target subscription. The value must be an UUID. + * * @return the subscriptionId value. */ String getSubscriptionId(); /** * Gets server parameter. - * + * * @return the endpoint value. */ String getEndpoint(); /** * Gets Api Version. - * + * * @return the apiVersion value. */ String getApiVersion(); /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ HttpPipeline getHttpPipeline(); /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ Duration getDefaultPollInterval(); + /** + * Gets the AppResilienciesClient object to access its operations. + * + * @return the AppResilienciesClient object. + */ + AppResilienciesClient getAppResiliencies(); + /** * Gets the ContainerAppsAuthConfigsClient object to access its operations. - * + * * @return the ContainerAppsAuthConfigsClient object. */ 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 BuildersClient object to access its operations. + * + * @return the BuildersClient object. + */ + BuildersClient getBuilders(); + + /** + * Gets the BuildsByBuilderResourcesClient object to access its operations. + * + * @return the BuildsByBuilderResourcesClient object. + */ + BuildsByBuilderResourcesClient getBuildsByBuilderResources(); + + /** + * Gets the BuildsClient object to access its operations. + * + * @return the BuildsClient object. + */ + BuildsClient getBuilds(); + + /** + * Gets the BuildAuthTokensClient object to access its operations. + * + * @return the BuildAuthTokensClient object. + */ + BuildAuthTokensClient getBuildAuthTokens(); + /** * Gets the ConnectedEnvironmentsClient object to access its operations. - * + * * @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. - * + * * @return the ContainerAppsClient object. */ ContainerAppsClient getContainerApps(); /** * Gets the ContainerAppsRevisionsClient object to access its operations. - * + * * @return the ContainerAppsRevisionsClient object. */ ContainerAppsRevisionsClient getContainerAppsRevisions(); /** * Gets the ContainerAppsRevisionReplicasClient object to access its operations. - * + * * @return the ContainerAppsRevisionReplicasClient object. */ ContainerAppsRevisionReplicasClient getContainerAppsRevisionReplicas(); /** * Gets the ContainerAppsDiagnosticsClient object to access its operations. - * + * * @return the ContainerAppsDiagnosticsClient object. */ ContainerAppsDiagnosticsClient getContainerAppsDiagnostics(); /** * Gets the ManagedEnvironmentDiagnosticsClient object to access its operations. - * + * * @return the ManagedEnvironmentDiagnosticsClient object. */ ManagedEnvironmentDiagnosticsClient getManagedEnvironmentDiagnostics(); /** * Gets the ManagedEnvironmentsDiagnosticsClient object to access its operations. - * + * * @return the ManagedEnvironmentsDiagnosticsClient object. */ ManagedEnvironmentsDiagnosticsClient getManagedEnvironmentsDiagnostics(); + /** + * Gets the JobsClient object to access its operations. + * + * @return the JobsClient object. + */ + JobsClient getJobs(); + + /** + * Gets the DotNetComponentsClient object to access its operations. + * + * @return the DotNetComponentsClient object. + */ + DotNetComponentsClient getDotNetComponents(); + /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ OperationsClient getOperations(); /** - * Gets the JobsClient object to access its operations. - * - * @return the JobsClient object. + * Gets the JavaComponentsClient object to access its operations. + * + * @return the JavaComponentsClient object. */ - JobsClient getJobs(); + JavaComponentsClient getJavaComponents(); /** * Gets the JobsExecutionsClient object to access its operations. - * + * * @return the JobsExecutionsClient object. */ JobsExecutionsClient getJobsExecutions(); /** * Gets the ResourceProvidersClient object to access its operations. - * + * * @return the ResourceProvidersClient object. */ ResourceProvidersClient getResourceProviders(); /** * Gets the ManagedEnvironmentsClient object to access its operations. - * + * * @return the ManagedEnvironmentsClient object. */ ManagedEnvironmentsClient getManagedEnvironments(); /** * Gets the CertificatesClient object to access its operations. - * + * * @return the CertificatesClient object. */ CertificatesClient getCertificates(); /** * Gets the ManagedCertificatesClient object to access its operations. - * + * * @return the ManagedCertificatesClient object. */ ManagedCertificatesClient getManagedCertificates(); /** * Gets the NamespacesClient object to access its operations. - * + * * @return the NamespacesClient object. */ NamespacesClient getNamespaces(); + /** + * Gets the DaprComponentResiliencyPoliciesClient object to access its operations. + * + * @return the DaprComponentResiliencyPoliciesClient object. + */ + DaprComponentResiliencyPoliciesClient getDaprComponentResiliencyPolicies(); + /** * Gets the DaprComponentsClient object to access its operations. - * + * * @return the DaprComponentsClient object. */ DaprComponentsClient getDaprComponents(); + /** + * Gets the DaprSubscriptionsClient object to access its operations. + * + * @return the DaprSubscriptionsClient object. + */ + DaprSubscriptionsClient getDaprSubscriptions(); + /** * Gets the ManagedEnvironmentsStoragesClient object to access its operations. - * + * * @return the ManagedEnvironmentsStoragesClient object. */ ManagedEnvironmentsStoragesClient getManagedEnvironmentsStorages(); /** * Gets the ContainerAppsSourceControlsClient object to access its operations. - * + * * @return the ContainerAppsSourceControlsClient object. */ ContainerAppsSourceControlsClient getContainerAppsSourceControls(); + + /** + * Gets the UsagesClient object to access its operations. + * + * @return the UsagesClient object. + */ + UsagesClient getUsages(); + + /** + * Gets the ManagedEnvironmentUsagesClient object to access its operations. + * + * @return the ManagedEnvironmentUsagesClient object. + */ + ManagedEnvironmentUsagesClient getManagedEnvironmentUsages(); + + /** + * Gets the FunctionsExtensionsClient object to access its operations. + * + * @return the FunctionsExtensionsClient object. + */ + FunctionsExtensionsClient getFunctionsExtensions(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsAuthConfigsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsAuthConfigsClient.java index 9b742d9945c5..c28af17f98d3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsAuthConfigsClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsAuthConfigsClient.java @@ -11,16 +11,18 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner; -/** An instance of this class provides access to all the operations defined in ContainerAppsAuthConfigsClient. */ +/** + * An instance of this class provides access to all the operations defined in ContainerAppsAuthConfigsClient. + */ public interface ContainerAppsAuthConfigsClient { /** * Get the Container App AuthConfigs in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Container App AuthConfigs in a given resource group as paginated response with {@link PagedIterable}. */ @@ -29,46 +31,46 @@ public interface ContainerAppsAuthConfigsClient { /** * Get the Container App AuthConfigs in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Container App AuthConfigs in a given resource group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByContainerApp( - String resourceGroupName, String containerAppName, Context context); + PagedIterable listByContainerApp(String resourceGroupName, String containerAppName, + Context context); /** * Get a AuthConfig of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a AuthConfig of a Container App along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String containerAppName, String authConfigName, Context context); + Response getWithResponse(String resourceGroupName, String containerAppName, String authConfigName, + Context context); /** * Get a AuthConfig of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a AuthConfig of a Container App. */ @@ -77,7 +79,7 @@ Response getWithResponse( /** * Create or update the AuthConfig for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. @@ -85,62 +87,58 @@ Response getWithResponse( * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return configuration settings for the Azure ContainerApp Service Authentication / Authorization feature along - * with {@link Response}. + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String containerAppName, - String authConfigName, - AuthConfigInner authConfigEnvelope, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String containerAppName, + String authConfigName, AuthConfigInner authConfigEnvelope, Context context); /** * Create or update the AuthConfig for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. * @param authConfigEnvelope Properties used to create a Container App AuthConfig. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return configuration settings for the Azure ContainerApp Service Authentication / Authorization feature. */ @ServiceMethod(returns = ReturnType.SINGLE) - AuthConfigInner createOrUpdate( - String resourceGroupName, String containerAppName, String authConfigName, AuthConfigInner authConfigEnvelope); + AuthConfigInner createOrUpdate(String resourceGroupName, String containerAppName, String authConfigName, + AuthConfigInner authConfigEnvelope); /** * Delete a Container App AuthConfig. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String containerAppName, String authConfigName, Context context); + Response deleteWithResponse(String resourceGroupName, String containerAppName, String authConfigName, + Context context); /** * Delete a Container App AuthConfig. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) 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 42624e5ff627..88af33e45a93 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 @@ -16,13 +16,15 @@ import com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner; import com.azure.resourcemanager.appcontainers.fluent.models.SecretsCollectionInner; -/** An instance of this class provides access to all the operations defined in ContainerAppsClient. */ +/** + * An instance of this class provides access to all the operations defined in ContainerAppsClient. + */ public interface ContainerAppsClient { /** * Get the Container Apps in a given subscription. - * + * * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Container Apps in a given subscription as paginated response with {@link PagedIterable}. */ @@ -31,11 +33,11 @@ public interface ContainerAppsClient { /** * Get the Container Apps in a given subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Container Apps in a given subscription as paginated response with {@link PagedIterable}. */ @@ -44,11 +46,11 @@ public interface ContainerAppsClient { /** * Get the Container Apps in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Container Apps in a given resource group as paginated response with {@link PagedIterable}. */ @@ -57,12 +59,12 @@ public interface ContainerAppsClient { /** * Get the Container Apps in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Container Apps in a given resource group as paginated response with {@link PagedIterable}. */ @@ -71,32 +73,32 @@ public interface ContainerAppsClient { /** * Get the properties of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Container App along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String containerAppName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String containerAppName, + Context context); /** * Get the properties of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Container App. */ @@ -105,78 +107,78 @@ Response getByResourceGroupWithResponse( /** * Create or update a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param containerAppEnvelope Properties used to create a container app. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContainerAppInner> beginCreateOrUpdate( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope); + SyncPoller, ContainerAppInner> beginCreateOrUpdate(String resourceGroupName, + String containerAppName, ContainerAppInner containerAppEnvelope); /** * Create or update a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param containerAppEnvelope Properties used to create a container app. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContainerAppInner> beginCreateOrUpdate( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context); + SyncPoller, ContainerAppInner> beginCreateOrUpdate(String resourceGroupName, + String containerAppName, ContainerAppInner containerAppEnvelope, Context context); /** * Create or update a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param containerAppEnvelope Properties used to create a container app. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App. */ @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppInner createOrUpdate( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope); + ContainerAppInner createOrUpdate(String resourceGroupName, String containerAppName, + ContainerAppInner containerAppEnvelope); /** * Create or update a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param containerAppEnvelope Properties used to create a container app. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App. */ @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppInner createOrUpdate( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context); + ContainerAppInner createOrUpdate(String resourceGroupName, String containerAppName, + ContainerAppInner containerAppEnvelope, Context context); /** * Delete a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * 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. */ @@ -185,13 +187,13 @@ ContainerAppInner createOrUpdate( /** * Delete a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * 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. */ @@ -200,12 +202,12 @@ ContainerAppInner createOrUpdate( /** * Delete a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -213,13 +215,13 @@ ContainerAppInner createOrUpdate( /** * Delete a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -227,52 +229,52 @@ ContainerAppInner createOrUpdate( /** * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * + * + * 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContainerAppInner> beginUpdate( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope); + SyncPoller, ContainerAppInner> beginUpdate(String resourceGroupName, + String containerAppName, ContainerAppInner containerAppEnvelope); /** * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * + * + * 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContainerAppInner> beginUpdate( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context); + SyncPoller, ContainerAppInner> beginUpdate(String resourceGroupName, + String containerAppName, ContainerAppInner containerAppEnvelope, Context context); /** * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * + * + * 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App. */ @@ -281,48 +283,48 @@ SyncPoller, ContainerAppInner> beginUpdate( /** * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * + * + * 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App. */ @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppInner update( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context); + ContainerAppInner update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, + Context context); /** * Analyzes a custom hostname for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param customHostname Custom hostname. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return custom domain analysis along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listCustomHostnameAnalysisWithResponse( - String resourceGroupName, String containerAppName, String customHostname, Context context); + Response listCustomHostnameAnalysisWithResponse(String resourceGroupName, + String containerAppName, String customHostname, Context context); /** * Analyzes a custom hostname for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return custom domain analysis. */ @@ -331,28 +333,28 @@ Response listCustomHostnameAnalysisWithRespon /** * List secrets for a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App Secrets Collection ARM resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listSecretsWithResponse( - String resourceGroupName, String containerAppName, Context context); + Response listSecretsWithResponse(String resourceGroupName, String containerAppName, + Context context); /** * List secrets for a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App Secrets Collection ARM resource. */ @@ -361,32 +363,32 @@ Response listSecretsWithResponse( /** * Get auth token for a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param 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. + * is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return auth token for a container app along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getAuthTokenWithResponse( - String resourceGroupName, String containerAppName, Context context); + Response getAuthTokenWithResponse(String resourceGroupName, String containerAppName, + Context context); /** * Get auth token for a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return auth token for a container app. */ @@ -395,43 +397,43 @@ Response getAuthTokenWithResponse( /** * Start a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContainerAppInner> beginStart( - String resourceGroupName, String containerAppName); + SyncPoller, ContainerAppInner> beginStart(String resourceGroupName, + String containerAppName); /** * Start a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContainerAppInner> beginStart( - String resourceGroupName, String containerAppName, Context context); + SyncPoller, ContainerAppInner> beginStart(String resourceGroupName, + String containerAppName, Context context); /** * Start a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App. */ @@ -440,13 +442,13 @@ SyncPoller, ContainerAppInner> beginStart( /** * Start a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App. */ @@ -455,43 +457,43 @@ SyncPoller, ContainerAppInner> beginStart( /** * Stop a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContainerAppInner> beginStop( - String resourceGroupName, String containerAppName); + SyncPoller, ContainerAppInner> beginStop(String resourceGroupName, + String containerAppName); /** * Stop a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContainerAppInner> beginStop( - String resourceGroupName, String containerAppName, Context context); + SyncPoller, ContainerAppInner> beginStop(String resourceGroupName, + String containerAppName, Context context); /** * Stop a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App. */ @@ -500,13 +502,13 @@ SyncPoller, ContainerAppInner> beginStop( /** * Stop a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsDiagnosticsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsDiagnosticsClient.java index ed4321095d88..6460fb251e7a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsDiagnosticsClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsDiagnosticsClient.java @@ -13,16 +13,18 @@ import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -/** An instance of this class provides access to all the operations defined in ContainerAppsDiagnosticsClient. */ +/** + * An instance of this class provides access to all the operations defined in ContainerAppsDiagnosticsClient. + */ public interface ContainerAppsDiagnosticsClient { /** * Get the list of diagnostics for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which detector info is needed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of diagnostics for a given Container App as paginated response with {@link PagedIterable}. */ @@ -31,13 +33,13 @@ public interface ContainerAppsDiagnosticsClient { /** * Get the list of diagnostics for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which detector info is needed. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of diagnostics for a given Container App as paginated response with {@link PagedIterable}. */ @@ -46,30 +48,30 @@ public interface ContainerAppsDiagnosticsClient { /** * Get a diagnostics result of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param detectorName Name of the Container App Detector. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a diagnostics result of a Container App along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getDetectorWithResponse( - String resourceGroupName, String containerAppName, String detectorName, Context context); + Response getDetectorWithResponse(String resourceGroupName, String containerAppName, + String detectorName, Context context); /** * Get a diagnostics result of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param detectorName Name of the Container App Detector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a diagnostics result of a Container App. */ @@ -78,12 +80,12 @@ Response getDetectorWithResponse( /** * Get the Revisions for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which Revisions are needed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. */ @@ -92,47 +94,47 @@ Response getDetectorWithResponse( /** * Get the Revisions for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which Revisions are needed. * @param filter The filter to apply on the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRevisions( - String resourceGroupName, String containerAppName, String filter, Context context); + PagedIterable listRevisions(String resourceGroupName, String containerAppName, String filter, + Context context); /** * Get a revision of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a revision of a Container App along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); + Response getRevisionWithResponse(String resourceGroupName, String containerAppName, + String revisionName, Context context); /** * Get a revision of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a revision of a Container App. */ @@ -141,15 +143,15 @@ Response getRevisionWithResponse( /** * Get the properties of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Container App along with {@link Response}. */ @@ -158,14 +160,14 @@ Response getRevisionWithResponse( /** * Get the properties of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Container App. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionReplicasClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionReplicasClient.java index 79ad30876622..05a7e08c569a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionReplicasClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionReplicasClient.java @@ -11,11 +11,13 @@ import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaCollectionInner; import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -/** An instance of this class provides access to all the operations defined in ContainerAppsRevisionReplicasClient. */ +/** + * An instance of this class provides access to all the operations defined in ContainerAppsRevisionReplicasClient. + */ public interface ContainerAppsRevisionReplicasClient { /** * Get a replica for a Container App Revision. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -23,24 +25,24 @@ public interface ContainerAppsRevisionReplicasClient { * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a replica for a Container App Revision along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getReplicaWithResponse( - String resourceGroupName, String containerAppName, String revisionName, String replicaName, Context context); + Response getReplicaWithResponse(String resourceGroupName, String containerAppName, + String revisionName, String replicaName, Context context); /** * Get a replica for a Container App Revision. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @param replicaName Name of the Container App Revision Replica. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a replica for a Container App Revision. */ @@ -49,30 +51,30 @@ Response getReplicaWithResponse( /** * List replicas for a Container App Revision. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App Revision Replicas collection ARM resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listReplicasWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); + Response listReplicasWithResponse(String resourceGroupName, String containerAppName, + String revisionName, Context context); /** * List replicas for a Container App Revision. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App Revision Replicas collection ARM resource. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionsClient.java index fc706efbed30..c8079e70967d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionsClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionsClient.java @@ -11,16 +11,18 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -/** An instance of this class provides access to all the operations defined in ContainerAppsRevisionsClient. */ +/** + * An instance of this class provides access to all the operations defined in ContainerAppsRevisionsClient. + */ public interface ContainerAppsRevisionsClient { /** * Get the Revisions for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which Revisions are needed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. */ @@ -29,47 +31,47 @@ public interface ContainerAppsRevisionsClient { /** * Get the Revisions for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which Revisions are needed. * @param filter The filter to apply on the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listRevisions( - String resourceGroupName, String containerAppName, String filter, Context context); + PagedIterable listRevisions(String resourceGroupName, String containerAppName, String filter, + Context context); /** * Get a revision of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a revision of a Container App along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); + Response getRevisionWithResponse(String resourceGroupName, String containerAppName, + String revisionName, Context context); /** * Get a revision of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a revision of a Container App. */ @@ -78,30 +80,30 @@ Response getRevisionWithResponse( /** * Activates a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response activateRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); + Response activateRevisionWithResponse(String resourceGroupName, String containerAppName, String revisionName, + Context context); /** * Activates a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -109,30 +111,30 @@ Response activateRevisionWithResponse( /** * Deactivates a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deactivateRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); + Response deactivateRevisionWithResponse(String resourceGroupName, String containerAppName, + String revisionName, Context context); /** * Deactivates a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -140,30 +142,30 @@ Response deactivateRevisionWithResponse( /** * Restarts a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response restartRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); + Response restartRevisionWithResponse(String resourceGroupName, String containerAppName, String revisionName, + Context context); /** * Restarts a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSourceControlsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSourceControlsClient.java index 52444e4f6782..1d972a062004 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSourceControlsClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSourceControlsClient.java @@ -13,66 +13,68 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.appcontainers.fluent.models.SourceControlInner; -/** An instance of this class provides access to all the operations defined in ContainerAppsSourceControlsClient. */ +/** + * An instance of this class provides access to all the operations defined in ContainerAppsSourceControlsClient. + */ public interface ContainerAppsSourceControlsClient { /** * Get the Container App SourceControls in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App SourceControls in a given resource group as paginated response with {@link - * PagedIterable}. + * @return the Container App SourceControls in a given resource group as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable listByContainerApp(String resourceGroupName, String containerAppName); /** * Get the Container App SourceControls in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App SourceControls in a given resource group as paginated response with {@link - * PagedIterable}. + * @return the Container App SourceControls in a given resource group as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listByContainerApp( - String resourceGroupName, String containerAppName, Context context); + PagedIterable listByContainerApp(String resourceGroupName, String containerAppName, + Context context); /** * Get a SourceControl of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. * @param 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a SourceControl of a Container App along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String containerAppName, String sourceControlName, Context context); + Response getWithResponse(String resourceGroupName, String containerAppName, + String sourceControlName, Context context); /** * Get a SourceControl of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a SourceControl of a Container App. */ @@ -81,27 +83,24 @@ Response getWithResponse( /** * Create or update the SourceControl for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. * @param sourceControlEnvelope Properties used to create a Container App SourceControl. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of container App SourceControl. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SourceControlInner> beginCreateOrUpdate( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope); + SyncPoller, SourceControlInner> beginCreateOrUpdate(String resourceGroupName, + String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope); /** * Create or update the SourceControl for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -109,41 +108,34 @@ SyncPoller, SourceControlInner> beginCreateOrUpda * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of container App SourceControl. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, SourceControlInner> beginCreateOrUpdate( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope, - Context context); + SyncPoller, SourceControlInner> beginCreateOrUpdate(String resourceGroupName, + String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope, Context context); /** * Create or update the SourceControl for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. * @param sourceControlEnvelope Properties used to create a Container App SourceControl. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App SourceControl. */ @ServiceMethod(returns = ReturnType.SINGLE) - SourceControlInner createOrUpdate( - String resourceGroupName, - String containerAppName, - String sourceControlName, + SourceControlInner createOrUpdate(String resourceGroupName, String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope); /** * Create or update the SourceControl for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -151,60 +143,56 @@ SourceControlInner createOrUpdate( * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App SourceControl. */ @ServiceMethod(returns = ReturnType.SINGLE) - SourceControlInner createOrUpdate( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope, - Context context); + SourceControlInner createOrUpdate(String resourceGroupName, String containerAppName, String sourceControlName, + SourceControlInner sourceControlEnvelope, Context context); /** * Delete a Container App SourceControl. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String containerAppName, String sourceControlName); + SyncPoller, Void> beginDelete(String resourceGroupName, String containerAppName, + String sourceControlName); /** * Delete a Container App SourceControl. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. * @param 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginDelete( - String resourceGroupName, String containerAppName, String sourceControlName, Context context); + SyncPoller, Void> beginDelete(String resourceGroupName, String containerAppName, + String sourceControlName, Context context); /** * Delete a Container App SourceControl. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -212,14 +200,14 @@ SyncPoller, Void> beginDelete( /** * Delete a Container App SourceControl. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. * @param 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprComponentResiliencyPoliciesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprComponentResiliencyPoliciesClient.java new file mode 100644 index 000000000000..c057e69e3e88 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprComponentResiliencyPoliciesClient.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyInner; + +/** + * An instance of this class provides access to all the operations defined in DaprComponentResiliencyPoliciesClient. + */ +public interface DaprComponentResiliencyPoliciesClient { + /** + * Get the resiliency policies for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the resiliency policies for a Dapr component as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String environmentName, + String componentName); + + /** + * Get the resiliency policies for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the resiliency policies for a Dapr component as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String environmentName, + String componentName, Context context); + + /** + * Get a Dapr component resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Dapr component resiliency policy along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String environmentName, + String componentName, String name, Context context); + + /** + * Get a Dapr component resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Dapr component resiliency policy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DaprComponentResiliencyPolicyInner get(String resourceGroupName, String environmentName, String componentName, + String name); + + /** + * Creates or updates a Dapr component resiliency policy. + * + * Creates or updates a resiliency policy for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @param daprComponentResiliencyPolicyEnvelope Configuration details of the Dapr Component Resiliency Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr Component Resiliency Policy along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String resourceGroupName, + String environmentName, String componentName, String name, + DaprComponentResiliencyPolicyInner daprComponentResiliencyPolicyEnvelope, Context context); + + /** + * Creates or updates a Dapr component resiliency policy. + * + * Creates or updates a resiliency policy for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @param daprComponentResiliencyPolicyEnvelope Configuration details of the Dapr Component Resiliency Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr Component Resiliency Policy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DaprComponentResiliencyPolicyInner createOrUpdate(String resourceGroupName, String environmentName, + String componentName, String name, DaprComponentResiliencyPolicyInner daprComponentResiliencyPolicyEnvelope); + + /** + * Delete a Dapr component resiliency policy. + * + * Delete a resiliency policy for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String environmentName, String componentName, + String name, Context context); + + /** + * Delete a Dapr component resiliency policy. + * + * Delete a resiliency policy for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String environmentName, String componentName, String name); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprComponentsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprComponentsClient.java index 62358a5fc62a..cac5b28a2004 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprComponentsClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprComponentsClient.java @@ -12,16 +12,18 @@ import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; -/** An instance of this class provides access to all the operations defined in DaprComponentsClient. */ +/** + * An instance of this class provides access to all the operations defined in DaprComponentsClient. + */ public interface DaprComponentsClient { /** * Get the Dapr Components for a managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Dapr Components for a managed environment as paginated response with {@link PagedIterable}. */ @@ -30,13 +32,13 @@ public interface DaprComponentsClient { /** * Get the Dapr Components for a managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Dapr Components for a managed environment as paginated response with {@link PagedIterable}. */ @@ -45,30 +47,30 @@ public interface DaprComponentsClient { /** * Get a dapr component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * 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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context); + Response getWithResponse(String resourceGroupName, String environmentName, String componentName, + Context context); /** * Get a dapr component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a dapr component. */ @@ -77,9 +79,9 @@ Response getWithResponse( /** * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in 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. @@ -87,70 +89,63 @@ Response getWithResponse( * @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. + * 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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String environmentName, - String componentName, - DaprComponentInner daprComponentEnvelope, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String environmentName, + String componentName, DaprComponentInner daprComponentEnvelope, Context context); /** * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return dapr Component. */ @ServiceMethod(returns = ReturnType.SINGLE) - DaprComponentInner createOrUpdate( - String resourceGroupName, - String environmentName, - String componentName, + DaprComponentInner createOrUpdate(String resourceGroupName, String environmentName, String componentName, DaprComponentInner daprComponentEnvelope); /** * Delete a Dapr Component. - * - *

Delete a Dapr Component from a Managed Environment. - * + * + * 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. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context); + Response deleteWithResponse(String resourceGroupName, String environmentName, String componentName, + Context context); /** * Delete a Dapr Component. - * - *

Delete a Dapr Component from a Managed Environment. - * + * + * 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. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -158,30 +153,30 @@ Response deleteWithResponse( /** * List secrets for a dapr component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * 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}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listSecretsWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context); + Response listSecretsWithResponse(String resourceGroupName, String environmentName, + String componentName, Context context); /** * List secrets for a dapr component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * 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. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprSubscriptionsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprSubscriptionsClient.java new file mode 100644 index 000000000000..363e068ef7e3 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DaprSubscriptionsClient.java @@ -0,0 +1,151 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner; + +/** + * An instance of this class provides access to all the operations defined in DaprSubscriptionsClient. + */ +public interface DaprSubscriptionsClient { + /** + * Get the Dapr subscriptions for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Dapr subscriptions for a managed environment as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String environmentName); + + /** + * Get the Dapr subscriptions for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Dapr subscriptions for a managed environment as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String environmentName, Context context); + + /** + * Get a dapr subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a dapr subscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String environmentName, String name, + Context context); + + /** + * Get a dapr subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a dapr subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DaprSubscriptionInner get(String resourceGroupName, String environmentName, String name); + + /** + * Creates or updates a Dapr subscription. + * + * Creates or updates a Dapr subscription in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @param daprSubscriptionEnvelope Configuration details of the Dapr subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr PubSub Event Subscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse(String resourceGroupName, String environmentName, + String name, DaprSubscriptionInner daprSubscriptionEnvelope, Context context); + + /** + * Creates or updates a Dapr subscription. + * + * Creates or updates a Dapr subscription in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @param daprSubscriptionEnvelope Configuration details of the Dapr subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr PubSub Event Subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DaprSubscriptionInner createOrUpdate(String resourceGroupName, String environmentName, String name, + DaprSubscriptionInner daprSubscriptionEnvelope); + + /** + * Delete a Dapr subscription. + * + * Delete a Dapr subscription from a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response deleteWithResponse(String resourceGroupName, String environmentName, String name, Context context); + + /** + * Delete a Dapr subscription. + * + * Delete a Dapr subscription from a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String environmentName, String name); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DotNetComponentsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DotNetComponentsClient.java new file mode 100644 index 000000000000..f321e882b169 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/DotNetComponentsClient.java @@ -0,0 +1,281 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner; + +/** + * An instance of this class provides access to all the operations defined in DotNetComponentsClient. + */ +public interface DotNetComponentsClient { + /** + * Get the .NET Components for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the .NET Components for a managed environment as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String environmentName); + + /** + * Get the .NET Components for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the .NET Components for a managed environment as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String environmentName, Context context); + + /** + * Get a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a .NET Component along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String environmentName, String name, + Context context); + + /** + * Get a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a .NET Component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DotNetComponentInner get(String resourceGroupName, String environmentName, String name); + + /** + * Creates or updates a .NET Component. + * + * Creates or updates a .NET Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of .NET Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DotNetComponentInner> beginCreateOrUpdate(String resourceGroupName, + String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope); + + /** + * Creates or updates a .NET Component. + * + * Creates or updates a .NET Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of .NET Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DotNetComponentInner> beginCreateOrUpdate(String resourceGroupName, + String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope, Context context); + + /** + * Creates or updates a .NET Component. + * + * Creates or updates a .NET Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return .NET Component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DotNetComponentInner createOrUpdate(String resourceGroupName, String environmentName, String name, + DotNetComponentInner dotNetComponentEnvelope); + + /** + * Creates or updates a .NET Component. + * + * Creates or updates a .NET Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return .NET Component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DotNetComponentInner createOrUpdate(String resourceGroupName, String environmentName, String name, + DotNetComponentInner dotNetComponentEnvelope, Context context); + + /** + * Update properties of a .NET Component + * + * Patches a .NET Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of .NET Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DotNetComponentInner> beginUpdate(String resourceGroupName, + String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope); + + /** + * Update properties of a .NET Component + * + * Patches a .NET Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of .NET Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, DotNetComponentInner> beginUpdate(String resourceGroupName, + String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope, Context context); + + /** + * Update properties of a .NET Component + * + * Patches a .NET Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return .NET Component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DotNetComponentInner update(String resourceGroupName, String environmentName, String name, + DotNetComponentInner dotNetComponentEnvelope); + + /** + * Update properties of a .NET Component + * + * Patches a .NET Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return .NET Component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DotNetComponentInner update(String resourceGroupName, String environmentName, String name, + DotNetComponentInner dotNetComponentEnvelope, Context context); + + /** + * Delete a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName, String name); + + /** + * Delete a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName, String name, + Context context); + + /** + * Delete a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String environmentName, String name); + + /** + * Delete a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String environmentName, String name, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/FunctionsExtensionsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/FunctionsExtensionsClient.java new file mode 100644 index 000000000000..45732c3aac77 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/FunctionsExtensionsClient.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * An instance of this class provides access to all the operations defined in FunctionsExtensionsClient. + */ +public interface FunctionsExtensionsClient { + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response invokeFunctionsHostWithResponse(String resourceGroupName, String containerAppName, + String revisionName, String functionAppName, Context context); + + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + String invokeFunctionsHost(String resourceGroupName, String containerAppName, String revisionName, + String functionAppName); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JavaComponentsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JavaComponentsClient.java new file mode 100644 index 000000000000..160ff1772826 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JavaComponentsClient.java @@ -0,0 +1,281 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner; + +/** + * An instance of this class provides access to all the operations defined in JavaComponentsClient. + */ +public interface JavaComponentsClient { + /** + * Get the Java Components for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Java Components for a managed environment as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String environmentName); + + /** + * Get the Java Components for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Java Components for a managed environment as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String environmentName, Context context); + + /** + * Get a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Java Component along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String resourceGroupName, String environmentName, String name, + Context context); + + /** + * Get a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Java Component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + JavaComponentInner get(String resourceGroupName, String environmentName, String name); + + /** + * Creates or updates a Java Component. + * + * Creates or updates a Java Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of java Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, JavaComponentInner> beginCreateOrUpdate(String resourceGroupName, + String environmentName, String name, JavaComponentInner javaComponentEnvelope); + + /** + * Creates or updates a Java Component. + * + * Creates or updates a Java Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of java Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, JavaComponentInner> beginCreateOrUpdate(String resourceGroupName, + String environmentName, String name, JavaComponentInner javaComponentEnvelope, Context context); + + /** + * Creates or updates a Java Component. + * + * Creates or updates a Java Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return java Component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + JavaComponentInner createOrUpdate(String resourceGroupName, String environmentName, String name, + JavaComponentInner javaComponentEnvelope); + + /** + * Creates or updates a Java Component. + * + * Creates or updates a Java Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return java Component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + JavaComponentInner createOrUpdate(String resourceGroupName, String environmentName, String name, + JavaComponentInner javaComponentEnvelope, Context context); + + /** + * Update properties of a Java Component + * + * Patches a Java Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of java Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, JavaComponentInner> beginUpdate(String resourceGroupName, + String environmentName, String name, JavaComponentInner javaComponentEnvelope); + + /** + * Update properties of a Java Component + * + * Patches a Java Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of java Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, JavaComponentInner> beginUpdate(String resourceGroupName, + String environmentName, String name, JavaComponentInner javaComponentEnvelope, Context context); + + /** + * Update properties of a Java Component + * + * Patches a Java Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return java Component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + JavaComponentInner update(String resourceGroupName, String environmentName, String name, + JavaComponentInner javaComponentEnvelope); + + /** + * Update properties of a Java Component + * + * Patches a Java Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return java Component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + JavaComponentInner update(String resourceGroupName, String environmentName, String name, + JavaComponentInner javaComponentEnvelope, Context context); + + /** + * Delete a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName, String name); + + /** + * Delete a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName, String name, + Context context); + + /** + * Delete a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String environmentName, String name); + + /** + * Delete a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String environmentName, String name, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JobsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JobsClient.java index 934466bbe8ec..a0b37059995f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JobsClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JobsClient.java @@ -12,19 +12,126 @@ import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppJobExecutionsInner; +import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; +import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionBaseInner; import com.azure.resourcemanager.appcontainers.fluent.models.JobInner; import com.azure.resourcemanager.appcontainers.fluent.models.JobSecretsCollectionInner; import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; import com.azure.resourcemanager.appcontainers.models.JobPatchProperties; -/** An instance of this class provides access to all the operations defined in JobsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobsClient. + */ public interface JobsClient { + /** + * Get the list of diagnostics for a given Container App Job. + * + * Get the list of diagnostics for a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of diagnostics for a Container App Job along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listDetectorsWithResponse(String resourceGroupName, String jobName, + Context context); + + /** + * Get the list of diagnostics for a given Container App Job. + * + * Get the list of diagnostics for a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of diagnostics for a Container App Job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiagnosticsCollectionInner listDetectors(String resourceGroupName, String jobName); + + /** + * Get the diagnostics data for a given Container App Job. + * + * Get the diagnostics data for a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param detectorName Name of the Container App Job detector. + * @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 diagnostics data for a Container App Job along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getDetectorWithResponse(String resourceGroupName, String jobName, String detectorName, + Context context); + + /** + * Get the diagnostics data for a given Container App Job. + * + * Get the diagnostics data for a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param detectorName Name of the Container App Job detector. + * @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 diagnostics data for a Container App Job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiagnosticsInner getDetector(String resourceGroupName, String jobName, String detectorName); + + /** + * Get the properties for a given Container App Job. + * + * Get the properties of a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a Container App Job along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response proxyGetWithResponse(String resourceGroupName, String jobName, Context context); + + /** + * Get the properties for a given Container App Job. + * + * Get the properties of a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a Container App Job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + JobInner proxyGet(String resourceGroupName, String jobName); + /** * Get the Container Apps Jobs in a given subscription. - * + * * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Container Apps Jobs in a given subscription as paginated response with {@link PagedIterable}. */ @@ -33,11 +140,11 @@ public interface JobsClient { /** * Get the Container Apps Jobs in a given subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Container Apps Jobs in a given subscription as paginated response with {@link PagedIterable}. */ @@ -46,11 +153,11 @@ public interface JobsClient { /** * Get the Container Apps Jobs in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Container Apps Jobs in a given resource group as paginated response with {@link PagedIterable}. */ @@ -59,12 +166,12 @@ public interface JobsClient { /** * Get the Container Apps Jobs in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Container Apps Jobs in a given resource group as paginated response with {@link PagedIterable}. */ @@ -73,13 +180,13 @@ public interface JobsClient { /** * Get the properties of a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Container Apps Job along with {@link Response}. */ @@ -88,12 +195,12 @@ public interface JobsClient { /** * Get the properties of a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Container Apps Job. */ @@ -102,46 +209,46 @@ public interface JobsClient { /** * Create or Update a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of container App Job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobInner> beginCreateOrUpdate( - String resourceGroupName, String jobName, JobInner jobEnvelope); + SyncPoller, JobInner> beginCreateOrUpdate(String resourceGroupName, String jobName, + JobInner jobEnvelope); /** * Create or Update a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of container App Job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobInner> beginCreateOrUpdate( - String resourceGroupName, String jobName, JobInner jobEnvelope, Context context); + SyncPoller, JobInner> beginCreateOrUpdate(String resourceGroupName, String jobName, + JobInner jobEnvelope, Context context); /** * Create or Update a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App Job. */ @@ -150,14 +257,14 @@ SyncPoller, JobInner> beginCreateOrUpdate( /** * Create or Update a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App Job. */ @@ -166,12 +273,12 @@ SyncPoller, JobInner> beginCreateOrUpdate( /** * Delete a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * 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. */ @@ -180,13 +287,13 @@ SyncPoller, JobInner> beginCreateOrUpdate( /** * Delete a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * 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. */ @@ -195,12 +302,12 @@ SyncPoller, JobInner> beginCreateOrUpdate( /** * Delete a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -208,13 +315,13 @@ SyncPoller, JobInner> beginCreateOrUpdate( /** * Delete a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -222,52 +329,52 @@ SyncPoller, JobInner> beginCreateOrUpdate( /** * Update properties of a Container Apps Job - * - *

Patches a Container Apps Job using JSON Merge Patch. - * + * + * Patches a Container Apps Job using JSON Merge Patch. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of container App Job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobInner> beginUpdate( - String resourceGroupName, String jobName, JobPatchProperties jobEnvelope); + SyncPoller, JobInner> beginUpdate(String resourceGroupName, String jobName, + JobPatchProperties jobEnvelope); /** * Update properties of a Container Apps Job - * - *

Patches a Container Apps Job using JSON Merge Patch. - * + * + * Patches a Container Apps Job using JSON Merge Patch. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of container App Job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobInner> beginUpdate( - String resourceGroupName, String jobName, JobPatchProperties jobEnvelope, Context context); + SyncPoller, JobInner> beginUpdate(String resourceGroupName, String jobName, + JobPatchProperties jobEnvelope, Context context); /** * Update properties of a Container Apps Job - * - *

Patches a Container Apps Job using JSON Merge Patch. - * + * + * Patches a Container Apps Job using JSON Merge Patch. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App Job. */ @@ -276,16 +383,16 @@ SyncPoller, JobInner> beginUpdate( /** * Update properties of a Container Apps Job - * - *

Patches a Container Apps Job using JSON Merge Patch. - * + * + * Patches a Container Apps Job using JSON Merge Patch. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App Job. */ @@ -294,44 +401,44 @@ SyncPoller, JobInner> beginUpdate( /** * Start a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of container App's Job execution name. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobExecutionBaseInner> beginStart( - String resourceGroupName, String jobName); + SyncPoller, JobExecutionBaseInner> beginStart(String resourceGroupName, + String jobName); /** * Start a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param template Properties used to start a job execution. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of container App's Job execution name. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, JobExecutionBaseInner> beginStart( - String resourceGroupName, String jobName, JobExecutionTemplate template, Context context); + SyncPoller, JobExecutionBaseInner> beginStart(String resourceGroupName, + String jobName, JobExecutionTemplate template, Context context); /** * Start a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App's Job execution name. */ @@ -340,63 +447,63 @@ SyncPoller, JobExecutionBaseInner> beginStart( /** * Start a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param template Properties used to start a job execution. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App's Job execution name. */ @ServiceMethod(returns = ReturnType.SINGLE) - JobExecutionBaseInner start( - String resourceGroupName, String jobName, JobExecutionTemplate template, Context context); + JobExecutionBaseInner start(String resourceGroupName, String jobName, JobExecutionTemplate template, + Context context); /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStopExecution( - String resourceGroupName, String jobName, String jobExecutionName); + SyncPoller, Void> beginStopExecution(String resourceGroupName, String jobName, + String jobExecutionName); /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, Void> beginStopExecution( - String resourceGroupName, String jobName, String jobExecutionName, Context context); + SyncPoller, Void> beginStopExecution(String resourceGroupName, String jobName, + String jobExecutionName, Context context); /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -404,14 +511,14 @@ SyncPoller, Void> beginStopExecution( /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -419,43 +526,43 @@ SyncPoller, Void> beginStopExecution( /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of container App executions collection ARM resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContainerAppJobExecutionsInner> beginStopMultipleExecutions( - String resourceGroupName, String jobName); + SyncPoller, ContainerAppJobExecutionsInner> + beginStopMultipleExecutions(String resourceGroupName, String jobName); /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of container App executions collection ARM resource. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ContainerAppJobExecutionsInner> beginStopMultipleExecutions( - String resourceGroupName, String jobName, Context context); + SyncPoller, ContainerAppJobExecutionsInner> + beginStopMultipleExecutions(String resourceGroupName, String jobName, Context context); /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App executions collection ARM resource. */ @@ -464,13 +571,13 @@ SyncPoller, ContainerAppJobExecutions /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App executions collection ARM resource. */ @@ -479,28 +586,28 @@ SyncPoller, ContainerAppJobExecutions /** * List secrets for a container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container Apps Job Secrets Collection ARM resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listSecretsWithResponse( - String resourceGroupName, String jobName, Context context); + Response listSecretsWithResponse(String resourceGroupName, String jobName, + Context context); /** * List secrets for a container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container Apps Job Secrets Collection ARM resource. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JobsExecutionsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JobsExecutionsClient.java index 402658e9be84..d9c95e6f4a71 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JobsExecutionsClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/JobsExecutionsClient.java @@ -10,16 +10,18 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner; -/** An instance of this class provides access to all the operations defined in JobsExecutionsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobsExecutionsClient. + */ public interface JobsExecutionsClient { /** * Get a Container Apps Job's executions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Container Apps Job's executions as paginated response with {@link PagedIterable}. */ @@ -28,14 +30,14 @@ public interface JobsExecutionsClient { /** * Get a Container Apps Job's executions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param filter The filter to apply on the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Container Apps Job's executions as paginated response with {@link PagedIterable}. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedCertificatesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedCertificatesClient.java index 30113c809f0d..37406c086470 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedCertificatesClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedCertificatesClient.java @@ -14,34 +14,36 @@ import com.azure.resourcemanager.appcontainers.fluent.models.ManagedCertificateInner; import com.azure.resourcemanager.appcontainers.models.ManagedCertificatePatch; -/** An instance of this class provides access to all the operations defined in ManagedCertificatesClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedCertificatesClient. + */ public interface ManagedCertificatesClient { /** * Get the specified Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specified Managed Certificate along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String environmentName, String managedCertificateName, Context context); + Response getWithResponse(String resourceGroupName, String environmentName, + String managedCertificateName, Context context); /** * Get the specified Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specified Managed Certificate. */ @@ -50,26 +52,26 @@ Response getWithResponse( /** * Create or Update a Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 400. + * status code 400. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of managed certificates used for Custom Domain bindings of Container - * Apps in a Managed Environment. + * Apps in a Managed Environment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedCertificateInner> beginCreateOrUpdate( - String resourceGroupName, String environmentName, String managedCertificateName); + SyncPoller, ManagedCertificateInner> + beginCreateOrUpdate(String resourceGroupName, String environmentName, String managedCertificateName); /** * Create or Update a Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. @@ -77,42 +79,39 @@ SyncPoller, ManagedCertificateInner> beginCr * @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. + * is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 400. + * status code 400. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of managed certificates used for Custom Domain bindings of Container - * Apps in a Managed Environment. + * Apps in a Managed Environment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller, ManagedCertificateInner> beginCreateOrUpdate( - String resourceGroupName, - String environmentName, - String managedCertificateName, - ManagedCertificateInner managedCertificateEnvelope, - Context context); + String resourceGroupName, String environmentName, String managedCertificateName, + ManagedCertificateInner managedCertificateEnvelope, Context context); /** * Create or Update a Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 400. + * status code 400. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedCertificateInner createOrUpdate( - String resourceGroupName, String environmentName, String managedCertificateName); + ManagedCertificateInner createOrUpdate(String resourceGroupName, String environmentName, + String managedCertificateName); /** * Create or Update a Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. @@ -120,46 +119,42 @@ ManagedCertificateInner createOrUpdate( * @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. + * is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 400. + * status code 400. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedCertificateInner createOrUpdate( - String resourceGroupName, - String environmentName, - String managedCertificateName, - ManagedCertificateInner managedCertificateEnvelope, - Context context); + ManagedCertificateInner createOrUpdate(String resourceGroupName, String environmentName, + String managedCertificateName, ManagedCertificateInner managedCertificateEnvelope, Context context); /** * Deletes the specified Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String environmentName, String managedCertificateName, Context context); + Response deleteWithResponse(String resourceGroupName, String environmentName, String managedCertificateName, + Context context); /** * Deletes the specified Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -167,9 +162,9 @@ Response deleteWithResponse( /** * Update tags of a managed certificate - * - *

Patches a managed certificate. Oly patching of tags is supported. - * + * + * Patches a managed certificate. Oly 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 managedCertificateName Name of the Managed Certificate. @@ -177,49 +172,42 @@ Response deleteWithResponse( * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment along - * with {@link Response}. + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response updateWithResponse( - String resourceGroupName, - String environmentName, - String managedCertificateName, - ManagedCertificatePatch managedCertificateEnvelope, - Context context); + Response updateWithResponse(String resourceGroupName, String environmentName, + String managedCertificateName, ManagedCertificatePatch managedCertificateEnvelope, Context context); /** * Update tags of a managed certificate - * - *

Patches a managed certificate. Oly patching of tags is supported. - * + * + * Patches a managed certificate. Oly 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 managedCertificateName Name of the Managed Certificate. * @param managedCertificateEnvelope Properties of a managed 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedCertificateInner update( - String resourceGroupName, - String environmentName, - String managedCertificateName, + ManagedCertificateInner update(String resourceGroupName, String environmentName, String managedCertificateName, ManagedCertificatePatch managedCertificateEnvelope); /** * Get the Managed Certificates in a given managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Managed Certificates in a given managed environment as paginated response with {@link PagedIterable}. */ @@ -228,13 +216,13 @@ ManagedCertificateInner update( /** * Get the Managed Certificates in a given managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Managed Certificates in a given managed environment as paginated response with {@link PagedIterable}. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentDiagnosticsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentDiagnosticsClient.java index e42f15fa36a0..9969602d4353 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentDiagnosticsClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentDiagnosticsClient.java @@ -11,37 +11,39 @@ import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -/** An instance of this class provides access to all the operations defined in ManagedEnvironmentDiagnosticsClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedEnvironmentDiagnosticsClient. + */ public interface ManagedEnvironmentDiagnosticsClient { /** * Get the list of diagnostics for a given Managed Environment. - * - *

Get the list of diagnostics for a Managed Environment used to host container apps. - * + * + * Get the list of diagnostics for a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a Managed Environment used to host container apps along with {@link - * Response}. + * @return the list of diagnostics for a Managed Environment used to host container apps along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listDetectorsWithResponse( - String resourceGroupName, String environmentName, Context context); + Response listDetectorsWithResponse(String resourceGroupName, String environmentName, + Context context); /** * Get the list of diagnostics for a given Managed Environment. - * - *

Get the list of diagnostics for a Managed Environment used to host container apps. - * + * + * Get the list of diagnostics for a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of diagnostics for a Managed Environment used to host container apps. */ @@ -50,34 +52,34 @@ Response listDetectorsWithResponse( /** * Get the diagnostics data for a given Managed Environment. - * - *

Get the diagnostics data for a Managed Environment used to host container apps. - * + * + * Get the diagnostics data for a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param detectorName Name of the Managed Environment detector. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the diagnostics data for a Managed Environment used to host container apps along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getDetectorWithResponse( - String resourceGroupName, String environmentName, String detectorName, Context context); + Response getDetectorWithResponse(String resourceGroupName, String environmentName, + String detectorName, Context context); /** * Get the diagnostics data for a given Managed Environment. - * - *

Get the diagnostics data for a Managed Environment used to host container apps. - * + * + * Get the diagnostics data for a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param detectorName Name of the Managed Environment detector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the diagnostics data for a Managed Environment used to host container apps. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentUsagesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentUsagesClient.java new file mode 100644 index 000000000000..3d9e05a007a2 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentUsagesClient.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; + +/** + * An instance of this class provides access to all the operations defined in ManagedEnvironmentUsagesClient. + */ +public interface ManagedEnvironmentUsagesClient { + /** + * Gets the current usage information as well as the limits for environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name 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. + * @return the current usage information as well as the limits for environment as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String environmentName); + + /** + * Gets the current usage information as well as the limits for environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name 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. + * @return the current usage information as well as the limits for environment as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String environmentName, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsClient.java index 9631d1323e22..115d58555ac3 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 @@ -15,15 +15,17 @@ import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; -/** An instance of this class provides access to all the operations defined in ManagedEnvironmentsClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedEnvironmentsClient. + */ public interface ManagedEnvironmentsClient { /** * Get all Environments for a subscription. - * - *

Get all Managed Environments for a subscription. - * + * + * Get all Managed Environments for a subscription. + * * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all Managed Environments for a subscription as paginated response with {@link PagedIterable}. */ @@ -32,13 +34,13 @@ public interface ManagedEnvironmentsClient { /** * Get all Environments for a subscription. - * - *

Get all Managed Environments for a subscription. - * + * + * Get all Managed Environments for a subscription. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all Managed Environments for a subscription as paginated response with {@link PagedIterable}. */ @@ -47,13 +49,13 @@ public interface ManagedEnvironmentsClient { /** * Get all the Environments in a resource group. - * - *

Get all the Managed Environments in a resource group. - * + * + * Get all the Managed Environments in a resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all the Managed Environments in a resource group as paginated response with {@link PagedIterable}. */ @@ -62,14 +64,14 @@ public interface ManagedEnvironmentsClient { /** * Get all the Environments in a resource group. - * - *

Get all the Managed Environments in a resource group. - * + * + * Get all the Managed Environments in a resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all the Managed Environments in a resource group as paginated response with {@link PagedIterable}. */ @@ -78,32 +80,32 @@ public interface ManagedEnvironmentsClient { /** * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * + * + * Get the properties of a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Managed Environment used to host container apps along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String environmentName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String environmentName, + Context context); /** * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * + * + * Get the properties of a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Managed Environment used to host container apps. */ @@ -112,15 +114,15 @@ Response getByResourceGroupWithResponse( /** * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * + * + * Creates or updates a Managed Environment used to host container apps. + * * @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. + * 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 an environment for hosting container apps. */ @@ -130,16 +132,16 @@ SyncPoller, ManagedEnvironmentInner> beginCr /** * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * + * + * Creates or updates a Managed Environment used to host container apps. + * * @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. + * 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 an environment for hosting container apps. */ @@ -149,51 +151,51 @@ SyncPoller, ManagedEnvironmentInner> beginCr /** * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * + * + * Creates or updates a Managed Environment used to host container apps. + * * @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. + * 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) - ManagedEnvironmentInner createOrUpdate( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); + ManagedEnvironmentInner createOrUpdate(String resourceGroupName, String environmentName, + ManagedEnvironmentInner environmentEnvelope); /** * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * + * + * Creates or updates a Managed Environment used to host container apps. + * * @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. + * 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) - ManagedEnvironmentInner createOrUpdate( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); + ManagedEnvironmentInner createOrUpdate(String resourceGroupName, String environmentName, + ManagedEnvironmentInner environmentEnvelope, Context context); /** * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * + * + * Delete a Managed Environment if it does not have any container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name 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. + * 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. */ @@ -202,15 +204,15 @@ ManagedEnvironmentInner createOrUpdate( /** * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * + * + * Delete a Managed Environment if it does not have any container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name 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. + * 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. */ @@ -219,14 +221,14 @@ ManagedEnvironmentInner createOrUpdate( /** * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * + * + * Delete a Managed Environment if it does not have any container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -234,15 +236,15 @@ ManagedEnvironmentInner createOrUpdate( /** * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * + * + * Delete a Managed Environment if it does not have any container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) @@ -250,106 +252,106 @@ ManagedEnvironmentInner createOrUpdate( /** * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * + * + * 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. + * 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 an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedEnvironmentInner> beginUpdate( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); + SyncPoller, ManagedEnvironmentInner> beginUpdate(String resourceGroupName, + String environmentName, ManagedEnvironmentInner environmentEnvelope); /** * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * + * + * 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. + * 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 an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - SyncPoller, ManagedEnvironmentInner> beginUpdate( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); + SyncPoller, ManagedEnvironmentInner> beginUpdate(String resourceGroupName, + String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); /** * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * + * + * 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. + * 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) - ManagedEnvironmentInner update( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); + ManagedEnvironmentInner update(String resourceGroupName, String environmentName, + ManagedEnvironmentInner environmentEnvelope); /** * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * + * + * 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. + * 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) - ManagedEnvironmentInner update( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); + ManagedEnvironmentInner update(String resourceGroupName, String environmentName, + ManagedEnvironmentInner environmentEnvelope, Context context); /** * Get auth token for a managed environment - * - *

Checks if resource name is available. - * + * + * Checks if resource name is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return environment Auth Token along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getAuthTokenWithResponse( - String resourceGroupName, String environmentName, Context context); + Response getAuthTokenWithResponse(String resourceGroupName, String environmentName, + Context context); /** * Get auth token for a managed environment - * - *

Checks if resource name is available. - * + * + * Checks if resource name is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return environment Auth Token. */ @@ -358,36 +360,36 @@ Response getAuthTokenWithResponse( /** * Get all workload Profile States for a Managed Environment.. - * - *

Get all workload Profile States for a Managed Environment. - * + * + * Get all workload Profile States for a Managed Environment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all workload Profile States for a Managed Environment as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listWorkloadProfileStates( - String resourceGroupName, String environmentName); + PagedIterable listWorkloadProfileStates(String resourceGroupName, + String environmentName); /** * Get all workload Profile States for a Managed Environment.. - * - *

Get all workload Profile States for a Managed Environment. - * + * + * Get all workload Profile States for a Managed Environment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all workload Profile States for a Managed Environment as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - PagedIterable listWorkloadProfileStates( - String resourceGroupName, String environmentName, Context context); + PagedIterable listWorkloadProfileStates(String resourceGroupName, + String environmentName, Context context); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsDiagnosticsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsDiagnosticsClient.java index c6580d78fdf5..1b4c03b2060d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsDiagnosticsClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsDiagnosticsClient.java @@ -10,36 +10,38 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; -/** An instance of this class provides access to all the operations defined in ManagedEnvironmentsDiagnosticsClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedEnvironmentsDiagnosticsClient. + */ public interface ManagedEnvironmentsDiagnosticsClient { /** * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * + * + * Get the properties of a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Managed Environment used to host container apps along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getRootWithResponse( - String resourceGroupName, String environmentName, Context context); + Response getRootWithResponse(String resourceGroupName, String environmentName, + Context context); /** * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * + * + * Get the properties of a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Managed Environment used to host container apps. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsStoragesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsStoragesClient.java index f4a809933d52..d3f52ead4a63 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsStoragesClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsStoragesClient.java @@ -11,32 +11,34 @@ import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStorageInner; import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStoragesCollectionInner; -/** An instance of this class provides access to all the operations defined in ManagedEnvironmentsStoragesClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedEnvironmentsStoragesClient. + */ public interface ManagedEnvironmentsStoragesClient { /** * Get all storages for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all storages for a managedEnvironment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse( - String resourceGroupName, String environmentName, Context context); + Response listWithResponse(String resourceGroupName, + String environmentName, Context context); /** * Get all storages for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all storages for a managedEnvironment. */ @@ -45,30 +47,30 @@ Response listWithResponse( /** * Get storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return storage for a managedEnvironment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String environmentName, String storageName, Context context); + Response getWithResponse(String resourceGroupName, String environmentName, + String storageName, Context context); /** * Get storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return storage for a managedEnvironment. */ @@ -77,7 +79,7 @@ Response getWithResponse( /** * Create or update storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. @@ -85,64 +87,57 @@ Response getWithResponse( * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return storage resource for managedEnvironment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( - String resourceGroupName, - String environmentName, - String storageName, - ManagedEnvironmentStorageInner storageEnvelope, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, + String environmentName, String storageName, ManagedEnvironmentStorageInner storageEnvelope, Context context); /** * Create or update storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. * @param storageEnvelope Configuration details of storage. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return storage resource for managedEnvironment. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedEnvironmentStorageInner createOrUpdate( - String resourceGroupName, - String environmentName, - String storageName, + ManagedEnvironmentStorageInner createOrUpdate(String resourceGroupName, String environmentName, String storageName, ManagedEnvironmentStorageInner storageEnvelope); /** * Delete storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String environmentName, String storageName, Context context); + Response deleteWithResponse(String resourceGroupName, String environmentName, String storageName, + Context context); /** * Delete storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/NamespacesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/NamespacesClient.java index 27878d6ce998..df0db6b1e37e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/NamespacesClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/NamespacesClient.java @@ -11,45 +11,44 @@ import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -/** An instance of this class provides access to all the operations defined in NamespacesClient. */ +/** + * An instance of this class provides access to all the operations defined in NamespacesClient. + */ public interface NamespacesClient { /** * Checks the resource name availability. - * - *

Checks if resource name is available. - * + * + * Checks if resource name is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param checkNameAvailabilityRequest The check name availability request. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the check availability result along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response checkNameAvailabilityWithResponse( - String resourceGroupName, - String environmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest, - Context context); + Response checkNameAvailabilityWithResponse(String resourceGroupName, + String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context); /** * Checks the resource name availability. - * - *

Checks if resource name is available. - * + * + * Checks if resource name is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param checkNameAvailabilityRequest The check name availability request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the check availability result. */ @ServiceMethod(returns = ReturnType.SINGLE) - CheckNameAvailabilityResponseInner checkNameAvailability( - String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest); + CheckNameAvailabilityResponseInner checkNameAvailability(String resourceGroupName, String environmentName, + CheckNameAvailabilityRequest checkNameAvailabilityRequest); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/OperationsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/OperationsClient.java index a9e17d64326e..e421fd4a6c0a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/OperationsClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/OperationsClient.java @@ -10,13 +10,15 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public interface OperationsClient { /** * Lists all of the available RP operations. - * + * * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return available operations of the service as paginated response with {@link PagedIterable}. */ @@ -25,11 +27,11 @@ public interface OperationsClient { /** * Lists all of the available RP operations. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return available operations of the service as paginated response with {@link PagedIterable}. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ResourceProvidersClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ResourceProvidersClient.java index 9b59268f6d08..752dab23418d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ResourceProvidersClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ResourceProvidersClient.java @@ -10,37 +10,63 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner; -/** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */ +/** + * An instance of this class provides access to all the operations defined in ResourceProvidersClient. + */ public interface ResourceProvidersClient { /** * Get details of a single job execution. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return details of a single job execution along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response jobExecutionWithResponse( - String resourceGroupName, String jobName, String jobExecutionName, Context context); + Response jobExecutionWithResponse(String resourceGroupName, String jobName, + String jobExecutionName, Context context); /** * Get details of a single job execution. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return details of a single job execution. */ @ServiceMethod(returns = ReturnType.SINGLE) JobExecutionInner jobExecution(String resourceGroupName, String jobName, String jobExecutionName); + + /** + * Get the verification id of a subscription used for verifying custom domains. + * + * @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 verification id of a subscription used for verifying custom domains along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getCustomDomainVerificationIdWithResponse(Context context); + + /** + * Get the verification id of a subscription used for verifying custom domains. + * + * @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 verification id of a subscription used for verifying custom domains. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + String getCustomDomainVerificationId(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/UsagesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/UsagesClient.java new file mode 100644 index 000000000000..d57572384b32 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/UsagesClient.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.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; + +/** + * An instance of this class provides access to all the operations defined in UsagesClient. + */ +public interface UsagesClient { + /** + * Gets, for the specified location, the current resource usage information as well as the limits under the + * subscription. + * + * @param location The location for which resource usage is queried. + * @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 paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location); + + /** + * Gets, for the specified location, the current resource usage information as well as the limits under the + * subscription. + * + * @param location The location for which resource usage is queried. + * @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 paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String location, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AppResiliencyInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AppResiliencyInner.java new file mode 100644 index 000000000000..8c8854f07d7f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AppResiliencyInner.java @@ -0,0 +1,207 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.models.CircuitBreakerPolicy; +import com.azure.resourcemanager.appcontainers.models.HttpConnectionPool; +import com.azure.resourcemanager.appcontainers.models.HttpRetryPolicy; +import com.azure.resourcemanager.appcontainers.models.TcpConnectionPool; +import com.azure.resourcemanager.appcontainers.models.TcpRetryPolicy; +import com.azure.resourcemanager.appcontainers.models.TimeoutPolicy; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Configuration to setup App Resiliency. + */ +@Fluent +public final class AppResiliencyInner extends ProxyResource { + /* + * App Resiliency resource specific properties + */ + @JsonProperty(value = "properties") + private AppResiliencyProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of AppResiliencyInner class. + */ + public AppResiliencyInner() { + } + + /** + * Get the innerProperties property: App Resiliency resource specific properties. + * + * @return the innerProperties value. + */ + private AppResiliencyProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the timeoutPolicy property: Policy to set request timeouts. + * + * @return the timeoutPolicy value. + */ + public TimeoutPolicy timeoutPolicy() { + return this.innerProperties() == null ? null : this.innerProperties().timeoutPolicy(); + } + + /** + * Set the timeoutPolicy property: Policy to set request timeouts. + * + * @param timeoutPolicy the timeoutPolicy value to set. + * @return the AppResiliencyInner object itself. + */ + public AppResiliencyInner withTimeoutPolicy(TimeoutPolicy timeoutPolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new AppResiliencyProperties(); + } + this.innerProperties().withTimeoutPolicy(timeoutPolicy); + return this; + } + + /** + * Get the httpRetryPolicy property: Policy that defines http request retry conditions. + * + * @return the httpRetryPolicy value. + */ + public HttpRetryPolicy httpRetryPolicy() { + return this.innerProperties() == null ? null : this.innerProperties().httpRetryPolicy(); + } + + /** + * Set the httpRetryPolicy property: Policy that defines http request retry conditions. + * + * @param httpRetryPolicy the httpRetryPolicy value to set. + * @return the AppResiliencyInner object itself. + */ + public AppResiliencyInner withHttpRetryPolicy(HttpRetryPolicy httpRetryPolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new AppResiliencyProperties(); + } + this.innerProperties().withHttpRetryPolicy(httpRetryPolicy); + return this; + } + + /** + * Get the tcpRetryPolicy property: Policy that defines tcp request retry conditions. + * + * @return the tcpRetryPolicy value. + */ + public TcpRetryPolicy tcpRetryPolicy() { + return this.innerProperties() == null ? null : this.innerProperties().tcpRetryPolicy(); + } + + /** + * Set the tcpRetryPolicy property: Policy that defines tcp request retry conditions. + * + * @param tcpRetryPolicy the tcpRetryPolicy value to set. + * @return the AppResiliencyInner object itself. + */ + public AppResiliencyInner withTcpRetryPolicy(TcpRetryPolicy tcpRetryPolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new AppResiliencyProperties(); + } + this.innerProperties().withTcpRetryPolicy(tcpRetryPolicy); + return this; + } + + /** + * Get the circuitBreakerPolicy property: Policy that defines circuit breaker conditions. + * + * @return the circuitBreakerPolicy value. + */ + public CircuitBreakerPolicy circuitBreakerPolicy() { + return this.innerProperties() == null ? null : this.innerProperties().circuitBreakerPolicy(); + } + + /** + * Set the circuitBreakerPolicy property: Policy that defines circuit breaker conditions. + * + * @param circuitBreakerPolicy the circuitBreakerPolicy value to set. + * @return the AppResiliencyInner object itself. + */ + public AppResiliencyInner withCircuitBreakerPolicy(CircuitBreakerPolicy circuitBreakerPolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new AppResiliencyProperties(); + } + this.innerProperties().withCircuitBreakerPolicy(circuitBreakerPolicy); + return this; + } + + /** + * Get the httpConnectionPool property: Defines parameters for http connection pooling. + * + * @return the httpConnectionPool value. + */ + public HttpConnectionPool httpConnectionPool() { + return this.innerProperties() == null ? null : this.innerProperties().httpConnectionPool(); + } + + /** + * Set the httpConnectionPool property: Defines parameters for http connection pooling. + * + * @param httpConnectionPool the httpConnectionPool value to set. + * @return the AppResiliencyInner object itself. + */ + public AppResiliencyInner withHttpConnectionPool(HttpConnectionPool httpConnectionPool) { + if (this.innerProperties() == null) { + this.innerProperties = new AppResiliencyProperties(); + } + this.innerProperties().withHttpConnectionPool(httpConnectionPool); + return this; + } + + /** + * Get the tcpConnectionPool property: Defines parameters for tcp connection pooling. + * + * @return the tcpConnectionPool value. + */ + public TcpConnectionPool tcpConnectionPool() { + return this.innerProperties() == null ? null : this.innerProperties().tcpConnectionPool(); + } + + /** + * Set the tcpConnectionPool property: Defines parameters for tcp connection pooling. + * + * @param tcpConnectionPool the tcpConnectionPool value to set. + * @return the AppResiliencyInner object itself. + */ + public AppResiliencyInner withTcpConnectionPool(TcpConnectionPool tcpConnectionPool) { + if (this.innerProperties() == null) { + this.innerProperties = new AppResiliencyProperties(); + } + this.innerProperties().withTcpConnectionPool(tcpConnectionPool); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AppResiliencyProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AppResiliencyProperties.java new file mode 100644 index 000000000000..aa0dd302ad09 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AppResiliencyProperties.java @@ -0,0 +1,208 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.models.CircuitBreakerPolicy; +import com.azure.resourcemanager.appcontainers.models.HttpConnectionPool; +import com.azure.resourcemanager.appcontainers.models.HttpRetryPolicy; +import com.azure.resourcemanager.appcontainers.models.TcpConnectionPool; +import com.azure.resourcemanager.appcontainers.models.TcpRetryPolicy; +import com.azure.resourcemanager.appcontainers.models.TimeoutPolicy; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * App Resiliency resource specific properties. + */ +@Fluent +public final class AppResiliencyProperties { + /* + * Policy to set request timeouts + */ + @JsonProperty(value = "timeoutPolicy") + private TimeoutPolicy timeoutPolicy; + + /* + * Policy that defines http request retry conditions + */ + @JsonProperty(value = "httpRetryPolicy") + private HttpRetryPolicy httpRetryPolicy; + + /* + * Policy that defines tcp request retry conditions + */ + @JsonProperty(value = "tcpRetryPolicy") + private TcpRetryPolicy tcpRetryPolicy; + + /* + * Policy that defines circuit breaker conditions + */ + @JsonProperty(value = "circuitBreakerPolicy") + private CircuitBreakerPolicy circuitBreakerPolicy; + + /* + * Defines parameters for http connection pooling + */ + @JsonProperty(value = "httpConnectionPool") + private HttpConnectionPool httpConnectionPool; + + /* + * Defines parameters for tcp connection pooling + */ + @JsonProperty(value = "tcpConnectionPool") + private TcpConnectionPool tcpConnectionPool; + + /** + * Creates an instance of AppResiliencyProperties class. + */ + public AppResiliencyProperties() { + } + + /** + * Get the timeoutPolicy property: Policy to set request timeouts. + * + * @return the timeoutPolicy value. + */ + public TimeoutPolicy timeoutPolicy() { + return this.timeoutPolicy; + } + + /** + * Set the timeoutPolicy property: Policy to set request timeouts. + * + * @param timeoutPolicy the timeoutPolicy value to set. + * @return the AppResiliencyProperties object itself. + */ + public AppResiliencyProperties withTimeoutPolicy(TimeoutPolicy timeoutPolicy) { + this.timeoutPolicy = timeoutPolicy; + return this; + } + + /** + * Get the httpRetryPolicy property: Policy that defines http request retry conditions. + * + * @return the httpRetryPolicy value. + */ + public HttpRetryPolicy httpRetryPolicy() { + return this.httpRetryPolicy; + } + + /** + * Set the httpRetryPolicy property: Policy that defines http request retry conditions. + * + * @param httpRetryPolicy the httpRetryPolicy value to set. + * @return the AppResiliencyProperties object itself. + */ + public AppResiliencyProperties withHttpRetryPolicy(HttpRetryPolicy httpRetryPolicy) { + this.httpRetryPolicy = httpRetryPolicy; + return this; + } + + /** + * Get the tcpRetryPolicy property: Policy that defines tcp request retry conditions. + * + * @return the tcpRetryPolicy value. + */ + public TcpRetryPolicy tcpRetryPolicy() { + return this.tcpRetryPolicy; + } + + /** + * Set the tcpRetryPolicy property: Policy that defines tcp request retry conditions. + * + * @param tcpRetryPolicy the tcpRetryPolicy value to set. + * @return the AppResiliencyProperties object itself. + */ + public AppResiliencyProperties withTcpRetryPolicy(TcpRetryPolicy tcpRetryPolicy) { + this.tcpRetryPolicy = tcpRetryPolicy; + return this; + } + + /** + * Get the circuitBreakerPolicy property: Policy that defines circuit breaker conditions. + * + * @return the circuitBreakerPolicy value. + */ + public CircuitBreakerPolicy circuitBreakerPolicy() { + return this.circuitBreakerPolicy; + } + + /** + * Set the circuitBreakerPolicy property: Policy that defines circuit breaker conditions. + * + * @param circuitBreakerPolicy the circuitBreakerPolicy value to set. + * @return the AppResiliencyProperties object itself. + */ + public AppResiliencyProperties withCircuitBreakerPolicy(CircuitBreakerPolicy circuitBreakerPolicy) { + this.circuitBreakerPolicy = circuitBreakerPolicy; + return this; + } + + /** + * Get the httpConnectionPool property: Defines parameters for http connection pooling. + * + * @return the httpConnectionPool value. + */ + public HttpConnectionPool httpConnectionPool() { + return this.httpConnectionPool; + } + + /** + * Set the httpConnectionPool property: Defines parameters for http connection pooling. + * + * @param httpConnectionPool the httpConnectionPool value to set. + * @return the AppResiliencyProperties object itself. + */ + public AppResiliencyProperties withHttpConnectionPool(HttpConnectionPool httpConnectionPool) { + this.httpConnectionPool = httpConnectionPool; + return this; + } + + /** + * Get the tcpConnectionPool property: Defines parameters for tcp connection pooling. + * + * @return the tcpConnectionPool value. + */ + public TcpConnectionPool tcpConnectionPool() { + return this.tcpConnectionPool; + } + + /** + * Set the tcpConnectionPool property: Defines parameters for tcp connection pooling. + * + * @param tcpConnectionPool the tcpConnectionPool value to set. + * @return the AppResiliencyProperties object itself. + */ + public AppResiliencyProperties withTcpConnectionPool(TcpConnectionPool tcpConnectionPool) { + this.tcpConnectionPool = tcpConnectionPool; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (timeoutPolicy() != null) { + timeoutPolicy().validate(); + } + if (httpRetryPolicy() != null) { + httpRetryPolicy().validate(); + } + if (tcpRetryPolicy() != null) { + tcpRetryPolicy().validate(); + } + if (circuitBreakerPolicy() != null) { + circuitBreakerPolicy().validate(); + } + if (httpConnectionPool() != null) { + httpConnectionPool().validate(); + } + if (tcpConnectionPool() != null) { + tcpConnectionPool().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigInner.java index 7a3c141ee7e5..0d159392fafb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigInner.java @@ -8,13 +8,16 @@ import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.AuthPlatform; +import com.azure.resourcemanager.appcontainers.models.EncryptionSettings; 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.fasterxml.jackson.annotation.JsonProperty; -/** Configuration settings for the Azure ContainerApp Service Authentication / Authorization feature. */ +/** + * Configuration settings for the Azure ContainerApp Service Authentication / Authorization feature. + */ @Fluent public final class AuthConfigInner extends ProxyResource { /* @@ -29,13 +32,15 @@ public final class AuthConfigInner extends ProxyResource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of AuthConfigInner class. */ + /** + * Creates an instance of AuthConfigInner class. + */ public AuthConfigInner() { } /** * Get the innerProperties property: AuthConfig resource specific properties. - * + * * @return the innerProperties value. */ private AuthConfigProperties innerProperties() { @@ -44,7 +49,7 @@ private AuthConfigProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { @@ -54,7 +59,7 @@ public SystemData systemData() { /** * Get the platform property: The configuration settings of the platform of ContainerApp Service * Authentication/Authorization. - * + * * @return the platform value. */ public AuthPlatform platform() { @@ -64,7 +69,7 @@ public AuthPlatform platform() { /** * Set the platform property: The configuration settings of the platform of ContainerApp Service * Authentication/Authorization. - * + * * @param platform the platform value to set. * @return the AuthConfigInner object itself. */ @@ -79,7 +84,7 @@ public AuthConfigInner withPlatform(AuthPlatform platform) { /** * Get the globalValidation property: The configuration settings that determines the validation flow of users using * Service Authentication/Authorization. - * + * * @return the globalValidation value. */ public GlobalValidation globalValidation() { @@ -89,7 +94,7 @@ public GlobalValidation globalValidation() { /** * Set the globalValidation property: The configuration settings that determines the validation flow of users using * Service Authentication/Authorization. - * + * * @param globalValidation the globalValidation value to set. * @return the AuthConfigInner object itself. */ @@ -104,7 +109,7 @@ public AuthConfigInner withGlobalValidation(GlobalValidation globalValidation) { /** * Get the identityProviders property: The configuration settings of each of the identity providers used to * configure ContainerApp Service Authentication/Authorization. - * + * * @return the identityProviders value. */ public IdentityProviders identityProviders() { @@ -114,7 +119,7 @@ public IdentityProviders identityProviders() { /** * Set the identityProviders property: The configuration settings of each of the identity providers used to * configure ContainerApp Service Authentication/Authorization. - * + * * @param identityProviders the identityProviders value to set. * @return the AuthConfigInner object itself. */ @@ -129,7 +134,7 @@ public AuthConfigInner withIdentityProviders(IdentityProviders identityProviders /** * Get the login property: The configuration settings of the login flow of users using ContainerApp Service * Authentication/Authorization. - * + * * @return the login value. */ public Login login() { @@ -139,7 +144,7 @@ public Login login() { /** * Set the login property: The configuration settings of the login flow of users using ContainerApp Service * Authentication/Authorization. - * + * * @param login the login value to set. * @return the AuthConfigInner object itself. */ @@ -154,7 +159,7 @@ public AuthConfigInner withLogin(Login login) { /** * Get the httpSettings property: The configuration settings of the HTTP requests for authentication and * authorization requests made against ContainerApp Service Authentication/Authorization. - * + * * @return the httpSettings value. */ public HttpSettings httpSettings() { @@ -164,7 +169,7 @@ public HttpSettings httpSettings() { /** * Set the httpSettings property: The configuration settings of the HTTP requests for authentication and * authorization requests made against ContainerApp Service Authentication/Authorization. - * + * * @param httpSettings the httpSettings value to set. * @return the AuthConfigInner object itself. */ @@ -176,9 +181,34 @@ public AuthConfigInner withHttpSettings(HttpSettings httpSettings) { return this; } + /** + * Get the encryptionSettings property: The configuration settings of the secrets references of encryption key and + * signing key for ContainerApp Service Authentication/Authorization. + * + * @return the encryptionSettings value. + */ + public EncryptionSettings encryptionSettings() { + return this.innerProperties() == null ? null : this.innerProperties().encryptionSettings(); + } + + /** + * Set the encryptionSettings property: The configuration settings of the secrets references of encryption key and + * signing key for ContainerApp Service Authentication/Authorization. + * + * @param encryptionSettings the encryptionSettings value to set. + * @return the AuthConfigInner object itself. + */ + public AuthConfigInner withEncryptionSettings(EncryptionSettings encryptionSettings) { + if (this.innerProperties() == null) { + this.innerProperties = new AuthConfigProperties(); + } + this.innerProperties().withEncryptionSettings(encryptionSettings); + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigProperties.java index 9562abcf1c1d..2dd5af9254bd 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigProperties.java @@ -6,13 +6,16 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.appcontainers.models.AuthPlatform; +import com.azure.resourcemanager.appcontainers.models.EncryptionSettings; 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.fasterxml.jackson.annotation.JsonProperty; -/** AuthConfig resource specific properties. */ +/** + * AuthConfig resource specific properties. + */ @Fluent public final class AuthConfigProperties { /* @@ -22,7 +25,7 @@ public final class AuthConfigProperties { private AuthPlatform platform; /* - * The configuration settings that determines the validation flow of users using Service + * The configuration settings that determines the validation flow of users using Service * Authentication/Authorization. */ @JsonProperty(value = "globalValidation") @@ -48,14 +51,23 @@ public final class AuthConfigProperties { @JsonProperty(value = "httpSettings") private HttpSettings httpSettings; - /** Creates an instance of AuthConfigProperties class. */ + /* + * The configuration settings of the secrets references of encryption key and signing key for ContainerApp Service + * Authentication/Authorization. + */ + @JsonProperty(value = "encryptionSettings") + private EncryptionSettings encryptionSettings; + + /** + * Creates an instance of AuthConfigProperties class. + */ public AuthConfigProperties() { } /** * Get the platform property: The configuration settings of the platform of ContainerApp Service * Authentication/Authorization. - * + * * @return the platform value. */ public AuthPlatform platform() { @@ -65,7 +77,7 @@ public AuthPlatform platform() { /** * Set the platform property: The configuration settings of the platform of ContainerApp Service * Authentication/Authorization. - * + * * @param platform the platform value to set. * @return the AuthConfigProperties object itself. */ @@ -77,7 +89,7 @@ public AuthConfigProperties withPlatform(AuthPlatform platform) { /** * Get the globalValidation property: The configuration settings that determines the validation flow of users using * Service Authentication/Authorization. - * + * * @return the globalValidation value. */ public GlobalValidation globalValidation() { @@ -87,7 +99,7 @@ public GlobalValidation globalValidation() { /** * Set the globalValidation property: The configuration settings that determines the validation flow of users using * Service Authentication/Authorization. - * + * * @param globalValidation the globalValidation value to set. * @return the AuthConfigProperties object itself. */ @@ -99,7 +111,7 @@ public AuthConfigProperties withGlobalValidation(GlobalValidation globalValidati /** * Get the identityProviders property: The configuration settings of each of the identity providers used to * configure ContainerApp Service Authentication/Authorization. - * + * * @return the identityProviders value. */ public IdentityProviders identityProviders() { @@ -109,7 +121,7 @@ public IdentityProviders identityProviders() { /** * Set the identityProviders property: The configuration settings of each of the identity providers used to * configure ContainerApp Service Authentication/Authorization. - * + * * @param identityProviders the identityProviders value to set. * @return the AuthConfigProperties object itself. */ @@ -121,7 +133,7 @@ public AuthConfigProperties withIdentityProviders(IdentityProviders identityProv /** * Get the login property: The configuration settings of the login flow of users using ContainerApp Service * Authentication/Authorization. - * + * * @return the login value. */ public Login login() { @@ -131,7 +143,7 @@ public Login login() { /** * Set the login property: The configuration settings of the login flow of users using ContainerApp Service * Authentication/Authorization. - * + * * @param login the login value to set. * @return the AuthConfigProperties object itself. */ @@ -143,7 +155,7 @@ public AuthConfigProperties withLogin(Login login) { /** * Get the httpSettings property: The configuration settings of the HTTP requests for authentication and * authorization requests made against ContainerApp Service Authentication/Authorization. - * + * * @return the httpSettings value. */ public HttpSettings httpSettings() { @@ -153,7 +165,7 @@ public HttpSettings httpSettings() { /** * Set the httpSettings property: The configuration settings of the HTTP requests for authentication and * authorization requests made against ContainerApp Service Authentication/Authorization. - * + * * @param httpSettings the httpSettings value to set. * @return the AuthConfigProperties object itself. */ @@ -162,9 +174,31 @@ public AuthConfigProperties withHttpSettings(HttpSettings httpSettings) { return this; } + /** + * Get the encryptionSettings property: The configuration settings of the secrets references of encryption key and + * signing key for ContainerApp Service Authentication/Authorization. + * + * @return the encryptionSettings value. + */ + public EncryptionSettings encryptionSettings() { + return this.encryptionSettings; + } + + /** + * Set the encryptionSettings property: The configuration settings of the secrets references of encryption key and + * signing key for ContainerApp Service Authentication/Authorization. + * + * @param encryptionSettings the encryptionSettings value to set. + * @return the AuthConfigProperties object itself. + */ + public AuthConfigProperties withEncryptionSettings(EncryptionSettings encryptionSettings) { + this.encryptionSettings = encryptionSettings; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -183,5 +217,8 @@ public void validate() { if (httpSettings() != null) { httpSettings().validate(); } + if (encryptionSettings() != null) { + encryptionSettings().validate(); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AvailableWorkloadProfileInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AvailableWorkloadProfileInner.java index ad62df22ee74..6128ac450991 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AvailableWorkloadProfileInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AvailableWorkloadProfileInner.java @@ -6,10 +6,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** A workload profile with specific hardware configure to run container apps. */ +/** + * A workload profile with specific hardware configure to run container apps. + */ @Fluent public final class AvailableWorkloadProfileInner extends ProxyResource { /* @@ -24,13 +27,21 @@ public final class AvailableWorkloadProfileInner extends ProxyResource { @JsonProperty(value = "properties") private AvailableWorkloadProfileProperties properties; - /** Creates an instance of AvailableWorkloadProfileInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of AvailableWorkloadProfileInner class. + */ public AvailableWorkloadProfileInner() { } /** * Get the location property: Region of the workload profile. - * + * * @return the location value. */ public String location() { @@ -39,7 +50,7 @@ public String location() { /** * Set the location property: Region of the workload profile. - * + * * @param location the location value to set. * @return the AvailableWorkloadProfileInner object itself. */ @@ -50,7 +61,7 @@ public AvailableWorkloadProfileInner withLocation(String location) { /** * Get the properties property: Revision resource specific properties. - * + * * @return the properties value. */ public AvailableWorkloadProfileProperties properties() { @@ -59,7 +70,7 @@ public AvailableWorkloadProfileProperties properties() { /** * Set the properties property: Revision resource specific properties. - * + * * @param properties the properties value to set. * @return the AvailableWorkloadProfileInner object itself. */ @@ -68,9 +79,18 @@ public AvailableWorkloadProfileInner withProperties(AvailableWorkloadProfileProp return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BillingMeterCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BillingMeterCollectionInner.java index a6bb8d5efcdc..9508a6498f6e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BillingMeterCollectionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BillingMeterCollectionInner.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Collection of billing meters. */ +/** + * Collection of billing meters. + */ @Fluent public final class BillingMeterCollectionInner { /* @@ -19,13 +21,15 @@ public final class BillingMeterCollectionInner { @JsonProperty(value = "value", required = true) private List value; - /** Creates an instance of BillingMeterCollectionInner class. */ + /** + * Creates an instance of BillingMeterCollectionInner class. + */ public BillingMeterCollectionInner() { } /** * Get the value property: Collection of billing meters. - * + * * @return the value value. */ public List value() { @@ -34,7 +38,7 @@ public List value() { /** * Set the value property: Collection of billing meters. - * + * * @param value the value value to set. * @return the BillingMeterCollectionInner object itself. */ @@ -45,15 +49,13 @@ public BillingMeterCollectionInner withValue(List value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model BillingMeterCollectionInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model BillingMeterCollectionInner")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildProperties.java new file mode 100644 index 000000000000..3c9bb1a04b35 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildProperties.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.models.BuildConfiguration; +import com.azure.resourcemanager.appcontainers.models.BuildProvisioningState; +import com.azure.resourcemanager.appcontainers.models.BuildStatus; +import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The build properties. + */ +@Fluent +public final class BuildProperties { + /* + * Build provisioning state. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private BuildProvisioningState provisioningState; + + /* + * Status of the build once it has been provisioned. + */ + @JsonProperty(value = "buildStatus", access = JsonProperty.Access.WRITE_ONLY) + private BuildStatus buildStatus; + + /* + * Container registry that the final image will be uploaded to. + */ + @JsonProperty(value = "destinationContainerRegistry") + private ContainerRegistryWithCustomImage destinationContainerRegistry; + + /* + * Configuration of the build. + */ + @JsonProperty(value = "configuration") + private BuildConfiguration configuration; + + /* + * Endpoint to which the source code should be uploaded. + */ + @JsonProperty(value = "uploadEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String uploadEndpoint; + + /* + * Endpoint from which the build logs can be streamed. + */ + @JsonProperty(value = "logStreamEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String logStreamEndpoint; + + /* + * Endpoint to use to retrieve an authentication token for log streaming and uploading source code. + */ + @JsonProperty(value = "tokenEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String tokenEndpoint; + + /** + * Creates an instance of BuildProperties class. + */ + public BuildProperties() { + } + + /** + * Get the provisioningState property: Build provisioning state. + * + * @return the provisioningState value. + */ + public BuildProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the buildStatus property: Status of the build once it has been provisioned. + * + * @return the buildStatus value. + */ + public BuildStatus buildStatus() { + return this.buildStatus; + } + + /** + * Get the destinationContainerRegistry property: Container registry that the final image will be uploaded to. + * + * @return the destinationContainerRegistry value. + */ + public ContainerRegistryWithCustomImage destinationContainerRegistry() { + return this.destinationContainerRegistry; + } + + /** + * Set the destinationContainerRegistry property: Container registry that the final image will be uploaded to. + * + * @param destinationContainerRegistry the destinationContainerRegistry value to set. + * @return the BuildProperties object itself. + */ + public BuildProperties + withDestinationContainerRegistry(ContainerRegistryWithCustomImage destinationContainerRegistry) { + this.destinationContainerRegistry = destinationContainerRegistry; + return this; + } + + /** + * Get the configuration property: Configuration of the build. + * + * @return the configuration value. + */ + public BuildConfiguration configuration() { + return this.configuration; + } + + /** + * Set the configuration property: Configuration of the build. + * + * @param configuration the configuration value to set. + * @return the BuildProperties object itself. + */ + public BuildProperties withConfiguration(BuildConfiguration configuration) { + this.configuration = configuration; + return this; + } + + /** + * Get the uploadEndpoint property: Endpoint to which the source code should be uploaded. + * + * @return the uploadEndpoint value. + */ + public String uploadEndpoint() { + return this.uploadEndpoint; + } + + /** + * Get the logStreamEndpoint property: Endpoint from which the build logs can be streamed. + * + * @return the logStreamEndpoint value. + */ + public String logStreamEndpoint() { + return this.logStreamEndpoint; + } + + /** + * Get the tokenEndpoint property: Endpoint to use to retrieve an authentication token for log streaming and + * uploading source code. + * + * @return the tokenEndpoint value. + */ + public String tokenEndpoint() { + return this.tokenEndpoint; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (destinationContainerRegistry() != null) { + destinationContainerRegistry().validate(); + } + if (configuration() != null) { + configuration().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildResourceInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildResourceInner.java new file mode 100644 index 000000000000..8ce6df5eb20d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildResourceInner.java @@ -0,0 +1,160 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.models.BuildConfiguration; +import com.azure.resourcemanager.appcontainers.models.BuildProvisioningState; +import com.azure.resourcemanager.appcontainers.models.BuildStatus; +import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information pertaining to an individual build. + */ +@Fluent +public final class BuildResourceInner extends ProxyResource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private BuildProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of BuildResourceInner class. + */ + public BuildResourceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private BuildProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the provisioningState property: Build provisioning state. + * + * @return the provisioningState value. + */ + public BuildProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the buildStatus property: Status of the build once it has been provisioned. + * + * @return the buildStatus value. + */ + public BuildStatus buildStatus() { + return this.innerProperties() == null ? null : this.innerProperties().buildStatus(); + } + + /** + * Get the destinationContainerRegistry property: Container registry that the final image will be uploaded to. + * + * @return the destinationContainerRegistry value. + */ + public ContainerRegistryWithCustomImage destinationContainerRegistry() { + return this.innerProperties() == null ? null : this.innerProperties().destinationContainerRegistry(); + } + + /** + * Set the destinationContainerRegistry property: Container registry that the final image will be uploaded to. + * + * @param destinationContainerRegistry the destinationContainerRegistry value to set. + * @return the BuildResourceInner object itself. + */ + public BuildResourceInner + withDestinationContainerRegistry(ContainerRegistryWithCustomImage destinationContainerRegistry) { + if (this.innerProperties() == null) { + this.innerProperties = new BuildProperties(); + } + this.innerProperties().withDestinationContainerRegistry(destinationContainerRegistry); + return this; + } + + /** + * Get the configuration property: Configuration of the build. + * + * @return the configuration value. + */ + public BuildConfiguration configuration() { + return this.innerProperties() == null ? null : this.innerProperties().configuration(); + } + + /** + * Set the configuration property: Configuration of the build. + * + * @param configuration the configuration value to set. + * @return the BuildResourceInner object itself. + */ + public BuildResourceInner withConfiguration(BuildConfiguration configuration) { + if (this.innerProperties() == null) { + this.innerProperties = new BuildProperties(); + } + this.innerProperties().withConfiguration(configuration); + return this; + } + + /** + * Get the uploadEndpoint property: Endpoint to which the source code should be uploaded. + * + * @return the uploadEndpoint value. + */ + public String uploadEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().uploadEndpoint(); + } + + /** + * Get the logStreamEndpoint property: Endpoint from which the build logs can be streamed. + * + * @return the logStreamEndpoint value. + */ + public String logStreamEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().logStreamEndpoint(); + } + + /** + * Get the tokenEndpoint property: Endpoint to use to retrieve an authentication token for log streaming and + * uploading source code. + * + * @return the tokenEndpoint value. + */ + public String tokenEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().tokenEndpoint(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildTokenInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildTokenInner.java new file mode 100644 index 000000000000..8596ee973061 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuildTokenInner.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * Build Auth Token. + */ +@Immutable +public final class BuildTokenInner { + /* + * Authentication token. + */ + @JsonProperty(value = "token", access = JsonProperty.Access.WRITE_ONLY) + private String token; + + /* + * Token expiration date. + */ + @JsonProperty(value = "expires", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime expires; + + /** + * Creates an instance of BuildTokenInner class. + */ + public BuildTokenInner() { + } + + /** + * Get the token property: Authentication token. + * + * @return the token value. + */ + public String token() { + return this.token; + } + + /** + * Get the expires property: Token expiration date. + * + * @return the expires value. + */ + public OffsetDateTime expires() { + return this.expires; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderProperties.java new file mode 100644 index 000000000000..4004bc345160 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderProperties.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.models.BuilderProvisioningState; +import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The builder properties. + */ +@Fluent +public final class BuilderProperties { + /* + * Provisioning state of a builder resource. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private BuilderProvisioningState provisioningState; + + /* + * Resource ID of the container apps environment that the builder is associated with. + */ + @JsonProperty(value = "environmentId", required = true) + private String environmentId; + + /* + * List of mappings of container registries and the managed identity used to connect to it. + */ + @JsonProperty(value = "containerRegistries") + private List containerRegistries; + + /** + * Creates an instance of BuilderProperties class. + */ + public BuilderProperties() { + } + + /** + * Get the provisioningState property: Provisioning state of a builder resource. + * + * @return the provisioningState value. + */ + public BuilderProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the environmentId property: Resource ID of the container apps environment that the builder is associated + * with. + * + * @return the environmentId value. + */ + public String environmentId() { + return this.environmentId; + } + + /** + * Set the environmentId property: Resource ID of the container apps environment that the builder is associated + * with. + * + * @param environmentId the environmentId value to set. + * @return the BuilderProperties object itself. + */ + public BuilderProperties withEnvironmentId(String environmentId) { + this.environmentId = environmentId; + return this; + } + + /** + * Get the containerRegistries property: List of mappings of container registries and the managed identity used to + * connect to it. + * + * @return the containerRegistries value. + */ + public List containerRegistries() { + return this.containerRegistries; + } + + /** + * Set the containerRegistries property: List of mappings of container registries and the managed identity used to + * connect to it. + * + * @param containerRegistries the containerRegistries value to set. + * @return the BuilderProperties object itself. + */ + public BuilderProperties withContainerRegistries(List containerRegistries) { + this.containerRegistries = containerRegistries; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (environmentId() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property environmentId in model BuilderProperties")); + } + if (containerRegistries() != null) { + containerRegistries().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(BuilderProperties.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceInner.java new file mode 100644 index 000000000000..2d0f6e77c3e0 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceInner.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.models.BuilderProvisioningState; +import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** + * Information about the SourceToCloud builder resource. + */ +@Fluent +public final class BuilderResourceInner extends Resource { + /* + * The resource-specific properties for this resource. + */ + @JsonProperty(value = "properties") + private BuilderProperties innerProperties; + + /* + * The managed service identities assigned to this resource. + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of BuilderResourceInner class. + */ + public BuilderResourceInner() { + } + + /** + * Get the innerProperties property: The resource-specific properties for this resource. + * + * @return the innerProperties value. + */ + private BuilderProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the BuilderResourceInner object itself. + */ + public BuilderResourceInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * {@inheritDoc} + */ + @Override + public BuilderResourceInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** + * {@inheritDoc} + */ + @Override + public BuilderResourceInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of a builder resource. + * + * @return the provisioningState value. + */ + public BuilderProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the environmentId property: Resource ID of the container apps environment that the builder is associated + * with. + * + * @return the environmentId value. + */ + public String environmentId() { + return this.innerProperties() == null ? null : this.innerProperties().environmentId(); + } + + /** + * Set the environmentId property: Resource ID of the container apps environment that the builder is associated + * with. + * + * @param environmentId the environmentId value to set. + * @return the BuilderResourceInner object itself. + */ + public BuilderResourceInner withEnvironmentId(String environmentId) { + if (this.innerProperties() == null) { + this.innerProperties = new BuilderProperties(); + } + this.innerProperties().withEnvironmentId(environmentId); + return this; + } + + /** + * Get the containerRegistries property: List of mappings of container registries and the managed identity used to + * connect to it. + * + * @return the containerRegistries value. + */ + public List containerRegistries() { + return this.innerProperties() == null ? null : this.innerProperties().containerRegistries(); + } + + /** + * Set the containerRegistries property: List of mappings of container registries and the managed identity used to + * connect to it. + * + * @param containerRegistries the containerRegistries value to set. + * @return the BuilderResourceInner object itself. + */ + public BuilderResourceInner withContainerRegistries(List containerRegistries) { + if (this.innerProperties() == null) { + this.innerProperties = new BuilderProperties(); + } + this.innerProperties().withContainerRegistries(containerRegistries); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + if (identity() != null) { + identity().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceUpdateProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceUpdateProperties.java new file mode 100644 index 000000000000..8c94193aa04f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BuilderResourceUpdateProperties.java @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The updatable properties of the BuilderResource. + */ +@Fluent +public final class BuilderResourceUpdateProperties { + /* + * Resource ID of the container apps environment that the builder is associated with. + */ + @JsonProperty(value = "environmentId") + private String environmentId; + + /** + * Creates an instance of BuilderResourceUpdateProperties class. + */ + public BuilderResourceUpdateProperties() { + } + + /** + * Get the environmentId property: Resource ID of the container apps environment that the builder is associated + * with. + * + * @return the environmentId value. + */ + public String environmentId() { + return this.environmentId; + } + + /** + * Set the environmentId property: Resource ID of the container apps environment that the builder is associated + * with. + * + * @param environmentId the environmentId value to set. + * @return the BuilderResourceUpdateProperties object itself. + */ + public BuilderResourceUpdateProperties withEnvironmentId(String environmentId) { + this.environmentId = environmentId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CertificateInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CertificateInner.java index 49d78985bdcb..99659aa96409 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CertificateInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CertificateInner.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Certificate used for Custom Domain bindings of Container Apps in a Managed Environment. */ +/** + * Certificate used for Custom Domain bindings of Container Apps in a Managed Environment. + */ @Fluent public final class CertificateInner extends Resource { /* @@ -26,13 +28,15 @@ public final class CertificateInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of CertificateInner class. */ + /** + * Creates an instance of CertificateInner class. + */ public CertificateInner() { } /** * Get the properties property: Certificate resource specific properties. - * + * * @return the properties value. */ public CertificateProperties properties() { @@ -41,7 +45,7 @@ public CertificateProperties properties() { /** * Set the properties property: Certificate resource specific properties. - * + * * @param properties the properties value to set. * @return the CertificateInner object itself. */ @@ -52,21 +56,25 @@ public CertificateInner withProperties(CertificateProperties properties) { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CertificateInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public CertificateInner withTags(Map tags) { super.withTags(tags); @@ -75,7 +83,7 @@ public CertificateInner withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CheckNameAvailabilityResponseInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CheckNameAvailabilityResponseInner.java index 1d13506867f2..6e67b71c3fc5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CheckNameAvailabilityResponseInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CheckNameAvailabilityResponseInner.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReason; import com.fasterxml.jackson.annotation.JsonProperty; -/** The check availability result. */ +/** + * The check availability result. + */ @Fluent public final class CheckNameAvailabilityResponseInner { /* @@ -29,13 +31,15 @@ public final class CheckNameAvailabilityResponseInner { @JsonProperty(value = "message") private String message; - /** Creates an instance of CheckNameAvailabilityResponseInner class. */ + /** + * Creates an instance of CheckNameAvailabilityResponseInner class. + */ public CheckNameAvailabilityResponseInner() { } /** * Get the nameAvailable property: Indicates if the resource name is available. - * + * * @return the nameAvailable value. */ public Boolean nameAvailable() { @@ -44,7 +48,7 @@ public Boolean nameAvailable() { /** * Set the nameAvailable property: Indicates if the resource name is available. - * + * * @param nameAvailable the nameAvailable value to set. * @return the CheckNameAvailabilityResponseInner object itself. */ @@ -55,7 +59,7 @@ public CheckNameAvailabilityResponseInner withNameAvailable(Boolean nameAvailabl /** * Get the reason property: The reason why the given name is not available. - * + * * @return the reason value. */ public CheckNameAvailabilityReason reason() { @@ -64,7 +68,7 @@ public CheckNameAvailabilityReason reason() { /** * Set the reason property: The reason why the given name is not available. - * + * * @param reason the reason value to set. * @return the CheckNameAvailabilityResponseInner object itself. */ @@ -75,7 +79,7 @@ public CheckNameAvailabilityResponseInner withReason(CheckNameAvailabilityReason /** * Get the message property: Detailed reason why the given name is available. - * + * * @return the message value. */ public String message() { @@ -84,7 +88,7 @@ public String message() { /** * Set the message property: Detailed reason why the given name is available. - * + * * @param message the message value to set. * @return the CheckNameAvailabilityResponseInner object itself. */ @@ -95,7 +99,7 @@ public CheckNameAvailabilityResponseInner withMessage(String message) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentInner.java index e4892a69f389..79a0b8bbeb9d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentInner.java @@ -13,7 +13,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** An environment for Kubernetes cluster specialized for web workloads by Azure App Service. */ +/** + * An environment for Kubernetes cluster specialized for web workloads by Azure App Service. + */ @Fluent public final class ConnectedEnvironmentInner extends Resource { /* @@ -34,13 +36,15 @@ public final class ConnectedEnvironmentInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of ConnectedEnvironmentInner class. */ + /** + * Creates an instance of ConnectedEnvironmentInner class. + */ public ConnectedEnvironmentInner() { } /** * Get the extendedLocation property: The complex type of the extended location. - * + * * @return the extendedLocation value. */ public ExtendedLocation extendedLocation() { @@ -49,7 +53,7 @@ public ExtendedLocation extendedLocation() { /** * Set the extendedLocation property: The complex type of the extended location. - * + * * @param extendedLocation the extendedLocation value to set. * @return the ConnectedEnvironmentInner object itself. */ @@ -60,7 +64,7 @@ public ConnectedEnvironmentInner withExtendedLocation(ExtendedLocation extendedL /** * Get the innerProperties property: ConnectedEnvironment resource specific properties. - * + * * @return the innerProperties value. */ private ConnectedEnvironmentProperties innerProperties() { @@ -69,21 +73,25 @@ private ConnectedEnvironmentProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ConnectedEnvironmentInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ConnectedEnvironmentInner withTags(Map tags) { super.withTags(tags); @@ -92,7 +100,7 @@ public ConnectedEnvironmentInner withTags(Map tags) { /** * Get the provisioningState property: Provisioning state of the Kubernetes Environment. - * + * * @return the provisioningState value. */ public ConnectedEnvironmentProvisioningState provisioningState() { @@ -101,7 +109,7 @@ public ConnectedEnvironmentProvisioningState provisioningState() { /** * Get the deploymentErrors property: Any errors that occurred during deployment or deployment validation. - * + * * @return the deploymentErrors value. */ public String deploymentErrors() { @@ -110,7 +118,7 @@ public String deploymentErrors() { /** * Get the defaultDomain property: Default Domain Name for the cluster. - * + * * @return the defaultDomain value. */ public String defaultDomain() { @@ -119,7 +127,7 @@ public String defaultDomain() { /** * Get the staticIp property: Static IP of the connectedEnvironment. - * + * * @return the staticIp value. */ public String staticIp() { @@ -128,7 +136,7 @@ public String staticIp() { /** * Set the staticIp property: Static IP of the connectedEnvironment. - * + * * @param staticIp the staticIp value to set. * @return the ConnectedEnvironmentInner object itself. */ @@ -141,9 +149,9 @@ public ConnectedEnvironmentInner withStaticIp(String staticIp) { } /** - * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * + * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service + * to Service communication telemetry. + * * @return the daprAIConnectionString value. */ public String daprAIConnectionString() { @@ -151,9 +159,9 @@ public String daprAIConnectionString() { } /** - * Set the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * + * Set the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service + * to Service communication telemetry. + * * @param daprAIConnectionString the daprAIConnectionString value to set. * @return the ConnectedEnvironmentInner object itself. */ @@ -167,7 +175,7 @@ public ConnectedEnvironmentInner withDaprAIConnectionString(String daprAIConnect /** * Get the customDomainConfiguration property: Custom domain configuration for the environment. - * + * * @return the customDomainConfiguration value. */ public CustomDomainConfiguration customDomainConfiguration() { @@ -176,12 +184,12 @@ public CustomDomainConfiguration customDomainConfiguration() { /** * Set the customDomainConfiguration property: Custom domain configuration for the environment. - * + * * @param customDomainConfiguration the customDomainConfiguration value to set. * @return the ConnectedEnvironmentInner object itself. */ - public ConnectedEnvironmentInner withCustomDomainConfiguration( - CustomDomainConfiguration customDomainConfiguration) { + public ConnectedEnvironmentInner + withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration) { if (this.innerProperties() == null) { this.innerProperties = new ConnectedEnvironmentProperties(); } @@ -191,7 +199,7 @@ public ConnectedEnvironmentInner withCustomDomainConfiguration( /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentProperties.java index 28adb95807b1..f9eb45032dfc 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentProperties.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; import com.fasterxml.jackson.annotation.JsonProperty; -/** ConnectedEnvironment resource specific properties. */ +/** + * ConnectedEnvironment resource specific properties. + */ @Fluent public final class ConnectedEnvironmentProperties { /* @@ -48,13 +50,15 @@ public final class ConnectedEnvironmentProperties { @JsonProperty(value = "customDomainConfiguration") private CustomDomainConfiguration customDomainConfiguration; - /** Creates an instance of ConnectedEnvironmentProperties class. */ + /** + * Creates an instance of ConnectedEnvironmentProperties class. + */ public ConnectedEnvironmentProperties() { } /** * Get the provisioningState property: Provisioning state of the Kubernetes Environment. - * + * * @return the provisioningState value. */ public ConnectedEnvironmentProvisioningState provisioningState() { @@ -63,7 +67,7 @@ public ConnectedEnvironmentProvisioningState provisioningState() { /** * Get the deploymentErrors property: Any errors that occurred during deployment or deployment validation. - * + * * @return the deploymentErrors value. */ public String deploymentErrors() { @@ -72,7 +76,7 @@ public String deploymentErrors() { /** * Get the defaultDomain property: Default Domain Name for the cluster. - * + * * @return the defaultDomain value. */ public String defaultDomain() { @@ -81,7 +85,7 @@ public String defaultDomain() { /** * Get the staticIp property: Static IP of the connectedEnvironment. - * + * * @return the staticIp value. */ public String staticIp() { @@ -90,7 +94,7 @@ public String staticIp() { /** * Set the staticIp property: Static IP of the connectedEnvironment. - * + * * @param staticIp the staticIp value to set. * @return the ConnectedEnvironmentProperties object itself. */ @@ -100,9 +104,9 @@ public ConnectedEnvironmentProperties withStaticIp(String staticIp) { } /** - * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * + * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service + * to Service communication telemetry. + * * @return the daprAIConnectionString value. */ public String daprAIConnectionString() { @@ -110,9 +114,9 @@ public String daprAIConnectionString() { } /** - * Set the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * + * Set the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service + * to Service communication telemetry. + * * @param daprAIConnectionString the daprAIConnectionString value to set. * @return the ConnectedEnvironmentProperties object itself. */ @@ -123,7 +127,7 @@ public ConnectedEnvironmentProperties withDaprAIConnectionString(String daprAICo /** * Get the customDomainConfiguration property: Custom domain configuration for the environment. - * + * * @return the customDomainConfiguration value. */ public CustomDomainConfiguration customDomainConfiguration() { @@ -132,19 +136,19 @@ public CustomDomainConfiguration customDomainConfiguration() { /** * Set the customDomainConfiguration property: Custom domain configuration for the environment. - * + * * @param customDomainConfiguration the customDomainConfiguration value to set. * @return the ConnectedEnvironmentProperties object itself. */ - public ConnectedEnvironmentProperties withCustomDomainConfiguration( - CustomDomainConfiguration customDomainConfiguration) { + public ConnectedEnvironmentProperties + withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration) { this.customDomainConfiguration = customDomainConfiguration; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStorageInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStorageInner.java index 4114a1b4e732..0e97178c9c54 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStorageInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStorageInner.java @@ -6,10 +6,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorageProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** Storage resource for connectedEnvironment. */ +/** + * Storage resource for connectedEnvironment. + */ @Fluent public final class ConnectedEnvironmentStorageInner extends ProxyResource { /* @@ -18,13 +21,21 @@ public final class ConnectedEnvironmentStorageInner extends ProxyResource { @JsonProperty(value = "properties") private ConnectedEnvironmentStorageProperties properties; - /** Creates an instance of ConnectedEnvironmentStorageInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ConnectedEnvironmentStorageInner class. + */ public ConnectedEnvironmentStorageInner() { } /** * Get the properties property: Storage properties. - * + * * @return the properties value. */ public ConnectedEnvironmentStorageProperties properties() { @@ -33,7 +44,7 @@ public ConnectedEnvironmentStorageProperties properties() { /** * Set the properties property: Storage properties. - * + * * @param properties the properties value to set. * @return the ConnectedEnvironmentStorageInner object itself. */ @@ -42,9 +53,18 @@ public ConnectedEnvironmentStorageInner withProperties(ConnectedEnvironmentStora return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStoragesCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStoragesCollectionInner.java index f3fd1e14bfd0..53bca84c6d61 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStoragesCollectionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStoragesCollectionInner.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Collection of Storage for Environments. */ +/** + * Collection of Storage for Environments. + */ @Fluent public final class ConnectedEnvironmentStoragesCollectionInner { /* @@ -18,13 +20,15 @@ public final class ConnectedEnvironmentStoragesCollectionInner { @JsonProperty(value = "value", required = true) private List value; - /** Creates an instance of ConnectedEnvironmentStoragesCollectionInner class. */ + /** + * Creates an instance of ConnectedEnvironmentStoragesCollectionInner class. + */ public ConnectedEnvironmentStoragesCollectionInner() { } /** * Get the value property: Collection of storage resources. - * + * * @return the value value. */ public List value() { @@ -33,7 +37,7 @@ public List value() { /** * Set the value property: Collection of storage resources. - * + * * @param value the value value to set. * @return the ConnectedEnvironmentStoragesCollectionInner object itself. */ @@ -44,15 +48,13 @@ public ConnectedEnvironmentStoragesCollectionInner withValue(List e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenInner.java index 494939f8f2e6..e2661b263dd2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenInner.java @@ -11,7 +11,9 @@ import java.time.OffsetDateTime; import java.util.Map; -/** Container App Auth Token. */ +/** + * Container App Auth Token. + */ @Fluent public final class ContainerAppAuthTokenInner extends Resource { /* @@ -26,13 +28,15 @@ public final class ContainerAppAuthTokenInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of ContainerAppAuthTokenInner class. */ + /** + * Creates an instance of ContainerAppAuthTokenInner class. + */ public ContainerAppAuthTokenInner() { } /** * Get the innerProperties property: Container App auth token resource specific properties. - * + * * @return the innerProperties value. */ private ContainerAppAuthTokenProperties innerProperties() { @@ -41,21 +45,25 @@ private ContainerAppAuthTokenProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ContainerAppAuthTokenInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ContainerAppAuthTokenInner withTags(Map tags) { super.withTags(tags); @@ -64,7 +72,7 @@ public ContainerAppAuthTokenInner withTags(Map tags) { /** * Get the token property: Auth token value. - * + * * @return the token value. */ public String token() { @@ -73,7 +81,7 @@ public String token() { /** * Get the expires property: Token expiration date. - * + * * @return the expires value. */ public OffsetDateTime expires() { @@ -82,7 +90,7 @@ public OffsetDateTime expires() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenProperties.java index 18d85126be08..d37fd5424101 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenProperties.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Container App auth token resource specific properties. */ +/** + * Container App auth token resource specific properties. + */ @Immutable public final class ContainerAppAuthTokenProperties { /* @@ -23,13 +25,15 @@ public final class ContainerAppAuthTokenProperties { @JsonProperty(value = "expires", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime expires; - /** Creates an instance of ContainerAppAuthTokenProperties class. */ + /** + * Creates an instance of ContainerAppAuthTokenProperties class. + */ public ContainerAppAuthTokenProperties() { } /** * Get the token property: Auth token value. - * + * * @return the token value. */ public String token() { @@ -38,7 +42,7 @@ public String token() { /** * Get the expires property: Token expiration date. - * + * * @return the expires value. */ public OffsetDateTime expires() { @@ -47,7 +51,7 @@ public OffsetDateTime expires() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java index aa0e8dae7598..a51478dfb1d9 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 @@ -16,7 +16,9 @@ import java.util.List; import java.util.Map; -/** Container App. */ +/** + * Container App. + */ @Fluent public final class ContainerAppInner extends Resource { /* @@ -52,13 +54,15 @@ public final class ContainerAppInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of ContainerAppInner class. */ + /** + * Creates an instance of ContainerAppInner class. + */ public ContainerAppInner() { } /** * Get the extendedLocation property: The complex type of the extended location. - * + * * @return the extendedLocation value. */ public ExtendedLocation extendedLocation() { @@ -67,7 +71,7 @@ public ExtendedLocation extendedLocation() { /** * Set the extendedLocation property: The complex type of the extended location. - * + * * @param extendedLocation the extendedLocation value to set. * @return the ContainerAppInner object itself. */ @@ -77,9 +81,9 @@ public ContainerAppInner withExtendedLocation(ExtendedLocation extendedLocation) } /** - * Get the identity property: managed identities for the Container App to interact with other Azure services without - * maintaining any secrets or credentials in code. - * + * Get the identity property: managed identities for the Container App to interact with other Azure services + * without maintaining any secrets or credentials in code. + * * @return the identity value. */ public ManagedServiceIdentity identity() { @@ -87,9 +91,9 @@ public ManagedServiceIdentity identity() { } /** - * Set the identity property: managed identities for the Container App to interact with other Azure services without - * maintaining any secrets or credentials in code. - * + * Set the identity property: managed identities for the Container App to interact with other Azure services + * without maintaining any secrets or credentials in code. + * * @param identity the identity value to set. * @return the ContainerAppInner object itself. */ @@ -99,10 +103,10 @@ public ContainerAppInner withIdentity(ManagedServiceIdentity identity) { } /** - * Get the managedBy property: The fully qualified resource ID of the resource that manages this resource. Indicates - * if this resource is managed by another Azure resource. If this is present, complete mode deployment will not - * delete the resource if it is removed from the template since it is managed by another resource. - * + * Get the managedBy property: The fully qualified resource ID of the resource that manages this resource. + * Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment + * will not delete the resource if it is removed from the template since it is managed by another resource. + * * @return the managedBy value. */ public String managedBy() { @@ -110,10 +114,10 @@ public String managedBy() { } /** - * Set the managedBy property: The fully qualified resource ID of the resource that manages this resource. Indicates - * if this resource is managed by another Azure resource. If this is present, complete mode deployment will not - * delete the resource if it is removed from the template since it is managed by another resource. - * + * Set the managedBy property: The fully qualified resource ID of the resource that manages this resource. + * Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment + * will not delete the resource if it is removed from the template since it is managed by another resource. + * * @param managedBy the managedBy value to set. * @return the ContainerAppInner object itself. */ @@ -124,7 +128,7 @@ public ContainerAppInner withManagedBy(String managedBy) { /** * Get the innerProperties property: ContainerApp resource specific properties. - * + * * @return the innerProperties value. */ private ContainerAppProperties innerProperties() { @@ -133,21 +137,25 @@ private ContainerAppProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ContainerAppInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ContainerAppInner withTags(Map tags) { super.withTags(tags); @@ -156,7 +164,7 @@ public ContainerAppInner withTags(Map tags) { /** * Get the provisioningState property: Provisioning state of the Container App. - * + * * @return the provisioningState value. */ public ContainerAppProvisioningState provisioningState() { @@ -165,7 +173,7 @@ public ContainerAppProvisioningState provisioningState() { /** * Get the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment. - * + * * @return the managedEnvironmentId value. */ public String managedEnvironmentId() { @@ -174,7 +182,7 @@ public String managedEnvironmentId() { /** * Set the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment. - * + * * @param managedEnvironmentId the managedEnvironmentId value to set. * @return the ContainerAppInner object itself. */ @@ -188,7 +196,7 @@ public ContainerAppInner withManagedEnvironmentId(String managedEnvironmentId) { /** * Get the environmentId property: Resource ID of environment. - * + * * @return the environmentId value. */ public String environmentId() { @@ -197,7 +205,7 @@ public String environmentId() { /** * Set the environmentId property: Resource ID of environment. - * + * * @param environmentId the environmentId value to set. * @return the ContainerAppInner object itself. */ @@ -211,7 +219,7 @@ public ContainerAppInner withEnvironmentId(String environmentId) { /** * Get the workloadProfileName property: Workload profile name to pin for container app execution. - * + * * @return the workloadProfileName value. */ public String workloadProfileName() { @@ -220,7 +228,7 @@ public String workloadProfileName() { /** * Set the workloadProfileName property: Workload profile name to pin for container app execution. - * + * * @param workloadProfileName the workloadProfileName value to set. * @return the ContainerAppInner object itself. */ @@ -234,7 +242,7 @@ public ContainerAppInner withWorkloadProfileName(String workloadProfileName) { /** * Get the latestRevisionName property: Name of the latest revision of the Container App. - * + * * @return the latestRevisionName value. */ public String latestRevisionName() { @@ -243,7 +251,7 @@ public String latestRevisionName() { /** * Get the latestReadyRevisionName property: Name of the latest ready revision of the Container App. - * + * * @return the latestReadyRevisionName value. */ public String latestReadyRevisionName() { @@ -252,7 +260,7 @@ public String latestReadyRevisionName() { /** * Get the latestRevisionFqdn property: Fully Qualified Domain Name of the latest revision of the Container App. - * + * * @return the latestRevisionFqdn value. */ public String latestRevisionFqdn() { @@ -261,7 +269,7 @@ public String latestRevisionFqdn() { /** * Get the customDomainVerificationId property: Id used to verify domain name ownership. - * + * * @return the customDomainVerificationId value. */ public String customDomainVerificationId() { @@ -270,7 +278,7 @@ public String customDomainVerificationId() { /** * Get the configuration property: Non versioned Container App configuration properties. - * + * * @return the configuration value. */ public Configuration configuration() { @@ -279,7 +287,7 @@ public Configuration configuration() { /** * Set the configuration property: Non versioned Container App configuration properties. - * + * * @param configuration the configuration value to set. * @return the ContainerAppInner object itself. */ @@ -293,7 +301,7 @@ public ContainerAppInner withConfiguration(Configuration configuration) { /** * Get the template property: Container App versioned application definition. - * + * * @return the template value. */ public Template template() { @@ -302,7 +310,7 @@ public Template template() { /** * Set the template property: Container App versioned application definition. - * + * * @param template the template value to set. * @return the ContainerAppInner object itself. */ @@ -316,7 +324,7 @@ public ContainerAppInner withTemplate(Template template) { /** * Get the outboundIpAddresses property: Outbound IP Addresses for container app. - * + * * @return the outboundIpAddresses value. */ public List outboundIpAddresses() { @@ -325,7 +333,7 @@ public List outboundIpAddresses() { /** * Get the eventStreamEndpoint property: The endpoint of the eventstream of the container app. - * + * * @return the eventStreamEndpoint value. */ public String eventStreamEndpoint() { @@ -334,7 +342,7 @@ public String eventStreamEndpoint() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppJobExecutionsInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppJobExecutionsInner.java index 80a392e0d7c7..be02df97a4b8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppJobExecutionsInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppJobExecutionsInner.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Container App executions collection ARM resource. */ +/** + * Container App executions collection ARM resource. + */ @Fluent public final class ContainerAppJobExecutionsInner { /* @@ -24,13 +26,15 @@ public final class ContainerAppJobExecutionsInner { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ContainerAppJobExecutionsInner class. */ + /** + * Creates an instance of ContainerAppJobExecutionsInner class. + */ public ContainerAppJobExecutionsInner() { } /** * Get the value property: Collection of resources. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: Collection of resources. - * + * * @param value the value value to set. * @return the ContainerAppJobExecutionsInner object itself. */ @@ -50,7 +54,7 @@ public ContainerAppJobExecutionsInner withValue(List value) { /** * Get the nextLink property: Link to next page of resources. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,15 +63,13 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model ContainerAppJobExecutionsInner")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property value in model ContainerAppJobExecutionsInner")); } else { value().forEach(e -> e.validate()); } 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 1429f8f7e5f4..312d98bd745c 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 @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** ContainerApp resource specific properties. */ +/** + * ContainerApp resource specific properties. + */ @Fluent public final class ContainerAppProperties { /* @@ -86,13 +88,15 @@ public final class ContainerAppProperties { @JsonProperty(value = "eventStreamEndpoint", access = JsonProperty.Access.WRITE_ONLY) private String eventStreamEndpoint; - /** Creates an instance of ContainerAppProperties class. */ + /** + * Creates an instance of ContainerAppProperties class. + */ public ContainerAppProperties() { } /** * Get the provisioningState property: Provisioning state of the Container App. - * + * * @return the provisioningState value. */ public ContainerAppProvisioningState provisioningState() { @@ -101,7 +105,7 @@ public ContainerAppProvisioningState provisioningState() { /** * Get the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment. - * + * * @return the managedEnvironmentId value. */ public String managedEnvironmentId() { @@ -110,7 +114,7 @@ public String managedEnvironmentId() { /** * Set the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment. - * + * * @param managedEnvironmentId the managedEnvironmentId value to set. * @return the ContainerAppProperties object itself. */ @@ -121,7 +125,7 @@ public ContainerAppProperties withManagedEnvironmentId(String managedEnvironment /** * Get the environmentId property: Resource ID of environment. - * + * * @return the environmentId value. */ public String environmentId() { @@ -130,7 +134,7 @@ public String environmentId() { /** * Set the environmentId property: Resource ID of environment. - * + * * @param environmentId the environmentId value to set. * @return the ContainerAppProperties object itself. */ @@ -141,7 +145,7 @@ public ContainerAppProperties withEnvironmentId(String environmentId) { /** * Get the workloadProfileName property: Workload profile name to pin for container app execution. - * + * * @return the workloadProfileName value. */ public String workloadProfileName() { @@ -150,7 +154,7 @@ public String workloadProfileName() { /** * Set the workloadProfileName property: Workload profile name to pin for container app execution. - * + * * @param workloadProfileName the workloadProfileName value to set. * @return the ContainerAppProperties object itself. */ @@ -161,7 +165,7 @@ public ContainerAppProperties withWorkloadProfileName(String workloadProfileName /** * Get the latestRevisionName property: Name of the latest revision of the Container App. - * + * * @return the latestRevisionName value. */ public String latestRevisionName() { @@ -170,7 +174,7 @@ public String latestRevisionName() { /** * Get the latestReadyRevisionName property: Name of the latest ready revision of the Container App. - * + * * @return the latestReadyRevisionName value. */ public String latestReadyRevisionName() { @@ -179,7 +183,7 @@ public String latestReadyRevisionName() { /** * Get the latestRevisionFqdn property: Fully Qualified Domain Name of the latest revision of the Container App. - * + * * @return the latestRevisionFqdn value. */ public String latestRevisionFqdn() { @@ -188,7 +192,7 @@ public String latestRevisionFqdn() { /** * Get the customDomainVerificationId property: Id used to verify domain name ownership. - * + * * @return the customDomainVerificationId value. */ public String customDomainVerificationId() { @@ -197,7 +201,7 @@ public String customDomainVerificationId() { /** * Get the configuration property: Non versioned Container App configuration properties. - * + * * @return the configuration value. */ public Configuration configuration() { @@ -206,7 +210,7 @@ public Configuration configuration() { /** * Set the configuration property: Non versioned Container App configuration properties. - * + * * @param configuration the configuration value to set. * @return the ContainerAppProperties object itself. */ @@ -217,7 +221,7 @@ public ContainerAppProperties withConfiguration(Configuration configuration) { /** * Get the template property: Container App versioned application definition. - * + * * @return the template value. */ public Template template() { @@ -226,7 +230,7 @@ public Template template() { /** * Set the template property: Container App versioned application definition. - * + * * @param template the template value to set. * @return the ContainerAppProperties object itself. */ @@ -237,7 +241,7 @@ public ContainerAppProperties withTemplate(Template template) { /** * Get the outboundIpAddresses property: Outbound IP Addresses for container app. - * + * * @return the outboundIpAddresses value. */ public List outboundIpAddresses() { @@ -246,7 +250,7 @@ public List outboundIpAddresses() { /** * Get the eventStreamEndpoint property: The endpoint of the eventstream of the container app. - * + * * @return the eventStreamEndpoint value. */ public String eventStreamEndpoint() { @@ -255,7 +259,7 @@ public String eventStreamEndpoint() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultInner.java index 58e0b8275ae2..4f00be750b53 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultInner.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Custom domain analysis. */ +/** + * Custom domain analysis. + */ @Fluent public final class CustomHostnameAnalysisResultInner { /* @@ -87,13 +89,15 @@ public final class CustomHostnameAnalysisResultInner { @JsonProperty(value = "alternateTxtRecords") private List alternateTxtRecords; - /** Creates an instance of CustomHostnameAnalysisResultInner class. */ + /** + * Creates an instance of CustomHostnameAnalysisResultInner class. + */ public CustomHostnameAnalysisResultInner() { } /** * Get the hostname property: Host name that was analyzed. - * + * * @return the hostname value. */ public String hostname() { @@ -103,7 +107,7 @@ public String hostname() { /** * Get the isHostnameAlreadyVerified property: <code>true</code> if hostname is already verified; * otherwise, <code>false</code>. - * + * * @return the isHostnameAlreadyVerified value. */ public Boolean isHostnameAlreadyVerified() { @@ -112,7 +116,7 @@ public Boolean isHostnameAlreadyVerified() { /** * Get the customDomainVerificationTest property: DNS verification test result. - * + * * @return the customDomainVerificationTest value. */ public DnsVerificationTestResult customDomainVerificationTest() { @@ -121,7 +125,7 @@ public DnsVerificationTestResult customDomainVerificationTest() { /** * Get the customDomainVerificationFailureInfo property: Raw failure information if DNS verification fails. - * + * * @return the customDomainVerificationFailureInfo value. */ public CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo() { @@ -131,7 +135,7 @@ public CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo customDom /** * Get the hasConflictOnManagedEnvironment property: <code>true</code> if there is a conflict on the * Container App's managed environment; otherwise, <code>false</code>. - * + * * @return the hasConflictOnManagedEnvironment value. */ public Boolean hasConflictOnManagedEnvironment() { @@ -139,9 +143,9 @@ public Boolean hasConflictOnManagedEnvironment() { } /** - * Get the conflictWithEnvironmentCustomDomain property: <code>true</code> if there is a conflict on the - * Container App's managed environment level custom domain; otherwise, <code>false</code>. - * + * Get the conflictWithEnvironmentCustomDomain property: <code>true</code> if there is a conflict on + * the Container App's managed environment level custom domain; otherwise, <code>false</code>. + * * @return the conflictWithEnvironmentCustomDomain value. */ public Boolean conflictWithEnvironmentCustomDomain() { @@ -151,7 +155,7 @@ public Boolean conflictWithEnvironmentCustomDomain() { /** * Get the conflictingContainerAppResourceId property: Name of the conflicting Container App on the Managed * Environment if it's within the same subscription. - * + * * @return the conflictingContainerAppResourceId value. */ public String conflictingContainerAppResourceId() { @@ -160,7 +164,7 @@ public String conflictingContainerAppResourceId() { /** * Get the cNameRecords property: CName records visible for this hostname. - * + * * @return the cNameRecords value. */ public List cNameRecords() { @@ -169,7 +173,7 @@ public List cNameRecords() { /** * Set the cNameRecords property: CName records visible for this hostname. - * + * * @param cNameRecords the cNameRecords value to set. * @return the CustomHostnameAnalysisResultInner object itself. */ @@ -180,7 +184,7 @@ public CustomHostnameAnalysisResultInner withCNameRecords(List cNameReco /** * Get the txtRecords property: TXT records visible for this hostname. - * + * * @return the txtRecords value. */ public List txtRecords() { @@ -189,7 +193,7 @@ public List txtRecords() { /** * Set the txtRecords property: TXT records visible for this hostname. - * + * * @param txtRecords the txtRecords value to set. * @return the CustomHostnameAnalysisResultInner object itself. */ @@ -200,7 +204,7 @@ public CustomHostnameAnalysisResultInner withTxtRecords(List txtRecords) /** * Get the aRecords property: A records visible for this hostname. - * + * * @return the aRecords value. */ public List aRecords() { @@ -209,7 +213,7 @@ public List aRecords() { /** * Set the aRecords property: A records visible for this hostname. - * + * * @param aRecords the aRecords value to set. * @return the CustomHostnameAnalysisResultInner object itself. */ @@ -220,7 +224,7 @@ public CustomHostnameAnalysisResultInner withARecords(List aRecords) { /** * Get the alternateCNameRecords property: Alternate CName records visible for this hostname. - * + * * @return the alternateCNameRecords value. */ public List alternateCNameRecords() { @@ -229,7 +233,7 @@ public List alternateCNameRecords() { /** * Set the alternateCNameRecords property: Alternate CName records visible for this hostname. - * + * * @param alternateCNameRecords the alternateCNameRecords value to set. * @return the CustomHostnameAnalysisResultInner object itself. */ @@ -240,7 +244,7 @@ public CustomHostnameAnalysisResultInner withAlternateCNameRecords(List /** * Get the alternateTxtRecords property: Alternate TXT records visible for this hostname. - * + * * @return the alternateTxtRecords value. */ public List alternateTxtRecords() { @@ -249,7 +253,7 @@ public List alternateTxtRecords() { /** * Set the alternateTxtRecords property: Alternate TXT records visible for this hostname. - * + * * @param alternateTxtRecords the alternateTxtRecords value to set. * @return the CustomHostnameAnalysisResultInner object itself. */ @@ -260,7 +264,7 @@ public CustomHostnameAnalysisResultInner withAlternateTxtRecords(List al /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentInner.java index bb777312434d..a9dbee9bcb87 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentInner.java @@ -6,12 +6,16 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; import com.azure.resourcemanager.appcontainers.models.DaprMetadata; import com.azure.resourcemanager.appcontainers.models.Secret; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Dapr Component. */ +/** + * Dapr Component. + */ @Fluent public final class DaprComponentInner extends ProxyResource { /* @@ -20,22 +24,39 @@ public final class DaprComponentInner extends ProxyResource { @JsonProperty(value = "properties") private DaprComponentProperties innerProperties; - /** Creates an instance of DaprComponentInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of DaprComponentInner class. + */ public DaprComponentInner() { } /** * Get the innerProperties property: Dapr Component resource specific properties. - * + * * @return the innerProperties value. */ private DaprComponentProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the componentType property: Component type. - * + * * @return the componentType value. */ public String componentType() { @@ -44,7 +65,7 @@ public String componentType() { /** * Set the componentType property: Component type. - * + * * @param componentType the componentType value to set. * @return the DaprComponentInner object itself. */ @@ -58,7 +79,7 @@ public DaprComponentInner withComponentType(String componentType) { /** * Get the version property: Component version. - * + * * @return the version value. */ public String version() { @@ -67,7 +88,7 @@ public String version() { /** * Set the version property: Component version. - * + * * @param version the version value to set. * @return the DaprComponentInner object itself. */ @@ -81,7 +102,7 @@ public DaprComponentInner withVersion(String version) { /** * Get the ignoreErrors property: Boolean describing if the component errors are ignores. - * + * * @return the ignoreErrors value. */ public Boolean ignoreErrors() { @@ -90,7 +111,7 @@ public Boolean ignoreErrors() { /** * Set the ignoreErrors property: Boolean describing if the component errors are ignores. - * + * * @param ignoreErrors the ignoreErrors value to set. * @return the DaprComponentInner object itself. */ @@ -104,7 +125,7 @@ public DaprComponentInner withIgnoreErrors(Boolean ignoreErrors) { /** * Get the initTimeout property: Initialization timeout. - * + * * @return the initTimeout value. */ public String initTimeout() { @@ -113,7 +134,7 @@ public String initTimeout() { /** * Set the initTimeout property: Initialization timeout. - * + * * @param initTimeout the initTimeout value to set. * @return the DaprComponentInner object itself. */ @@ -127,7 +148,7 @@ public DaprComponentInner withInitTimeout(String initTimeout) { /** * Get the secrets property: Collection of secrets used by a Dapr component. - * + * * @return the secrets value. */ public List secrets() { @@ -136,7 +157,7 @@ public List secrets() { /** * Set the secrets property: Collection of secrets used by a Dapr component. - * + * * @param secrets the secrets value to set. * @return the DaprComponentInner object itself. */ @@ -150,7 +171,7 @@ public DaprComponentInner withSecrets(List secrets) { /** * Get the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. - * + * * @return the secretStoreComponent value. */ public String secretStoreComponent() { @@ -159,7 +180,7 @@ public String secretStoreComponent() { /** * Set the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. - * + * * @param secretStoreComponent the secretStoreComponent value to set. * @return the DaprComponentInner object itself. */ @@ -173,7 +194,7 @@ public DaprComponentInner withSecretStoreComponent(String secretStoreComponent) /** * Get the metadata property: Component metadata. - * + * * @return the metadata value. */ public List metadata() { @@ -182,7 +203,7 @@ public List metadata() { /** * Set the metadata property: Component metadata. - * + * * @param metadata the metadata value to set. * @return the DaprComponentInner object itself. */ @@ -196,7 +217,7 @@ public DaprComponentInner withMetadata(List metadata) { /** * Get the scopes property: Names of container apps that can use this Dapr component. - * + * * @return the scopes value. */ public List scopes() { @@ -205,7 +226,7 @@ public List scopes() { /** * Set the scopes property: Names of container apps that can use this Dapr component. - * + * * @param scopes the scopes value to set. * @return the DaprComponentInner object itself. */ @@ -217,9 +238,32 @@ public DaprComponentInner withScopes(List scopes) { return this; } + /** + * Get the serviceComponentBind property: List of container app services that are bound to the Dapr component. + * + * @return the serviceComponentBind value. + */ + public List serviceComponentBind() { + return this.innerProperties() == null ? null : this.innerProperties().serviceComponentBind(); + } + + /** + * Set the serviceComponentBind property: List of container app services that are bound to the Dapr component. + * + * @param serviceComponentBind the serviceComponentBind value to set. + * @return the DaprComponentInner object itself. + */ + public DaprComponentInner withServiceComponentBind(List serviceComponentBind) { + if (this.innerProperties() == null) { + this.innerProperties = new DaprComponentProperties(); + } + this.innerProperties().withServiceComponentBind(serviceComponentBind); + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java index 5ea576bbf740..dfe98a8c51d3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java @@ -5,12 +5,15 @@ package com.azure.resourcemanager.appcontainers.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; import com.azure.resourcemanager.appcontainers.models.DaprMetadata; import com.azure.resourcemanager.appcontainers.models.Secret; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Dapr Component resource specific properties. */ +/** + * Dapr Component resource specific properties. + */ @Fluent public final class DaprComponentProperties { /* @@ -61,13 +64,21 @@ public final class DaprComponentProperties { @JsonProperty(value = "scopes") private List scopes; - /** Creates an instance of DaprComponentProperties class. */ + /* + * List of container app services that are bound to the Dapr component + */ + @JsonProperty(value = "serviceComponentBind") + private List serviceComponentBind; + + /** + * Creates an instance of DaprComponentProperties class. + */ public DaprComponentProperties() { } /** * Get the componentType property: Component type. - * + * * @return the componentType value. */ public String componentType() { @@ -76,7 +87,7 @@ public String componentType() { /** * Set the componentType property: Component type. - * + * * @param componentType the componentType value to set. * @return the DaprComponentProperties object itself. */ @@ -87,7 +98,7 @@ public DaprComponentProperties withComponentType(String componentType) { /** * Get the version property: Component version. - * + * * @return the version value. */ public String version() { @@ -96,7 +107,7 @@ public String version() { /** * Set the version property: Component version. - * + * * @param version the version value to set. * @return the DaprComponentProperties object itself. */ @@ -107,7 +118,7 @@ public DaprComponentProperties withVersion(String version) { /** * Get the ignoreErrors property: Boolean describing if the component errors are ignores. - * + * * @return the ignoreErrors value. */ public Boolean ignoreErrors() { @@ -116,7 +127,7 @@ public Boolean ignoreErrors() { /** * Set the ignoreErrors property: Boolean describing if the component errors are ignores. - * + * * @param ignoreErrors the ignoreErrors value to set. * @return the DaprComponentProperties object itself. */ @@ -127,7 +138,7 @@ public DaprComponentProperties withIgnoreErrors(Boolean ignoreErrors) { /** * Get the initTimeout property: Initialization timeout. - * + * * @return the initTimeout value. */ public String initTimeout() { @@ -136,7 +147,7 @@ public String initTimeout() { /** * Set the initTimeout property: Initialization timeout. - * + * * @param initTimeout the initTimeout value to set. * @return the DaprComponentProperties object itself. */ @@ -147,7 +158,7 @@ public DaprComponentProperties withInitTimeout(String initTimeout) { /** * Get the secrets property: Collection of secrets used by a Dapr component. - * + * * @return the secrets value. */ public List secrets() { @@ -156,7 +167,7 @@ public List secrets() { /** * Set the secrets property: Collection of secrets used by a Dapr component. - * + * * @param secrets the secrets value to set. * @return the DaprComponentProperties object itself. */ @@ -167,7 +178,7 @@ public DaprComponentProperties withSecrets(List secrets) { /** * Get the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. - * + * * @return the secretStoreComponent value. */ public String secretStoreComponent() { @@ -176,7 +187,7 @@ public String secretStoreComponent() { /** * Set the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. - * + * * @param secretStoreComponent the secretStoreComponent value to set. * @return the DaprComponentProperties object itself. */ @@ -187,7 +198,7 @@ public DaprComponentProperties withSecretStoreComponent(String secretStoreCompon /** * Get the metadata property: Component metadata. - * + * * @return the metadata value. */ public List metadata() { @@ -196,7 +207,7 @@ public List metadata() { /** * Set the metadata property: Component metadata. - * + * * @param metadata the metadata value to set. * @return the DaprComponentProperties object itself. */ @@ -207,7 +218,7 @@ public DaprComponentProperties withMetadata(List metadata) { /** * Get the scopes property: Names of container apps that can use this Dapr component. - * + * * @return the scopes value. */ public List scopes() { @@ -216,7 +227,7 @@ public List scopes() { /** * Set the scopes property: Names of container apps that can use this Dapr component. - * + * * @param scopes the scopes value to set. * @return the DaprComponentProperties object itself. */ @@ -225,9 +236,29 @@ public DaprComponentProperties withScopes(List scopes) { return this; } + /** + * Get the serviceComponentBind property: List of container app services that are bound to the Dapr component. + * + * @return the serviceComponentBind value. + */ + public List serviceComponentBind() { + return this.serviceComponentBind; + } + + /** + * Set the serviceComponentBind property: List of container app services that are bound to the Dapr component. + * + * @param serviceComponentBind the serviceComponentBind value to set. + * @return the DaprComponentProperties object itself. + */ + public DaprComponentProperties withServiceComponentBind(List serviceComponentBind) { + this.serviceComponentBind = serviceComponentBind; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -237,5 +268,8 @@ public void validate() { if (metadata() != null) { metadata().forEach(e -> e.validate()); } + if (serviceComponentBind() != null) { + serviceComponentBind().forEach(e -> e.validate()); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentResiliencyPolicyInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentResiliencyPolicyInner.java new file mode 100644 index 000000000000..168e53580749 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentResiliencyPolicyInner.java @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Dapr Component Resiliency Policy. + */ +@Fluent +public final class DaprComponentResiliencyPolicyInner extends ProxyResource { + /* + * Dapr Component Resiliency Policy resource specific properties + */ + @JsonProperty(value = "properties") + private DaprComponentResiliencyPolicyProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of DaprComponentResiliencyPolicyInner class. + */ + public DaprComponentResiliencyPolicyInner() { + } + + /** + * Get the innerProperties property: Dapr Component Resiliency Policy resource specific properties. + * + * @return the innerProperties value. + */ + private DaprComponentResiliencyPolicyProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the inboundPolicy property: The optional inbound component resiliency policy configuration. + * + * @return the inboundPolicy value. + */ + public DaprComponentResiliencyPolicyConfiguration inboundPolicy() { + return this.innerProperties() == null ? null : this.innerProperties().inboundPolicy(); + } + + /** + * Set the inboundPolicy property: The optional inbound component resiliency policy configuration. + * + * @param inboundPolicy the inboundPolicy value to set. + * @return the DaprComponentResiliencyPolicyInner object itself. + */ + public DaprComponentResiliencyPolicyInner + withInboundPolicy(DaprComponentResiliencyPolicyConfiguration inboundPolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new DaprComponentResiliencyPolicyProperties(); + } + this.innerProperties().withInboundPolicy(inboundPolicy); + return this; + } + + /** + * Get the outboundPolicy property: The optional outbound component resiliency policy configuration. + * + * @return the outboundPolicy value. + */ + public DaprComponentResiliencyPolicyConfiguration outboundPolicy() { + return this.innerProperties() == null ? null : this.innerProperties().outboundPolicy(); + } + + /** + * Set the outboundPolicy property: The optional outbound component resiliency policy configuration. + * + * @param outboundPolicy the outboundPolicy value to set. + * @return the DaprComponentResiliencyPolicyInner object itself. + */ + public DaprComponentResiliencyPolicyInner + withOutboundPolicy(DaprComponentResiliencyPolicyConfiguration outboundPolicy) { + if (this.innerProperties() == null) { + this.innerProperties = new DaprComponentResiliencyPolicyProperties(); + } + this.innerProperties().withOutboundPolicy(outboundPolicy); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentResiliencyPolicyProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentResiliencyPolicyProperties.java new file mode 100644 index 000000000000..5dbc7f9b16a0 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentResiliencyPolicyProperties.java @@ -0,0 +1,89 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Dapr Component Resiliency Policy resource specific properties. + */ +@Fluent +public final class DaprComponentResiliencyPolicyProperties { + /* + * The optional inbound component resiliency policy configuration + */ + @JsonProperty(value = "inboundPolicy") + private DaprComponentResiliencyPolicyConfiguration inboundPolicy; + + /* + * The optional outbound component resiliency policy configuration + */ + @JsonProperty(value = "outboundPolicy") + private DaprComponentResiliencyPolicyConfiguration outboundPolicy; + + /** + * Creates an instance of DaprComponentResiliencyPolicyProperties class. + */ + public DaprComponentResiliencyPolicyProperties() { + } + + /** + * Get the inboundPolicy property: The optional inbound component resiliency policy configuration. + * + * @return the inboundPolicy value. + */ + public DaprComponentResiliencyPolicyConfiguration inboundPolicy() { + return this.inboundPolicy; + } + + /** + * Set the inboundPolicy property: The optional inbound component resiliency policy configuration. + * + * @param inboundPolicy the inboundPolicy value to set. + * @return the DaprComponentResiliencyPolicyProperties object itself. + */ + public DaprComponentResiliencyPolicyProperties + withInboundPolicy(DaprComponentResiliencyPolicyConfiguration inboundPolicy) { + this.inboundPolicy = inboundPolicy; + return this; + } + + /** + * Get the outboundPolicy property: The optional outbound component resiliency policy configuration. + * + * @return the outboundPolicy value. + */ + public DaprComponentResiliencyPolicyConfiguration outboundPolicy() { + return this.outboundPolicy; + } + + /** + * Set the outboundPolicy property: The optional outbound component resiliency policy configuration. + * + * @param outboundPolicy the outboundPolicy value to set. + * @return the DaprComponentResiliencyPolicyProperties object itself. + */ + public DaprComponentResiliencyPolicyProperties + withOutboundPolicy(DaprComponentResiliencyPolicyConfiguration outboundPolicy) { + this.outboundPolicy = outboundPolicy; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (inboundPolicy() != null) { + inboundPolicy().validate(); + } + if (outboundPolicy() != null) { + outboundPolicy().validate(); + } + } +} 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 72cdffb68801..4f4b9a166bde 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 @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Dapr component Secrets Collection for ListSecrets Action. */ +/** + * Dapr component Secrets Collection for ListSecrets Action. + */ @Fluent public final class DaprSecretsCollectionInner { /* @@ -19,13 +21,15 @@ public final class DaprSecretsCollectionInner { @JsonProperty(value = "value", required = true) private List value; - /** Creates an instance of DaprSecretsCollectionInner class. */ + /** + * Creates an instance of DaprSecretsCollectionInner class. + */ public DaprSecretsCollectionInner() { } /** * Get the value property: Collection of secrets used by a Dapr component. - * + * * @return the value value. */ public List value() { @@ -34,7 +38,7 @@ public List value() { /** * Set the value property: Collection of secrets used by a Dapr component. - * + * * @param value the value value to set. * @return the DaprSecretsCollectionInner object itself. */ @@ -45,15 +49,13 @@ public DaprSecretsCollectionInner withValue(List value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model DaprSecretsCollectionInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model DaprSecretsCollectionInner")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSubscriptionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSubscriptionInner.java new file mode 100644 index 000000000000..0939471b441f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSubscriptionInner.java @@ -0,0 +1,228 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; +import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** + * Dapr PubSub Event Subscription. + */ +@Fluent +public final class DaprSubscriptionInner extends ProxyResource { + /* + * Dapr PubSub Event Subscription resource specific properties + */ + @JsonProperty(value = "properties") + private DaprSubscriptionProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of DaprSubscriptionInner class. + */ + public DaprSubscriptionInner() { + } + + /** + * Get the innerProperties property: Dapr PubSub Event Subscription resource specific properties. + * + * @return the innerProperties value. + */ + private DaprSubscriptionProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the pubsubName property: Dapr PubSub component name. + * + * @return the pubsubName value. + */ + public String pubsubName() { + return this.innerProperties() == null ? null : this.innerProperties().pubsubName(); + } + + /** + * Set the pubsubName property: Dapr PubSub component name. + * + * @param pubsubName the pubsubName value to set. + * @return the DaprSubscriptionInner object itself. + */ + public DaprSubscriptionInner withPubsubName(String pubsubName) { + if (this.innerProperties() == null) { + this.innerProperties = new DaprSubscriptionProperties(); + } + this.innerProperties().withPubsubName(pubsubName); + return this; + } + + /** + * Get the topic property: Topic name. + * + * @return the topic value. + */ + public String topic() { + return this.innerProperties() == null ? null : this.innerProperties().topic(); + } + + /** + * Set the topic property: Topic name. + * + * @param topic the topic value to set. + * @return the DaprSubscriptionInner object itself. + */ + public DaprSubscriptionInner withTopic(String topic) { + if (this.innerProperties() == null) { + this.innerProperties = new DaprSubscriptionProperties(); + } + this.innerProperties().withTopic(topic); + return this; + } + + /** + * Get the deadLetterTopic property: Deadletter topic name. + * + * @return the deadLetterTopic value. + */ + public String deadLetterTopic() { + return this.innerProperties() == null ? null : this.innerProperties().deadLetterTopic(); + } + + /** + * Set the deadLetterTopic property: Deadletter topic name. + * + * @param deadLetterTopic the deadLetterTopic value to set. + * @return the DaprSubscriptionInner object itself. + */ + public DaprSubscriptionInner withDeadLetterTopic(String deadLetterTopic) { + if (this.innerProperties() == null) { + this.innerProperties = new DaprSubscriptionProperties(); + } + this.innerProperties().withDeadLetterTopic(deadLetterTopic); + return this; + } + + /** + * Get the routes property: Subscription routes. + * + * @return the routes value. + */ + public DaprSubscriptionRoutes routes() { + return this.innerProperties() == null ? null : this.innerProperties().routes(); + } + + /** + * Set the routes property: Subscription routes. + * + * @param routes the routes value to set. + * @return the DaprSubscriptionInner object itself. + */ + public DaprSubscriptionInner withRoutes(DaprSubscriptionRoutes routes) { + if (this.innerProperties() == null) { + this.innerProperties = new DaprSubscriptionProperties(); + } + this.innerProperties().withRoutes(routes); + return this; + } + + /** + * Get the scopes property: Application scopes to restrict the subscription to specific apps. + * + * @return the scopes value. + */ + public List scopes() { + return this.innerProperties() == null ? null : this.innerProperties().scopes(); + } + + /** + * Set the scopes property: Application scopes to restrict the subscription to specific apps. + * + * @param scopes the scopes value to set. + * @return the DaprSubscriptionInner object itself. + */ + public DaprSubscriptionInner withScopes(List scopes) { + if (this.innerProperties() == null) { + this.innerProperties = new DaprSubscriptionProperties(); + } + this.innerProperties().withScopes(scopes); + return this; + } + + /** + * Get the metadata property: Subscription metadata. + * + * @return the metadata value. + */ + public Map metadata() { + return this.innerProperties() == null ? null : this.innerProperties().metadata(); + } + + /** + * Set the metadata property: Subscription metadata. + * + * @param metadata the metadata value to set. + * @return the DaprSubscriptionInner object itself. + */ + public DaprSubscriptionInner withMetadata(Map metadata) { + if (this.innerProperties() == null) { + this.innerProperties = new DaprSubscriptionProperties(); + } + this.innerProperties().withMetadata(metadata); + return this; + } + + /** + * Get the bulkSubscribe property: Bulk subscription options. + * + * @return the bulkSubscribe value. + */ + public DaprSubscriptionBulkSubscribeOptions bulkSubscribe() { + return this.innerProperties() == null ? null : this.innerProperties().bulkSubscribe(); + } + + /** + * Set the bulkSubscribe property: Bulk subscription options. + * + * @param bulkSubscribe the bulkSubscribe value to set. + * @return the DaprSubscriptionInner object itself. + */ + public DaprSubscriptionInner withBulkSubscribe(DaprSubscriptionBulkSubscribeOptions bulkSubscribe) { + if (this.innerProperties() == null) { + this.innerProperties = new DaprSubscriptionProperties(); + } + this.innerProperties().withBulkSubscribe(bulkSubscribe); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSubscriptionProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSubscriptionProperties.java new file mode 100644 index 000000000000..c3fbb8bc0aa6 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSubscriptionProperties.java @@ -0,0 +1,222 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; +import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** + * Dapr PubSub Event Subscription resource specific properties. + */ +@Fluent +public final class DaprSubscriptionProperties { + /* + * Dapr PubSub component name + */ + @JsonProperty(value = "pubsubName") + private String pubsubName; + + /* + * Topic name + */ + @JsonProperty(value = "topic") + private String topic; + + /* + * Deadletter topic name + */ + @JsonProperty(value = "deadLetterTopic") + private String deadLetterTopic; + + /* + * Subscription routes + */ + @JsonProperty(value = "routes") + private DaprSubscriptionRoutes routes; + + /* + * Application scopes to restrict the subscription to specific apps. + */ + @JsonProperty(value = "scopes") + private List scopes; + + /* + * Subscription metadata + */ + @JsonProperty(value = "metadata") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map metadata; + + /* + * Bulk subscription options + */ + @JsonProperty(value = "bulkSubscribe") + private DaprSubscriptionBulkSubscribeOptions bulkSubscribe; + + /** + * Creates an instance of DaprSubscriptionProperties class. + */ + public DaprSubscriptionProperties() { + } + + /** + * Get the pubsubName property: Dapr PubSub component name. + * + * @return the pubsubName value. + */ + public String pubsubName() { + return this.pubsubName; + } + + /** + * Set the pubsubName property: Dapr PubSub component name. + * + * @param pubsubName the pubsubName value to set. + * @return the DaprSubscriptionProperties object itself. + */ + public DaprSubscriptionProperties withPubsubName(String pubsubName) { + this.pubsubName = pubsubName; + return this; + } + + /** + * Get the topic property: Topic name. + * + * @return the topic value. + */ + public String topic() { + return this.topic; + } + + /** + * Set the topic property: Topic name. + * + * @param topic the topic value to set. + * @return the DaprSubscriptionProperties object itself. + */ + public DaprSubscriptionProperties withTopic(String topic) { + this.topic = topic; + return this; + } + + /** + * Get the deadLetterTopic property: Deadletter topic name. + * + * @return the deadLetterTopic value. + */ + public String deadLetterTopic() { + return this.deadLetterTopic; + } + + /** + * Set the deadLetterTopic property: Deadletter topic name. + * + * @param deadLetterTopic the deadLetterTopic value to set. + * @return the DaprSubscriptionProperties object itself. + */ + public DaprSubscriptionProperties withDeadLetterTopic(String deadLetterTopic) { + this.deadLetterTopic = deadLetterTopic; + return this; + } + + /** + * Get the routes property: Subscription routes. + * + * @return the routes value. + */ + public DaprSubscriptionRoutes routes() { + return this.routes; + } + + /** + * Set the routes property: Subscription routes. + * + * @param routes the routes value to set. + * @return the DaprSubscriptionProperties object itself. + */ + public DaprSubscriptionProperties withRoutes(DaprSubscriptionRoutes routes) { + this.routes = routes; + return this; + } + + /** + * Get the scopes property: Application scopes to restrict the subscription to specific apps. + * + * @return the scopes value. + */ + public List scopes() { + return this.scopes; + } + + /** + * Set the scopes property: Application scopes to restrict the subscription to specific apps. + * + * @param scopes the scopes value to set. + * @return the DaprSubscriptionProperties object itself. + */ + public DaprSubscriptionProperties withScopes(List scopes) { + this.scopes = scopes; + return this; + } + + /** + * Get the metadata property: Subscription metadata. + * + * @return the metadata value. + */ + public Map metadata() { + return this.metadata; + } + + /** + * Set the metadata property: Subscription metadata. + * + * @param metadata the metadata value to set. + * @return the DaprSubscriptionProperties object itself. + */ + public DaprSubscriptionProperties withMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the bulkSubscribe property: Bulk subscription options. + * + * @return the bulkSubscribe value. + */ + public DaprSubscriptionBulkSubscribeOptions bulkSubscribe() { + return this.bulkSubscribe; + } + + /** + * Set the bulkSubscribe property: Bulk subscription options. + * + * @param bulkSubscribe the bulkSubscribe value to set. + * @return the DaprSubscriptionProperties object itself. + */ + public DaprSubscriptionProperties withBulkSubscribe(DaprSubscriptionBulkSubscribeOptions bulkSubscribe) { + this.bulkSubscribe = bulkSubscribe; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (routes() != null) { + routes().validate(); + } + if (bulkSubscribe() != null) { + bulkSubscribe().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsCollectionInner.java index 88c3ba58530a..3467b799bcbb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsCollectionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsCollectionInner.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Diagnostics data collection for a resource. */ +/** + * Diagnostics data collection for a resource. + */ @Fluent public final class DiagnosticsCollectionInner { /* @@ -24,13 +26,15 @@ public final class DiagnosticsCollectionInner { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of DiagnosticsCollectionInner class. */ + /** + * Creates an instance of DiagnosticsCollectionInner class. + */ public DiagnosticsCollectionInner() { } /** * Get the value property: Collection of diagnostic data. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: Collection of diagnostic data. - * + * * @param value the value value to set. * @return the DiagnosticsCollectionInner object itself. */ @@ -50,7 +54,7 @@ public DiagnosticsCollectionInner withValue(List value) { /** * Get the nextLink property: Link to next page of resources. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,15 +63,13 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model DiagnosticsCollectionInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model DiagnosticsCollectionInner")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsInner.java index 8bd178e635bb..7139bc06e6d9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsInner.java @@ -6,10 +6,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** Diagnostics data for a resource. */ +/** + * Diagnostics data for a resource. + */ @Fluent public final class DiagnosticsInner extends ProxyResource { /* @@ -18,13 +21,21 @@ public final class DiagnosticsInner extends ProxyResource { @JsonProperty(value = "properties") private DiagnosticsProperties properties; - /** Creates an instance of DiagnosticsInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of DiagnosticsInner class. + */ public DiagnosticsInner() { } /** * Get the properties property: Diagnostics resource specific properties. - * + * * @return the properties value. */ public DiagnosticsProperties properties() { @@ -33,7 +44,7 @@ public DiagnosticsProperties properties() { /** * Set the properties property: Diagnostics resource specific properties. - * + * * @param properties the properties value to set. * @return the DiagnosticsInner object itself. */ @@ -42,9 +53,18 @@ public DiagnosticsInner withProperties(DiagnosticsProperties properties) { return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DotNetComponentInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DotNetComponentInner.java new file mode 100644 index 000000000000..bd1d51f60534 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DotNetComponentInner.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; +import com.azure.resourcemanager.appcontainers.models.DotNetComponentProvisioningState; +import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; +import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * .NET Component. + */ +@Fluent +public final class DotNetComponentInner extends ProxyResource { + /* + * .NET Component resource specific properties + */ + @JsonProperty(value = "properties") + private DotNetComponentProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of DotNetComponentInner class. + */ + public DotNetComponentInner() { + } + + /** + * Get the innerProperties property: .NET Component resource specific properties. + * + * @return the innerProperties value. + */ + private DotNetComponentProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the componentType property: Type of the .NET Component. + * + * @return the componentType value. + */ + public DotNetComponentType componentType() { + return this.innerProperties() == null ? null : this.innerProperties().componentType(); + } + + /** + * Set the componentType property: Type of the .NET Component. + * + * @param componentType the componentType value to set. + * @return the DotNetComponentInner object itself. + */ + public DotNetComponentInner withComponentType(DotNetComponentType componentType) { + if (this.innerProperties() == null) { + this.innerProperties = new DotNetComponentProperties(); + } + this.innerProperties().withComponentType(componentType); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the .NET Component. + * + * @return the provisioningState value. + */ + public DotNetComponentProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the configurations property: List of .NET Components configuration properties. + * + * @return the configurations value. + */ + public List configurations() { + return this.innerProperties() == null ? null : this.innerProperties().configurations(); + } + + /** + * Set the configurations property: List of .NET Components configuration properties. + * + * @param configurations the configurations value to set. + * @return the DotNetComponentInner object itself. + */ + public DotNetComponentInner withConfigurations(List configurations) { + if (this.innerProperties() == null) { + this.innerProperties = new DotNetComponentProperties(); + } + this.innerProperties().withConfigurations(configurations); + return this; + } + + /** + * Get the serviceBinds property: List of .NET Components that are bound to the .NET component. + * + * @return the serviceBinds value. + */ + public List serviceBinds() { + return this.innerProperties() == null ? null : this.innerProperties().serviceBinds(); + } + + /** + * Set the serviceBinds property: List of .NET Components that are bound to the .NET component. + * + * @param serviceBinds the serviceBinds value to set. + * @return the DotNetComponentInner object itself. + */ + public DotNetComponentInner withServiceBinds(List serviceBinds) { + if (this.innerProperties() == null) { + this.innerProperties = new DotNetComponentProperties(); + } + this.innerProperties().withServiceBinds(serviceBinds); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DotNetComponentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DotNetComponentProperties.java new file mode 100644 index 000000000000..ca41f342548f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DotNetComponentProperties.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; +import com.azure.resourcemanager.appcontainers.models.DotNetComponentProvisioningState; +import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; +import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * .NET Component resource specific properties. + */ +@Fluent +public final class DotNetComponentProperties { + /* + * Type of the .NET Component. + */ + @JsonProperty(value = "componentType") + private DotNetComponentType componentType; + + /* + * Provisioning state of the .NET Component. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private DotNetComponentProvisioningState provisioningState; + + /* + * List of .NET Components configuration properties + */ + @JsonProperty(value = "configurations") + private List configurations; + + /* + * List of .NET Components that are bound to the .NET component + */ + @JsonProperty(value = "serviceBinds") + private List serviceBinds; + + /** + * Creates an instance of DotNetComponentProperties class. + */ + public DotNetComponentProperties() { + } + + /** + * Get the componentType property: Type of the .NET Component. + * + * @return the componentType value. + */ + public DotNetComponentType componentType() { + return this.componentType; + } + + /** + * Set the componentType property: Type of the .NET Component. + * + * @param componentType the componentType value to set. + * @return the DotNetComponentProperties object itself. + */ + public DotNetComponentProperties withComponentType(DotNetComponentType componentType) { + this.componentType = componentType; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the .NET Component. + * + * @return the provisioningState value. + */ + public DotNetComponentProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the configurations property: List of .NET Components configuration properties. + * + * @return the configurations value. + */ + public List configurations() { + return this.configurations; + } + + /** + * Set the configurations property: List of .NET Components configuration properties. + * + * @param configurations the configurations value to set. + * @return the DotNetComponentProperties object itself. + */ + public DotNetComponentProperties withConfigurations(List configurations) { + this.configurations = configurations; + return this; + } + + /** + * Get the serviceBinds property: List of .NET Components that are bound to the .NET component. + * + * @return the serviceBinds value. + */ + public List serviceBinds() { + return this.serviceBinds; + } + + /** + * Set the serviceBinds property: List of .NET Components that are bound to the .NET component. + * + * @param serviceBinds the serviceBinds value to set. + * @return the DotNetComponentProperties object itself. + */ + public DotNetComponentProperties withServiceBinds(List serviceBinds) { + this.serviceBinds = serviceBinds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (configurations() != null) { + configurations().forEach(e -> e.validate()); + } + if (serviceBinds() != null) { + serviceBinds().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenInner.java index d756ff5d716b..781f86102246 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenInner.java @@ -11,7 +11,9 @@ import java.time.OffsetDateTime; import java.util.Map; -/** Environment Auth Token. */ +/** + * Environment Auth Token. + */ @Fluent public final class EnvironmentAuthTokenInner extends Resource { /* @@ -26,13 +28,15 @@ public final class EnvironmentAuthTokenInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of EnvironmentAuthTokenInner class. */ + /** + * Creates an instance of EnvironmentAuthTokenInner class. + */ public EnvironmentAuthTokenInner() { } /** * Get the innerProperties property: Environment auth token resource specific properties. - * + * * @return the innerProperties value. */ private EnvironmentAuthTokenProperties innerProperties() { @@ -41,21 +45,25 @@ private EnvironmentAuthTokenProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public EnvironmentAuthTokenInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public EnvironmentAuthTokenInner withTags(Map tags) { super.withTags(tags); @@ -64,7 +72,7 @@ public EnvironmentAuthTokenInner withTags(Map tags) { /** * Get the token property: Auth token value. - * + * * @return the token value. */ public String token() { @@ -73,7 +81,7 @@ public String token() { /** * Get the expires property: Token expiration date. - * + * * @return the expires value. */ public OffsetDateTime expires() { @@ -82,7 +90,7 @@ public OffsetDateTime expires() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenProperties.java index 775e90da2e84..59ca82a463d3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenProperties.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Environment auth token resource specific properties. */ +/** + * Environment auth token resource specific properties. + */ @Immutable public final class EnvironmentAuthTokenProperties { /* @@ -23,13 +25,15 @@ public final class EnvironmentAuthTokenProperties { @JsonProperty(value = "expires", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime expires; - /** Creates an instance of EnvironmentAuthTokenProperties class. */ + /** + * Creates an instance of EnvironmentAuthTokenProperties class. + */ public EnvironmentAuthTokenProperties() { } /** * Get the token property: Auth token value. - * + * * @return the token value. */ public String token() { @@ -38,7 +42,7 @@ public String token() { /** * Get the expires property: Token expiration date. - * + * * @return the expires value. */ public OffsetDateTime expires() { @@ -47,7 +51,7 @@ public OffsetDateTime expires() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HeaderMatchMatch.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HeaderMatchMatch.java new file mode 100644 index 000000000000..29d7763f5187 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HeaderMatchMatch.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Type of match to perform. + */ +@Fluent +public final class HeaderMatchMatch { + /* + * Exact value of the header + */ + @JsonProperty(value = "exactMatch") + private String exactMatch; + + /* + * Prefix value of the header + */ + @JsonProperty(value = "prefixMatch") + private String prefixMatch; + + /* + * Suffix value of the header + */ + @JsonProperty(value = "suffixMatch") + private String suffixMatch; + + /* + * Regex value of the header + */ + @JsonProperty(value = "regexMatch") + private String regexMatch; + + /** + * Creates an instance of HeaderMatchMatch class. + */ + public HeaderMatchMatch() { + } + + /** + * Get the exactMatch property: Exact value of the header. + * + * @return the exactMatch value. + */ + public String exactMatch() { + return this.exactMatch; + } + + /** + * Set the exactMatch property: Exact value of the header. + * + * @param exactMatch the exactMatch value to set. + * @return the HeaderMatchMatch object itself. + */ + public HeaderMatchMatch withExactMatch(String exactMatch) { + this.exactMatch = exactMatch; + return this; + } + + /** + * Get the prefixMatch property: Prefix value of the header. + * + * @return the prefixMatch value. + */ + public String prefixMatch() { + return this.prefixMatch; + } + + /** + * Set the prefixMatch property: Prefix value of the header. + * + * @param prefixMatch the prefixMatch value to set. + * @return the HeaderMatchMatch object itself. + */ + public HeaderMatchMatch withPrefixMatch(String prefixMatch) { + this.prefixMatch = prefixMatch; + return this; + } + + /** + * Get the suffixMatch property: Suffix value of the header. + * + * @return the suffixMatch value. + */ + public String suffixMatch() { + return this.suffixMatch; + } + + /** + * Set the suffixMatch property: Suffix value of the header. + * + * @param suffixMatch the suffixMatch value to set. + * @return the HeaderMatchMatch object itself. + */ + public HeaderMatchMatch withSuffixMatch(String suffixMatch) { + this.suffixMatch = suffixMatch; + return this; + } + + /** + * Get the regexMatch property: Regex value of the header. + * + * @return the regexMatch value. + */ + public String regexMatch() { + return this.regexMatch; + } + + /** + * Set the regexMatch property: Regex value of the header. + * + * @param regexMatch the regexMatch value to set. + * @return the HeaderMatchMatch object itself. + */ + public HeaderMatchMatch withRegexMatch(String regexMatch) { + this.regexMatch = regexMatch; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HttpRetryPolicyMatches.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HttpRetryPolicyMatches.java new file mode 100644 index 000000000000..341adb4b7d7d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HttpRetryPolicyMatches.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.models.HeaderMatch; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Conditions that must be met for a request to be retried. + */ +@Fluent +public final class HttpRetryPolicyMatches { + /* + * Headers that must be present for a request to be retried + */ + @JsonProperty(value = "headers") + private List headers; + + /* + * Additional http status codes that can trigger a retry + */ + @JsonProperty(value = "httpStatusCodes") + private List httpStatusCodes; + + /* + * Errors that can trigger a retry + */ + @JsonProperty(value = "errors") + private List errors; + + /** + * Creates an instance of HttpRetryPolicyMatches class. + */ + public HttpRetryPolicyMatches() { + } + + /** + * Get the headers property: Headers that must be present for a request to be retried. + * + * @return the headers value. + */ + public List headers() { + return this.headers; + } + + /** + * Set the headers property: Headers that must be present for a request to be retried. + * + * @param headers the headers value to set. + * @return the HttpRetryPolicyMatches object itself. + */ + public HttpRetryPolicyMatches withHeaders(List headers) { + this.headers = headers; + return this; + } + + /** + * Get the httpStatusCodes property: Additional http status codes that can trigger a retry. + * + * @return the httpStatusCodes value. + */ + public List httpStatusCodes() { + return this.httpStatusCodes; + } + + /** + * Set the httpStatusCodes property: Additional http status codes that can trigger a retry. + * + * @param httpStatusCodes the httpStatusCodes value to set. + * @return the HttpRetryPolicyMatches object itself. + */ + public HttpRetryPolicyMatches withHttpStatusCodes(List httpStatusCodes) { + this.httpStatusCodes = httpStatusCodes; + return this; + } + + /** + * Get the errors property: Errors that can trigger a retry. + * + * @return the errors value. + */ + public List errors() { + return this.errors; + } + + /** + * Set the errors property: Errors that can trigger a retry. + * + * @param errors the errors value to set. + * @return the HttpRetryPolicyMatches object itself. + */ + public HttpRetryPolicyMatches withErrors(List errors) { + this.errors = errors; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (headers() != null) { + headers().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HttpRetryPolicyRetryBackOff.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HttpRetryPolicyRetryBackOff.java new file mode 100644 index 000000000000..a56702256e35 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/HttpRetryPolicyRetryBackOff.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Settings for retry backoff characteristics. + */ +@Fluent +public final class HttpRetryPolicyRetryBackOff { + /* + * Initial delay, in milliseconds, before retrying a request + */ + @JsonProperty(value = "initialDelayInMilliseconds") + private Long initialDelayInMilliseconds; + + /* + * Maximum interval, in milliseconds, between retries + */ + @JsonProperty(value = "maxIntervalInMilliseconds") + private Long maxIntervalInMilliseconds; + + /** + * Creates an instance of HttpRetryPolicyRetryBackOff class. + */ + public HttpRetryPolicyRetryBackOff() { + } + + /** + * Get the initialDelayInMilliseconds property: Initial delay, in milliseconds, before retrying a request. + * + * @return the initialDelayInMilliseconds value. + */ + public Long initialDelayInMilliseconds() { + return this.initialDelayInMilliseconds; + } + + /** + * Set the initialDelayInMilliseconds property: Initial delay, in milliseconds, before retrying a request. + * + * @param initialDelayInMilliseconds the initialDelayInMilliseconds value to set. + * @return the HttpRetryPolicyRetryBackOff object itself. + */ + public HttpRetryPolicyRetryBackOff withInitialDelayInMilliseconds(Long initialDelayInMilliseconds) { + this.initialDelayInMilliseconds = initialDelayInMilliseconds; + return this; + } + + /** + * Get the maxIntervalInMilliseconds property: Maximum interval, in milliseconds, between retries. + * + * @return the maxIntervalInMilliseconds value. + */ + public Long maxIntervalInMilliseconds() { + return this.maxIntervalInMilliseconds; + } + + /** + * Set the maxIntervalInMilliseconds property: Maximum interval, in milliseconds, between retries. + * + * @param maxIntervalInMilliseconds the maxIntervalInMilliseconds value to set. + * @return the HttpRetryPolicyRetryBackOff object itself. + */ + public HttpRetryPolicyRetryBackOff withMaxIntervalInMilliseconds(Long maxIntervalInMilliseconds) { + this.maxIntervalInMilliseconds = maxIntervalInMilliseconds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JavaComponentInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JavaComponentInner.java new file mode 100644 index 000000000000..cedf0eaf85e1 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JavaComponentInner.java @@ -0,0 +1,146 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; +import com.azure.resourcemanager.appcontainers.models.JavaComponentProvisioningState; +import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; +import com.azure.resourcemanager.appcontainers.models.JavaComponentType; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Java Component. + */ +@Fluent +public final class JavaComponentInner extends ProxyResource { + /* + * Java Component resource specific properties + */ + @JsonProperty(value = "properties") + private JavaComponentProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of JavaComponentInner class. + */ + public JavaComponentInner() { + } + + /** + * Get the innerProperties property: Java Component resource specific properties. + * + * @return the innerProperties value. + */ + private JavaComponentProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the componentType property: Type of the Java Component. + * + * @return the componentType value. + */ + public JavaComponentType componentType() { + return this.innerProperties() == null ? null : this.innerProperties().componentType(); + } + + /** + * Set the componentType property: Type of the Java Component. + * + * @param componentType the componentType value to set. + * @return the JavaComponentInner object itself. + */ + public JavaComponentInner withComponentType(JavaComponentType componentType) { + if (this.innerProperties() == null) { + this.innerProperties = new JavaComponentProperties(); + } + this.innerProperties().withComponentType(componentType); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the Java Component. + * + * @return the provisioningState value. + */ + public JavaComponentProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the configurations property: List of Java Components configuration properties. + * + * @return the configurations value. + */ + public List configurations() { + return this.innerProperties() == null ? null : this.innerProperties().configurations(); + } + + /** + * Set the configurations property: List of Java Components configuration properties. + * + * @param configurations the configurations value to set. + * @return the JavaComponentInner object itself. + */ + public JavaComponentInner withConfigurations(List configurations) { + if (this.innerProperties() == null) { + this.innerProperties = new JavaComponentProperties(); + } + this.innerProperties().withConfigurations(configurations); + return this; + } + + /** + * Get the serviceBinds property: List of Java Components that are bound to the Java component. + * + * @return the serviceBinds value. + */ + public List serviceBinds() { + return this.innerProperties() == null ? null : this.innerProperties().serviceBinds(); + } + + /** + * Set the serviceBinds property: List of Java Components that are bound to the Java component. + * + * @param serviceBinds the serviceBinds value to set. + * @return the JavaComponentInner object itself. + */ + public JavaComponentInner withServiceBinds(List serviceBinds) { + if (this.innerProperties() == null) { + this.innerProperties = new JavaComponentProperties(); + } + this.innerProperties().withServiceBinds(serviceBinds); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JavaComponentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JavaComponentProperties.java new file mode 100644 index 000000000000..7b0b5c56ad9e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JavaComponentProperties.java @@ -0,0 +1,132 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; +import com.azure.resourcemanager.appcontainers.models.JavaComponentProvisioningState; +import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; +import com.azure.resourcemanager.appcontainers.models.JavaComponentType; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Java Component resource specific properties. + */ +@Fluent +public final class JavaComponentProperties { + /* + * Type of the Java Component. + */ + @JsonProperty(value = "componentType") + private JavaComponentType componentType; + + /* + * Provisioning state of the Java Component. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private JavaComponentProvisioningState provisioningState; + + /* + * List of Java Components configuration properties + */ + @JsonProperty(value = "configurations") + private List configurations; + + /* + * List of Java Components that are bound to the Java component + */ + @JsonProperty(value = "serviceBinds") + private List serviceBinds; + + /** + * Creates an instance of JavaComponentProperties class. + */ + public JavaComponentProperties() { + } + + /** + * Get the componentType property: Type of the Java Component. + * + * @return the componentType value. + */ + public JavaComponentType componentType() { + return this.componentType; + } + + /** + * Set the componentType property: Type of the Java Component. + * + * @param componentType the componentType value to set. + * @return the JavaComponentProperties object itself. + */ + public JavaComponentProperties withComponentType(JavaComponentType componentType) { + this.componentType = componentType; + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the Java Component. + * + * @return the provisioningState value. + */ + public JavaComponentProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the configurations property: List of Java Components configuration properties. + * + * @return the configurations value. + */ + public List configurations() { + return this.configurations; + } + + /** + * Set the configurations property: List of Java Components configuration properties. + * + * @param configurations the configurations value to set. + * @return the JavaComponentProperties object itself. + */ + public JavaComponentProperties withConfigurations(List configurations) { + this.configurations = configurations; + return this; + } + + /** + * Get the serviceBinds property: List of Java Components that are bound to the Java component. + * + * @return the serviceBinds value. + */ + public List serviceBinds() { + return this.serviceBinds; + } + + /** + * Set the serviceBinds property: List of Java Components that are bound to the Java component. + * + * @param serviceBinds the serviceBinds value to set. + * @return the JavaComponentProperties object itself. + */ + public JavaComponentProperties withServiceBinds(List serviceBinds) { + this.serviceBinds = serviceBinds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (configurations() != null) { + configurations().forEach(e -> e.validate()); + } + if (serviceBinds() != null) { + serviceBinds().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionBaseInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionBaseInner.java index e8415f46c870..53a7de1913f8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionBaseInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionBaseInner.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Container App's Job execution name. */ +/** + * Container App's Job execution name. + */ @Fluent public final class JobExecutionBaseInner { /* @@ -22,13 +24,15 @@ public final class JobExecutionBaseInner { @JsonProperty(value = "id") private String id; - /** Creates an instance of JobExecutionBaseInner class. */ + /** + * Creates an instance of JobExecutionBaseInner class. + */ public JobExecutionBaseInner() { } /** * Get the name property: Job execution name. - * + * * @return the name value. */ public String name() { @@ -37,7 +41,7 @@ public String name() { /** * Set the name property: Job execution name. - * + * * @param name the name value to set. * @return the JobExecutionBaseInner object itself. */ @@ -48,7 +52,7 @@ public JobExecutionBaseInner withName(String name) { /** * Get the id property: Job execution Id. - * + * * @return the id value. */ public String id() { @@ -57,7 +61,7 @@ public String id() { /** * Set the id property: Job execution Id. - * + * * @param id the id value to set. * @return the JobExecutionBaseInner object itself. */ @@ -68,7 +72,7 @@ public JobExecutionBaseInner withId(String id) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionInner.java index dbebc66d46a4..d407d72fc16f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionInner.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Container Apps Job execution. */ +/** + * Container Apps Job execution. + */ @Fluent public final class JobExecutionInner { /* @@ -26,42 +28,26 @@ public final class JobExecutionInner { private String id; /* - * Job Type. + * Job execution type */ @JsonProperty(value = "type") private String type; /* - * Current running State of the job + * Container Apps Job execution specific properties. */ - @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) - private JobExecutionRunningState status; + @JsonProperty(value = "properties") + private JobExecutionProperties innerProperties; - /* - * Job execution start time. - */ - @JsonProperty(value = "startTime") - private OffsetDateTime startTime; - - /* - * Job execution end time. - */ - @JsonProperty(value = "endTime") - private OffsetDateTime endTime; - - /* - * Job's execution container. + /** + * Creates an instance of JobExecutionInner class. */ - @JsonProperty(value = "template") - private JobExecutionTemplate template; - - /** Creates an instance of JobExecutionInner class. */ public JobExecutionInner() { } /** * Get the name property: Job execution Name. - * + * * @return the name value. */ public String name() { @@ -70,7 +56,7 @@ public String name() { /** * Set the name property: Job execution Name. - * + * * @param name the name value to set. * @return the JobExecutionInner object itself. */ @@ -81,7 +67,7 @@ public JobExecutionInner withName(String name) { /** * Get the id property: Job execution Id. - * + * * @return the id value. */ public String id() { @@ -90,7 +76,7 @@ public String id() { /** * Set the id property: Job execution Id. - * + * * @param id the id value to set. * @return the JobExecutionInner object itself. */ @@ -100,8 +86,8 @@ public JobExecutionInner withId(String id) { } /** - * Get the type property: Job Type. - * + * Get the type property: Job execution type. + * * @return the type value. */ public String type() { @@ -109,8 +95,8 @@ public String type() { } /** - * Set the type property: Job Type. - * + * Set the type property: Job execution type. + * * @param type the type value to set. * @return the JobExecutionInner object itself. */ @@ -119,83 +105,101 @@ public JobExecutionInner withType(String type) { return this; } + /** + * Get the innerProperties property: Container Apps Job execution specific properties. + * + * @return the innerProperties value. + */ + private JobExecutionProperties innerProperties() { + return this.innerProperties; + } + /** * Get the status property: Current running State of the job. - * + * * @return the status value. */ public JobExecutionRunningState status() { - return this.status; + return this.innerProperties() == null ? null : this.innerProperties().status(); } /** * Get the startTime property: Job execution start time. - * + * * @return the startTime value. */ public OffsetDateTime startTime() { - return this.startTime; + return this.innerProperties() == null ? null : this.innerProperties().startTime(); } /** * Set the startTime property: Job execution start time. - * + * * @param startTime the startTime value to set. * @return the JobExecutionInner object itself. */ public JobExecutionInner withStartTime(OffsetDateTime startTime) { - this.startTime = startTime; + if (this.innerProperties() == null) { + this.innerProperties = new JobExecutionProperties(); + } + this.innerProperties().withStartTime(startTime); return this; } /** * Get the endTime property: Job execution end time. - * + * * @return the endTime value. */ public OffsetDateTime endTime() { - return this.endTime; + return this.innerProperties() == null ? null : this.innerProperties().endTime(); } /** * Set the endTime property: Job execution end time. - * + * * @param endTime the endTime value to set. * @return the JobExecutionInner object itself. */ public JobExecutionInner withEndTime(OffsetDateTime endTime) { - this.endTime = endTime; + if (this.innerProperties() == null) { + this.innerProperties = new JobExecutionProperties(); + } + this.innerProperties().withEndTime(endTime); return this; } /** * Get the template property: Job's execution container. - * + * * @return the template value. */ public JobExecutionTemplate template() { - return this.template; + return this.innerProperties() == null ? null : this.innerProperties().template(); } /** * Set the template property: Job's execution container. - * + * * @param template the template value to set. * @return the JobExecutionInner object itself. */ public JobExecutionInner withTemplate(JobExecutionTemplate template) { - this.template = template; + if (this.innerProperties() == null) { + this.innerProperties = new JobExecutionProperties(); + } + this.innerProperties().withTemplate(template); return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (template() != null) { - template().validate(); + if (innerProperties() != null) { + innerProperties().validate(); } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionProperties.java new file mode 100644 index 000000000000..38038116fad5 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobExecutionProperties.java @@ -0,0 +1,127 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.models.JobExecutionRunningState; +import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** + * Container Apps Job execution specific properties. + */ +@Fluent +public final class JobExecutionProperties { + /* + * Current running State of the job + */ + @JsonProperty(value = "status", access = JsonProperty.Access.WRITE_ONLY) + private JobExecutionRunningState status; + + /* + * Job execution start time. + */ + @JsonProperty(value = "startTime") + private OffsetDateTime startTime; + + /* + * Job execution end time. + */ + @JsonProperty(value = "endTime") + private OffsetDateTime endTime; + + /* + * Job's execution container. + */ + @JsonProperty(value = "template") + private JobExecutionTemplate template; + + /** + * Creates an instance of JobExecutionProperties class. + */ + public JobExecutionProperties() { + } + + /** + * Get the status property: Current running State of the job. + * + * @return the status value. + */ + public JobExecutionRunningState status() { + return this.status; + } + + /** + * Get the startTime property: Job execution start time. + * + * @return the startTime value. + */ + public OffsetDateTime startTime() { + return this.startTime; + } + + /** + * Set the startTime property: Job execution start time. + * + * @param startTime the startTime value to set. + * @return the JobExecutionProperties object itself. + */ + public JobExecutionProperties withStartTime(OffsetDateTime startTime) { + this.startTime = startTime; + return this; + } + + /** + * Get the endTime property: Job execution end time. + * + * @return the endTime value. + */ + public OffsetDateTime endTime() { + return this.endTime; + } + + /** + * Set the endTime property: Job execution end time. + * + * @param endTime the endTime value to set. + * @return the JobExecutionProperties object itself. + */ + public JobExecutionProperties withEndTime(OffsetDateTime endTime) { + this.endTime = endTime; + return this; + } + + /** + * Get the template property: Job's execution container. + * + * @return the template value. + */ + public JobExecutionTemplate template() { + return this.template; + } + + /** + * Set the template property: Job's execution container. + * + * @param template the template value to set. + * @return the JobExecutionProperties object itself. + */ + public JobExecutionProperties withTemplate(JobExecutionTemplate template) { + this.template = template; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (template() != null) { + template().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobInner.java index c8aa364ef3f4..1f480d8be425 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobInner.java @@ -7,6 +7,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; import com.azure.resourcemanager.appcontainers.models.JobConfiguration; import com.azure.resourcemanager.appcontainers.models.JobProvisioningState; import com.azure.resourcemanager.appcontainers.models.JobTemplate; @@ -15,9 +16,17 @@ import java.util.List; import java.util.Map; -/** Container App Job. */ +/** + * Container App Job. + */ @Fluent public final class JobInner extends Resource { + /* + * The complex type of the extended location. + */ + @JsonProperty(value = "extendedLocation") + private ExtendedLocation extendedLocation; + /* * Managed identities needed by a container app job to interact with other Azure services to not maintain any * secrets or credentials in code. @@ -37,14 +46,36 @@ public final class JobInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of JobInner class. */ + /** + * Creates an instance of JobInner class. + */ public JobInner() { } /** - * Get the identity property: Managed identities needed by a container app job to interact with other Azure services - * to not maintain any secrets or credentials in code. - * + * Get the extendedLocation property: The complex type of the extended location. + * + * @return the extendedLocation value. + */ + public ExtendedLocation extendedLocation() { + return this.extendedLocation; + } + + /** + * Set the extendedLocation property: The complex type of the extended location. + * + * @param extendedLocation the extendedLocation value to set. + * @return the JobInner object itself. + */ + public JobInner withExtendedLocation(ExtendedLocation extendedLocation) { + this.extendedLocation = extendedLocation; + return this; + } + + /** + * Get the identity property: Managed identities needed by a container app job to interact with other Azure + * services to not maintain any secrets or credentials in code. + * * @return the identity value. */ public ManagedServiceIdentity identity() { @@ -52,9 +83,9 @@ public ManagedServiceIdentity identity() { } /** - * Set the identity property: Managed identities needed by a container app job to interact with other Azure services - * to not maintain any secrets or credentials in code. - * + * Set the identity property: Managed identities needed by a container app job to interact with other Azure + * services to not maintain any secrets or credentials in code. + * * @param identity the identity value to set. * @return the JobInner object itself. */ @@ -65,7 +96,7 @@ public JobInner withIdentity(ManagedServiceIdentity identity) { /** * Get the innerProperties property: Container Apps Job resource specific properties. - * + * * @return the innerProperties value. */ private JobProperties innerProperties() { @@ -74,21 +105,25 @@ private JobProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public JobInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public JobInner withTags(Map tags) { super.withTags(tags); @@ -97,7 +132,7 @@ public JobInner withTags(Map tags) { /** * Get the provisioningState property: Provisioning state of the Container Apps Job. - * + * * @return the provisioningState value. */ public JobProvisioningState provisioningState() { @@ -106,7 +141,7 @@ public JobProvisioningState provisioningState() { /** * Get the environmentId property: Resource ID of environment. - * + * * @return the environmentId value. */ public String environmentId() { @@ -115,7 +150,7 @@ public String environmentId() { /** * Set the environmentId property: Resource ID of environment. - * + * * @param environmentId the environmentId value to set. * @return the JobInner object itself. */ @@ -129,7 +164,7 @@ public JobInner withEnvironmentId(String environmentId) { /** * Get the workloadProfileName property: Workload profile name to pin for container apps job execution. - * + * * @return the workloadProfileName value. */ public String workloadProfileName() { @@ -138,7 +173,7 @@ public String workloadProfileName() { /** * Set the workloadProfileName property: Workload profile name to pin for container apps job execution. - * + * * @param workloadProfileName the workloadProfileName value to set. * @return the JobInner object itself. */ @@ -152,7 +187,7 @@ public JobInner withWorkloadProfileName(String workloadProfileName) { /** * Get the configuration property: Container Apps Job configuration properties. - * + * * @return the configuration value. */ public JobConfiguration configuration() { @@ -161,7 +196,7 @@ public JobConfiguration configuration() { /** * Set the configuration property: Container Apps Job configuration properties. - * + * * @param configuration the configuration value to set. * @return the JobInner object itself. */ @@ -175,7 +210,7 @@ public JobInner withConfiguration(JobConfiguration configuration) { /** * Get the template property: Container Apps job definition. - * + * * @return the template value. */ public JobTemplate template() { @@ -184,7 +219,7 @@ public JobTemplate template() { /** * Set the template property: Container Apps job definition. - * + * * @param template the template value to set. * @return the JobInner object itself. */ @@ -198,7 +233,7 @@ public JobInner withTemplate(JobTemplate template) { /** * Get the outboundIpAddresses property: Outbound IP Addresses of a container apps job. - * + * * @return the outboundIpAddresses value. */ public List outboundIpAddresses() { @@ -207,7 +242,7 @@ public List outboundIpAddresses() { /** * Get the eventStreamEndpoint property: The endpoint of the eventstream of the container apps job. - * + * * @return the eventStreamEndpoint value. */ public String eventStreamEndpoint() { @@ -216,10 +251,13 @@ public String eventStreamEndpoint() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (extendedLocation() != null) { + extendedLocation().validate(); + } if (identity() != null) { identity().validate(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobProperties.java index 7787e3d8147b..f1e4e6838a0a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobProperties.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Container Apps Job resource specific properties. */ +/** + * Container Apps Job resource specific properties. + */ @Fluent public final class JobProperties { /* @@ -56,13 +58,15 @@ public final class JobProperties { @JsonProperty(value = "eventStreamEndpoint", access = JsonProperty.Access.WRITE_ONLY) private String eventStreamEndpoint; - /** Creates an instance of JobProperties class. */ + /** + * Creates an instance of JobProperties class. + */ public JobProperties() { } /** * Get the provisioningState property: Provisioning state of the Container Apps Job. - * + * * @return the provisioningState value. */ public JobProvisioningState provisioningState() { @@ -71,7 +75,7 @@ public JobProvisioningState provisioningState() { /** * Get the environmentId property: Resource ID of environment. - * + * * @return the environmentId value. */ public String environmentId() { @@ -80,7 +84,7 @@ public String environmentId() { /** * Set the environmentId property: Resource ID of environment. - * + * * @param environmentId the environmentId value to set. * @return the JobProperties object itself. */ @@ -91,7 +95,7 @@ public JobProperties withEnvironmentId(String environmentId) { /** * Get the workloadProfileName property: Workload profile name to pin for container apps job execution. - * + * * @return the workloadProfileName value. */ public String workloadProfileName() { @@ -100,7 +104,7 @@ public String workloadProfileName() { /** * Set the workloadProfileName property: Workload profile name to pin for container apps job execution. - * + * * @param workloadProfileName the workloadProfileName value to set. * @return the JobProperties object itself. */ @@ -111,7 +115,7 @@ public JobProperties withWorkloadProfileName(String workloadProfileName) { /** * Get the configuration property: Container Apps Job configuration properties. - * + * * @return the configuration value. */ public JobConfiguration configuration() { @@ -120,7 +124,7 @@ public JobConfiguration configuration() { /** * Set the configuration property: Container Apps Job configuration properties. - * + * * @param configuration the configuration value to set. * @return the JobProperties object itself. */ @@ -131,7 +135,7 @@ public JobProperties withConfiguration(JobConfiguration configuration) { /** * Get the template property: Container Apps job definition. - * + * * @return the template value. */ public JobTemplate template() { @@ -140,7 +144,7 @@ public JobTemplate template() { /** * Set the template property: Container Apps job definition. - * + * * @param template the template value to set. * @return the JobProperties object itself. */ @@ -151,7 +155,7 @@ public JobProperties withTemplate(JobTemplate template) { /** * Get the outboundIpAddresses property: Outbound IP Addresses of a container apps job. - * + * * @return the outboundIpAddresses value. */ public List outboundIpAddresses() { @@ -160,7 +164,7 @@ public List outboundIpAddresses() { /** * Get the eventStreamEndpoint property: The endpoint of the eventstream of the container apps job. - * + * * @return the eventStreamEndpoint value. */ public String eventStreamEndpoint() { @@ -169,7 +173,7 @@ public String eventStreamEndpoint() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobSecretsCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobSecretsCollectionInner.java index 64d659c402ce..47707c7fade7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobSecretsCollectionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/JobSecretsCollectionInner.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Container Apps Job Secrets Collection ARM resource. */ +/** + * Container Apps Job Secrets Collection ARM resource. + */ @Fluent public final class JobSecretsCollectionInner { /* @@ -19,13 +21,15 @@ public final class JobSecretsCollectionInner { @JsonProperty(value = "value", required = true) private List value; - /** Creates an instance of JobSecretsCollectionInner class. */ + /** + * Creates an instance of JobSecretsCollectionInner class. + */ public JobSecretsCollectionInner() { } /** * Get the value property: Collection of resources. - * + * * @return the value value. */ public List value() { @@ -34,7 +38,7 @@ public List value() { /** * Set the value property: Collection of resources. - * + * * @param value the value value to set. * @return the JobSecretsCollectionInner object itself. */ @@ -45,14 +49,13 @@ public JobSecretsCollectionInner withValue(List value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model JobSecretsCollectionInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model JobSecretsCollectionInner")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedCertificateInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedCertificateInner.java index 4854ffb18f62..d9284752cbc7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedCertificateInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedCertificateInner.java @@ -11,7 +11,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment. */ +/** + * Managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment. + */ @Fluent public final class ManagedCertificateInner extends Resource { /* @@ -26,13 +28,15 @@ public final class ManagedCertificateInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of ManagedCertificateInner class. */ + /** + * Creates an instance of ManagedCertificateInner class. + */ public ManagedCertificateInner() { } /** * Get the properties property: Certificate resource specific properties. - * + * * @return the properties value. */ public ManagedCertificateProperties properties() { @@ -41,7 +45,7 @@ public ManagedCertificateProperties properties() { /** * Set the properties property: Certificate resource specific properties. - * + * * @param properties the properties value to set. * @return the ManagedCertificateInner object itself. */ @@ -52,21 +56,25 @@ public ManagedCertificateInner withProperties(ManagedCertificateProperties prope /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ManagedCertificateInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ManagedCertificateInner withTags(Map tags) { super.withTags(tags); @@ -75,7 +83,7 @@ public ManagedCertificateInner withTags(Map tags) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentInner.java index 897faf511a69..c31e5a5ee4f0 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 @@ -7,19 +7,24 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.models.AppInsightsConfiguration; import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; import com.azure.resourcemanager.appcontainers.models.DaprConfiguration; import com.azure.resourcemanager.appcontainers.models.EnvironmentProvisioningState; import com.azure.resourcemanager.appcontainers.models.KedaConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; import java.util.Map; -/** An environment for hosting container apps. */ +/** + * An environment for hosting container apps. + */ @Fluent public final class ManagedEnvironmentInner extends Resource { /* @@ -28,6 +33,13 @@ public final class ManagedEnvironmentInner extends Resource { @JsonProperty(value = "kind") private String kind; + /* + * Managed identities for the Managed Environment to interact with other Azure services without maintaining any + * secrets or credentials in code. + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + /* * Managed environment resource specific properties */ @@ -40,13 +52,15 @@ public final class ManagedEnvironmentInner extends Resource { @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; - /** Creates an instance of ManagedEnvironmentInner class. */ + /** + * Creates an instance of ManagedEnvironmentInner class. + */ public ManagedEnvironmentInner() { } /** * Get the kind property: Kind of the Environment. - * + * * @return the kind value. */ public String kind() { @@ -55,7 +69,7 @@ public String kind() { /** * Set the kind property: Kind of the Environment. - * + * * @param kind the kind value to set. * @return the ManagedEnvironmentInner object itself. */ @@ -64,9 +78,31 @@ public ManagedEnvironmentInner withKind(String kind) { return this; } + /** + * Get the identity property: Managed identities for the Managed Environment to interact with other Azure services + * without maintaining any secrets or credentials in code. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: Managed identities for the Managed Environment to interact with other Azure services + * without maintaining any secrets or credentials in code. + * + * @param identity the identity value to set. + * @return the ManagedEnvironmentInner object itself. + */ + public ManagedEnvironmentInner withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + /** * Get the innerProperties property: Managed environment resource specific properties. - * + * * @return the innerProperties value. */ private ManagedEnvironmentProperties innerProperties() { @@ -75,21 +111,25 @@ private ManagedEnvironmentProperties innerProperties() { /** * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ public SystemData systemData() { return this.systemData; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ManagedEnvironmentInner withLocation(String location) { super.withLocation(location); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public ManagedEnvironmentInner withTags(Map tags) { super.withTags(tags); @@ -98,7 +138,7 @@ public ManagedEnvironmentInner withTags(Map tags) { /** * Get the provisioningState property: Provisioning state of the Environment. - * + * * @return the provisioningState value. */ public EnvironmentProvisioningState provisioningState() { @@ -108,7 +148,7 @@ public EnvironmentProvisioningState provisioningState() { /** * Get the daprAIInstrumentationKey property: Azure Monitor instrumentation key used by Dapr to export Service to * Service communication telemetry. - * + * * @return the daprAIInstrumentationKey value. */ public String daprAIInstrumentationKey() { @@ -118,7 +158,7 @@ public String daprAIInstrumentationKey() { /** * Set the daprAIInstrumentationKey property: Azure Monitor instrumentation key used by Dapr to export Service to * Service communication telemetry. - * + * * @param daprAIInstrumentationKey the daprAIInstrumentationKey value to set. * @return the ManagedEnvironmentInner object itself. */ @@ -131,9 +171,9 @@ public ManagedEnvironmentInner withDaprAIInstrumentationKey(String daprAIInstrum } /** - * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * + * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service + * to Service communication telemetry. + * * @return the daprAIConnectionString value. */ public String daprAIConnectionString() { @@ -141,9 +181,9 @@ public String daprAIConnectionString() { } /** - * Set the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * + * Set the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service + * to Service communication telemetry. + * * @param daprAIConnectionString the daprAIConnectionString value to set. * @return the ManagedEnvironmentInner object itself. */ @@ -157,7 +197,7 @@ public ManagedEnvironmentInner withDaprAIConnectionString(String daprAIConnectio /** * Get the vnetConfiguration property: Vnet configuration for the environment. - * + * * @return the vnetConfiguration value. */ public VnetConfiguration vnetConfiguration() { @@ -166,7 +206,7 @@ public VnetConfiguration vnetConfiguration() { /** * Set the vnetConfiguration property: Vnet configuration for the environment. - * + * * @param vnetConfiguration the vnetConfiguration value to set. * @return the ManagedEnvironmentInner object itself. */ @@ -180,7 +220,7 @@ public ManagedEnvironmentInner withVnetConfiguration(VnetConfiguration vnetConfi /** * Get the deploymentErrors property: Any errors that occurred during deployment or deployment validation. - * + * * @return the deploymentErrors value. */ public String deploymentErrors() { @@ -189,7 +229,7 @@ public String deploymentErrors() { /** * Get the defaultDomain property: Default Domain Name for the cluster. - * + * * @return the defaultDomain value. */ public String defaultDomain() { @@ -198,7 +238,7 @@ public String defaultDomain() { /** * Get the staticIp property: Static IP of the Environment. - * + * * @return the staticIp value. */ public String staticIp() { @@ -206,9 +246,10 @@ public String staticIp() { } /** - * Get the appLogsConfiguration property: Cluster configuration which enables the log daemon to export app logs to a - * destination. Currently only "log-analytics" is supported. - * + * Get the appLogsConfiguration property: Cluster configuration which enables the log daemon to export + * app logs to a destination. Currently only "log-analytics" is + * supported. + * * @return the appLogsConfiguration value. */ public AppLogsConfiguration appLogsConfiguration() { @@ -216,9 +257,10 @@ public AppLogsConfiguration appLogsConfiguration() { } /** - * Set the appLogsConfiguration property: Cluster configuration which enables the log daemon to export app logs to a - * destination. Currently only "log-analytics" is supported. - * + * Set the appLogsConfiguration property: Cluster configuration which enables the log daemon to export + * app logs to a destination. Currently only "log-analytics" is + * supported. + * * @param appLogsConfiguration the appLogsConfiguration value to set. * @return the ManagedEnvironmentInner object itself. */ @@ -230,9 +272,56 @@ public ManagedEnvironmentInner withAppLogsConfiguration(AppLogsConfiguration app return this; } + /** + * Get the appInsightsConfiguration property: Environment level Application Insights configuration. + * + * @return the appInsightsConfiguration value. + */ + public AppInsightsConfiguration appInsightsConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().appInsightsConfiguration(); + } + + /** + * Set the appInsightsConfiguration property: Environment level Application Insights configuration. + * + * @param appInsightsConfiguration the appInsightsConfiguration value to set. + * @return the ManagedEnvironmentInner object itself. + */ + public ManagedEnvironmentInner withAppInsightsConfiguration(AppInsightsConfiguration appInsightsConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedEnvironmentProperties(); + } + this.innerProperties().withAppInsightsConfiguration(appInsightsConfiguration); + return this; + } + + /** + * Get the openTelemetryConfiguration property: Environment Open Telemetry configuration. + * + * @return the openTelemetryConfiguration value. + */ + public OpenTelemetryConfiguration openTelemetryConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().openTelemetryConfiguration(); + } + + /** + * Set the openTelemetryConfiguration property: Environment Open Telemetry configuration. + * + * @param openTelemetryConfiguration the openTelemetryConfiguration value to set. + * @return the ManagedEnvironmentInner object itself. + */ + public ManagedEnvironmentInner + withOpenTelemetryConfiguration(OpenTelemetryConfiguration openTelemetryConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedEnvironmentProperties(); + } + this.innerProperties().withOpenTelemetryConfiguration(openTelemetryConfiguration); + return this; + } + /** * Get the zoneRedundant property: Whether or not this Managed Environment is zone-redundant. - * + * * @return the zoneRedundant value. */ public Boolean zoneRedundant() { @@ -241,7 +330,7 @@ public Boolean zoneRedundant() { /** * Set the zoneRedundant property: Whether or not this Managed Environment is zone-redundant. - * + * * @param zoneRedundant the zoneRedundant value to set. * @return the ManagedEnvironmentInner object itself. */ @@ -255,7 +344,7 @@ public ManagedEnvironmentInner withZoneRedundant(Boolean zoneRedundant) { /** * Get the customDomainConfiguration property: Custom domain configuration for the environment. - * + * * @return the customDomainConfiguration value. */ public CustomDomainConfiguration customDomainConfiguration() { @@ -264,7 +353,7 @@ public CustomDomainConfiguration customDomainConfiguration() { /** * Set the customDomainConfiguration property: Custom domain configuration for the environment. - * + * * @param customDomainConfiguration the customDomainConfiguration value to set. * @return the ManagedEnvironmentInner object itself. */ @@ -278,7 +367,7 @@ public ManagedEnvironmentInner withCustomDomainConfiguration(CustomDomainConfigu /** * Get the eventStreamEndpoint property: The endpoint of the eventstream of the Environment. - * + * * @return the eventStreamEndpoint value. */ public String eventStreamEndpoint() { @@ -287,7 +376,7 @@ public String eventStreamEndpoint() { /** * Get the workloadProfiles property: Workload profiles configured for the Managed Environment. - * + * * @return the workloadProfiles value. */ public List workloadProfiles() { @@ -296,7 +385,7 @@ public List workloadProfiles() { /** * Set the workloadProfiles property: Workload profiles configured for the Managed Environment. - * + * * @param workloadProfiles the workloadProfiles value to set. * @return the ManagedEnvironmentInner object itself. */ @@ -310,7 +399,7 @@ public ManagedEnvironmentInner withWorkloadProfiles(List worklo /** * Get the kedaConfiguration property: The configuration of Keda component. - * + * * @return the kedaConfiguration value. */ public KedaConfiguration kedaConfiguration() { @@ -319,7 +408,7 @@ public KedaConfiguration kedaConfiguration() { /** * Set the kedaConfiguration property: The configuration of Keda component. - * + * * @param kedaConfiguration the kedaConfiguration value to set. * @return the ManagedEnvironmentInner object itself. */ @@ -333,7 +422,7 @@ public ManagedEnvironmentInner withKedaConfiguration(KedaConfiguration kedaConfi /** * Get the daprConfiguration property: The configuration of Dapr component. - * + * * @return the daprConfiguration value. */ public DaprConfiguration daprConfiguration() { @@ -342,7 +431,7 @@ public DaprConfiguration daprConfiguration() { /** * Set the daprConfiguration property: The configuration of Dapr component. - * + * * @param daprConfiguration the daprConfiguration value to set. * @return the ManagedEnvironmentInner object itself. */ @@ -355,10 +444,10 @@ public ManagedEnvironmentInner withDaprConfiguration(DaprConfiguration daprConfi } /** - * Get the infrastructureResourceGroup property: Name of the platform-managed resource group created for the Managed - * Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be created in - * the same subscription as the subnet. - * + * Get the infrastructureResourceGroup property: Name of the platform-managed resource group created for the + * Managed Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be + * created in the same subscription as the subnet. + * * @return the infrastructureResourceGroup value. */ public String infrastructureResourceGroup() { @@ -366,10 +455,10 @@ public String infrastructureResourceGroup() { } /** - * Set the infrastructureResourceGroup property: Name of the platform-managed resource group created for the Managed - * Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be created in - * the same subscription as the subnet. - * + * Set the infrastructureResourceGroup property: Name of the platform-managed resource group created for the + * Managed Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be + * created in the same subscription as the subnet. + * * @param infrastructureResourceGroup the infrastructureResourceGroup value to set. * @return the ManagedEnvironmentInner object itself. */ @@ -383,7 +472,7 @@ public ManagedEnvironmentInner withInfrastructureResourceGroup(String infrastruc /** * Get the peerAuthentication property: Peer authentication settings for the Managed Environment. - * + * * @return the peerAuthentication value. */ public ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication() { @@ -392,12 +481,12 @@ public ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication() { /** * Set the peerAuthentication property: Peer authentication settings for the Managed Environment. - * + * * @param peerAuthentication the peerAuthentication value to set. * @return the ManagedEnvironmentInner object itself. */ - public ManagedEnvironmentInner withPeerAuthentication( - ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication) { + public ManagedEnvironmentInner + withPeerAuthentication(ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication) { if (this.innerProperties() == null) { this.innerProperties = new ManagedEnvironmentProperties(); } @@ -407,10 +496,13 @@ public ManagedEnvironmentInner withPeerAuthentication( /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (identity() != null) { + identity().validate(); + } if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.java index f14479db3aa5..8cdc1ac40fbd 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.java @@ -5,18 +5,22 @@ package com.azure.resourcemanager.appcontainers.fluent.models; import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.models.AppInsightsConfiguration; import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; import com.azure.resourcemanager.appcontainers.models.DaprConfiguration; import com.azure.resourcemanager.appcontainers.models.EnvironmentProvisioningState; import com.azure.resourcemanager.appcontainers.models.KedaConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; +import com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Managed environment resource specific properties. */ +/** + * Managed environment resource specific properties. + */ @Fluent public final class ManagedEnvironmentProperties { /* @@ -69,6 +73,18 @@ public final class ManagedEnvironmentProperties { @JsonProperty(value = "appLogsConfiguration") private AppLogsConfiguration appLogsConfiguration; + /* + * Environment level Application Insights configuration + */ + @JsonProperty(value = "appInsightsConfiguration") + private AppInsightsConfiguration appInsightsConfiguration; + + /* + * Environment Open Telemetry configuration + */ + @JsonProperty(value = "openTelemetryConfiguration") + private OpenTelemetryConfiguration openTelemetryConfiguration; + /* * Whether or not this Managed Environment is zone-redundant. */ @@ -119,13 +135,15 @@ public final class ManagedEnvironmentProperties { @JsonProperty(value = "peerAuthentication") private ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication; - /** Creates an instance of ManagedEnvironmentProperties class. */ + /** + * Creates an instance of ManagedEnvironmentProperties class. + */ public ManagedEnvironmentProperties() { } /** * Get the provisioningState property: Provisioning state of the Environment. - * + * * @return the provisioningState value. */ public EnvironmentProvisioningState provisioningState() { @@ -135,7 +153,7 @@ public EnvironmentProvisioningState provisioningState() { /** * Get the daprAIInstrumentationKey property: Azure Monitor instrumentation key used by Dapr to export Service to * Service communication telemetry. - * + * * @return the daprAIInstrumentationKey value. */ public String daprAIInstrumentationKey() { @@ -145,7 +163,7 @@ public String daprAIInstrumentationKey() { /** * Set the daprAIInstrumentationKey property: Azure Monitor instrumentation key used by Dapr to export Service to * Service communication telemetry. - * + * * @param daprAIInstrumentationKey the daprAIInstrumentationKey value to set. * @return the ManagedEnvironmentProperties object itself. */ @@ -155,9 +173,9 @@ public ManagedEnvironmentProperties withDaprAIInstrumentationKey(String daprAIIn } /** - * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * + * Get the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service + * to Service communication telemetry. + * * @return the daprAIConnectionString value. */ public String daprAIConnectionString() { @@ -165,9 +183,9 @@ public String daprAIConnectionString() { } /** - * Set the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. - * + * Set the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service + * to Service communication telemetry. + * * @param daprAIConnectionString the daprAIConnectionString value to set. * @return the ManagedEnvironmentProperties object itself. */ @@ -178,7 +196,7 @@ public ManagedEnvironmentProperties withDaprAIConnectionString(String daprAIConn /** * Get the vnetConfiguration property: Vnet configuration for the environment. - * + * * @return the vnetConfiguration value. */ public VnetConfiguration vnetConfiguration() { @@ -187,7 +205,7 @@ public VnetConfiguration vnetConfiguration() { /** * Set the vnetConfiguration property: Vnet configuration for the environment. - * + * * @param vnetConfiguration the vnetConfiguration value to set. * @return the ManagedEnvironmentProperties object itself. */ @@ -198,7 +216,7 @@ public ManagedEnvironmentProperties withVnetConfiguration(VnetConfiguration vnet /** * Get the deploymentErrors property: Any errors that occurred during deployment or deployment validation. - * + * * @return the deploymentErrors value. */ public String deploymentErrors() { @@ -207,7 +225,7 @@ public String deploymentErrors() { /** * Get the defaultDomain property: Default Domain Name for the cluster. - * + * * @return the defaultDomain value. */ public String defaultDomain() { @@ -216,7 +234,7 @@ public String defaultDomain() { /** * Get the staticIp property: Static IP of the Environment. - * + * * @return the staticIp value. */ public String staticIp() { @@ -224,9 +242,10 @@ public String staticIp() { } /** - * Get the appLogsConfiguration property: Cluster configuration which enables the log daemon to export app logs to a - * destination. Currently only "log-analytics" is supported. - * + * Get the appLogsConfiguration property: Cluster configuration which enables the log daemon to export + * app logs to a destination. Currently only "log-analytics" is + * supported. + * * @return the appLogsConfiguration value. */ public AppLogsConfiguration appLogsConfiguration() { @@ -234,9 +253,10 @@ public AppLogsConfiguration appLogsConfiguration() { } /** - * Set the appLogsConfiguration property: Cluster configuration which enables the log daemon to export app logs to a - * destination. Currently only "log-analytics" is supported. - * + * Set the appLogsConfiguration property: Cluster configuration which enables the log daemon to export + * app logs to a destination. Currently only "log-analytics" is + * supported. + * * @param appLogsConfiguration the appLogsConfiguration value to set. * @return the ManagedEnvironmentProperties object itself. */ @@ -245,9 +265,51 @@ public ManagedEnvironmentProperties withAppLogsConfiguration(AppLogsConfiguratio return this; } + /** + * Get the appInsightsConfiguration property: Environment level Application Insights configuration. + * + * @return the appInsightsConfiguration value. + */ + public AppInsightsConfiguration appInsightsConfiguration() { + return this.appInsightsConfiguration; + } + + /** + * Set the appInsightsConfiguration property: Environment level Application Insights configuration. + * + * @param appInsightsConfiguration the appInsightsConfiguration value to set. + * @return the ManagedEnvironmentProperties object itself. + */ + public ManagedEnvironmentProperties + withAppInsightsConfiguration(AppInsightsConfiguration appInsightsConfiguration) { + this.appInsightsConfiguration = appInsightsConfiguration; + return this; + } + + /** + * Get the openTelemetryConfiguration property: Environment Open Telemetry configuration. + * + * @return the openTelemetryConfiguration value. + */ + public OpenTelemetryConfiguration openTelemetryConfiguration() { + return this.openTelemetryConfiguration; + } + + /** + * Set the openTelemetryConfiguration property: Environment Open Telemetry configuration. + * + * @param openTelemetryConfiguration the openTelemetryConfiguration value to set. + * @return the ManagedEnvironmentProperties object itself. + */ + public ManagedEnvironmentProperties + withOpenTelemetryConfiguration(OpenTelemetryConfiguration openTelemetryConfiguration) { + this.openTelemetryConfiguration = openTelemetryConfiguration; + return this; + } + /** * Get the zoneRedundant property: Whether or not this Managed Environment is zone-redundant. - * + * * @return the zoneRedundant value. */ public Boolean zoneRedundant() { @@ -256,7 +318,7 @@ public Boolean zoneRedundant() { /** * Set the zoneRedundant property: Whether or not this Managed Environment is zone-redundant. - * + * * @param zoneRedundant the zoneRedundant value to set. * @return the ManagedEnvironmentProperties object itself. */ @@ -267,7 +329,7 @@ public ManagedEnvironmentProperties withZoneRedundant(Boolean zoneRedundant) { /** * Get the customDomainConfiguration property: Custom domain configuration for the environment. - * + * * @return the customDomainConfiguration value. */ public CustomDomainConfiguration customDomainConfiguration() { @@ -276,19 +338,19 @@ public CustomDomainConfiguration customDomainConfiguration() { /** * Set the customDomainConfiguration property: Custom domain configuration for the environment. - * + * * @param customDomainConfiguration the customDomainConfiguration value to set. * @return the ManagedEnvironmentProperties object itself. */ - public ManagedEnvironmentProperties withCustomDomainConfiguration( - CustomDomainConfiguration customDomainConfiguration) { + public ManagedEnvironmentProperties + withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration) { this.customDomainConfiguration = customDomainConfiguration; return this; } /** * Get the eventStreamEndpoint property: The endpoint of the eventstream of the Environment. - * + * * @return the eventStreamEndpoint value. */ public String eventStreamEndpoint() { @@ -297,7 +359,7 @@ public String eventStreamEndpoint() { /** * Get the workloadProfiles property: Workload profiles configured for the Managed Environment. - * + * * @return the workloadProfiles value. */ public List workloadProfiles() { @@ -306,7 +368,7 @@ public List workloadProfiles() { /** * Set the workloadProfiles property: Workload profiles configured for the Managed Environment. - * + * * @param workloadProfiles the workloadProfiles value to set. * @return the ManagedEnvironmentProperties object itself. */ @@ -317,7 +379,7 @@ public ManagedEnvironmentProperties withWorkloadProfiles(List w /** * Get the kedaConfiguration property: The configuration of Keda component. - * + * * @return the kedaConfiguration value. */ public KedaConfiguration kedaConfiguration() { @@ -326,7 +388,7 @@ public KedaConfiguration kedaConfiguration() { /** * Set the kedaConfiguration property: The configuration of Keda component. - * + * * @param kedaConfiguration the kedaConfiguration value to set. * @return the ManagedEnvironmentProperties object itself. */ @@ -337,7 +399,7 @@ public ManagedEnvironmentProperties withKedaConfiguration(KedaConfiguration keda /** * Get the daprConfiguration property: The configuration of Dapr component. - * + * * @return the daprConfiguration value. */ public DaprConfiguration daprConfiguration() { @@ -346,7 +408,7 @@ public DaprConfiguration daprConfiguration() { /** * Set the daprConfiguration property: The configuration of Dapr component. - * + * * @param daprConfiguration the daprConfiguration value to set. * @return the ManagedEnvironmentProperties object itself. */ @@ -356,10 +418,10 @@ public ManagedEnvironmentProperties withDaprConfiguration(DaprConfiguration dapr } /** - * Get the infrastructureResourceGroup property: Name of the platform-managed resource group created for the Managed - * Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be created in - * the same subscription as the subnet. - * + * Get the infrastructureResourceGroup property: Name of the platform-managed resource group created for the + * Managed Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be + * created in the same subscription as the subnet. + * * @return the infrastructureResourceGroup value. */ public String infrastructureResourceGroup() { @@ -367,10 +429,10 @@ public String infrastructureResourceGroup() { } /** - * Set the infrastructureResourceGroup property: Name of the platform-managed resource group created for the Managed - * Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be created in - * the same subscription as the subnet. - * + * Set the infrastructureResourceGroup property: Name of the platform-managed resource group created for the + * Managed Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be + * created in the same subscription as the subnet. + * * @param infrastructureResourceGroup the infrastructureResourceGroup value to set. * @return the ManagedEnvironmentProperties object itself. */ @@ -381,7 +443,7 @@ public ManagedEnvironmentProperties withInfrastructureResourceGroup(String infra /** * Get the peerAuthentication property: Peer authentication settings for the Managed Environment. - * + * * @return the peerAuthentication value. */ public ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication() { @@ -390,19 +452,19 @@ public ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication() { /** * Set the peerAuthentication property: Peer authentication settings for the Managed Environment. - * + * * @param peerAuthentication the peerAuthentication value to set. * @return the ManagedEnvironmentProperties object itself. */ - public ManagedEnvironmentProperties withPeerAuthentication( - ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication) { + public ManagedEnvironmentProperties + withPeerAuthentication(ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication) { this.peerAuthentication = peerAuthentication; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -412,6 +474,12 @@ public void validate() { if (appLogsConfiguration() != null) { appLogsConfiguration().validate(); } + if (appInsightsConfiguration() != null) { + appInsightsConfiguration().validate(); + } + if (openTelemetryConfiguration() != null) { + openTelemetryConfiguration().validate(); + } if (customDomainConfiguration() != null) { customDomainConfiguration().validate(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStorageInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStorageInner.java index 5b01b9826d61..57742145165c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStorageInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStorageInner.java @@ -6,10 +6,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorageProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** Storage resource for managedEnvironment. */ +/** + * Storage resource for managedEnvironment. + */ @Fluent public final class ManagedEnvironmentStorageInner extends ProxyResource { /* @@ -18,13 +21,21 @@ public final class ManagedEnvironmentStorageInner extends ProxyResource { @JsonProperty(value = "properties") private ManagedEnvironmentStorageProperties properties; - /** Creates an instance of ManagedEnvironmentStorageInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ManagedEnvironmentStorageInner class. + */ public ManagedEnvironmentStorageInner() { } /** * Get the properties property: Storage properties. - * + * * @return the properties value. */ public ManagedEnvironmentStorageProperties properties() { @@ -33,7 +44,7 @@ public ManagedEnvironmentStorageProperties properties() { /** * Set the properties property: Storage properties. - * + * * @param properties the properties value to set. * @return the ManagedEnvironmentStorageInner object itself. */ @@ -42,9 +53,18 @@ public ManagedEnvironmentStorageInner withProperties(ManagedEnvironmentStoragePr return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStoragesCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStoragesCollectionInner.java index 620546ce1064..58a26bebfd69 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStoragesCollectionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStoragesCollectionInner.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Collection of Storage for Environments. */ +/** + * Collection of Storage for Environments. + */ @Fluent public final class ManagedEnvironmentStoragesCollectionInner { /* @@ -18,13 +20,15 @@ public final class ManagedEnvironmentStoragesCollectionInner { @JsonProperty(value = "value", required = true) private List value; - /** Creates an instance of ManagedEnvironmentStoragesCollectionInner class. */ + /** + * Creates an instance of ManagedEnvironmentStoragesCollectionInner class. + */ public ManagedEnvironmentStoragesCollectionInner() { } /** * Get the value property: Collection of storage resources. - * + * * @return the value value. */ public List value() { @@ -33,7 +37,7 @@ public List value() { /** * Set the value property: Collection of storage resources. - * + * * @param value the value value to set. * @return the ManagedEnvironmentStoragesCollectionInner object itself. */ @@ -44,15 +48,13 @@ public ManagedEnvironmentStoragesCollectionInner withValue(List e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/OperationDetailInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/OperationDetailInner.java index f4a5897a8ff9..da3d614ef163 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/OperationDetailInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/OperationDetailInner.java @@ -8,7 +8,9 @@ import com.azure.resourcemanager.appcontainers.models.OperationDisplay; import com.fasterxml.jackson.annotation.JsonProperty; -/** Operation detail payload. */ +/** + * Operation detail payload. + */ @Fluent public final class OperationDetailInner { /* @@ -35,13 +37,15 @@ public final class OperationDetailInner { @JsonProperty(value = "origin") private String origin; - /** Creates an instance of OperationDetailInner class. */ + /** + * Creates an instance of OperationDetailInner class. + */ public OperationDetailInner() { } /** * Get the name property: Name of the operation. - * + * * @return the name value. */ public String name() { @@ -50,7 +54,7 @@ public String name() { /** * Set the name property: Name of the operation. - * + * * @param name the name value to set. * @return the OperationDetailInner object itself. */ @@ -61,7 +65,7 @@ public OperationDetailInner withName(String name) { /** * Get the isDataAction property: Indicates whether the operation is a data action. - * + * * @return the isDataAction value. */ public Boolean isDataAction() { @@ -70,7 +74,7 @@ public Boolean isDataAction() { /** * Set the isDataAction property: Indicates whether the operation is a data action. - * + * * @param isDataAction the isDataAction value to set. * @return the OperationDetailInner object itself. */ @@ -81,7 +85,7 @@ public OperationDetailInner withIsDataAction(Boolean isDataAction) { /** * Get the display property: Display of the operation. - * + * * @return the display value. */ public OperationDisplay display() { @@ -90,7 +94,7 @@ public OperationDisplay display() { /** * Set the display property: Display of the operation. - * + * * @param display the display value to set. * @return the OperationDetailInner object itself. */ @@ -101,7 +105,7 @@ public OperationDetailInner withDisplay(OperationDisplay display) { /** * Get the origin property: Origin of the operation. - * + * * @return the origin value. */ public String origin() { @@ -110,7 +114,7 @@ public String origin() { /** * Set the origin property: Origin of the operation. - * + * * @param origin the origin value to set. * @return the OperationDetailInner object itself. */ @@ -121,7 +125,7 @@ public OperationDetailInner withOrigin(String origin) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaCollectionInner.java index 89aa52cf18ff..ef472cec5078 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaCollectionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaCollectionInner.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Container App Revision Replicas collection ARM resource. */ +/** + * Container App Revision Replicas collection ARM resource. + */ @Fluent public final class ReplicaCollectionInner { /* @@ -18,13 +20,15 @@ public final class ReplicaCollectionInner { @JsonProperty(value = "value", required = true) private List value; - /** Creates an instance of ReplicaCollectionInner class. */ + /** + * Creates an instance of ReplicaCollectionInner class. + */ public ReplicaCollectionInner() { } /** * Get the value property: Collection of resources. - * + * * @return the value value. */ public List value() { @@ -33,7 +37,7 @@ public List value() { /** * Set the value property: Collection of resources. - * + * * @param value the value value to set. * @return the ReplicaCollectionInner object itself. */ @@ -44,14 +48,13 @@ public ReplicaCollectionInner withValue(List value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model ReplicaCollectionInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model ReplicaCollectionInner")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaInner.java index 503299ffa44f..fb33c279dd3f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaInner.java @@ -6,13 +6,16 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.ContainerAppReplicaRunningState; import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; import java.util.List; -/** Container App Revision Replica. */ +/** + * Container App Revision Replica. + */ @Fluent public final class ReplicaInner extends ProxyResource { /* @@ -21,22 +24,39 @@ public final class ReplicaInner extends ProxyResource { @JsonProperty(value = "properties") private ReplicaProperties innerProperties; - /** Creates an instance of ReplicaInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of ReplicaInner class. + */ public ReplicaInner() { } /** * Get the innerProperties property: Replica resource specific properties. - * + * * @return the innerProperties value. */ private ReplicaProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the createdTime property: Timestamp describing when the pod was created by controller. - * + * * @return the createdTime value. */ public OffsetDateTime createdTime() { @@ -45,7 +65,7 @@ public OffsetDateTime createdTime() { /** * Get the runningState property: Current running state of the replica. - * + * * @return the runningState value. */ public ContainerAppReplicaRunningState runningState() { @@ -54,7 +74,7 @@ public ContainerAppReplicaRunningState runningState() { /** * Get the runningStateDetails property: The details of replica current running state. - * + * * @return the runningStateDetails value. */ public String runningStateDetails() { @@ -63,7 +83,7 @@ public String runningStateDetails() { /** * Get the containers property: The containers collection under a replica. - * + * * @return the containers value. */ public List containers() { @@ -72,7 +92,7 @@ public List containers() { /** * Set the containers property: The containers collection under a replica. - * + * * @param containers the containers value to set. * @return the ReplicaInner object itself. */ @@ -86,7 +106,7 @@ public ReplicaInner withContainers(List containers) { /** * Get the initContainers property: The init containers collection under a replica. - * + * * @return the initContainers value. */ public List initContainers() { @@ -95,7 +115,7 @@ public List initContainers() { /** * Set the initContainers property: The init containers collection under a replica. - * + * * @param initContainers the initContainers value to set. * @return the ReplicaInner object itself. */ @@ -109,7 +129,7 @@ public ReplicaInner withInitContainers(List initContainers) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaProperties.java index 0d3eed1784a7..68dfe31c056b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaProperties.java @@ -11,7 +11,9 @@ import java.time.OffsetDateTime; import java.util.List; -/** Replica resource specific properties. */ +/** + * Replica resource specific properties. + */ @Fluent public final class ReplicaProperties { /* @@ -44,13 +46,15 @@ public final class ReplicaProperties { @JsonProperty(value = "initContainers") private List initContainers; - /** Creates an instance of ReplicaProperties class. */ + /** + * Creates an instance of ReplicaProperties class. + */ public ReplicaProperties() { } /** * Get the createdTime property: Timestamp describing when the pod was created by controller. - * + * * @return the createdTime value. */ public OffsetDateTime createdTime() { @@ -59,7 +63,7 @@ public OffsetDateTime createdTime() { /** * Get the runningState property: Current running state of the replica. - * + * * @return the runningState value. */ public ContainerAppReplicaRunningState runningState() { @@ -68,7 +72,7 @@ public ContainerAppReplicaRunningState runningState() { /** * Get the runningStateDetails property: The details of replica current running state. - * + * * @return the runningStateDetails value. */ public String runningStateDetails() { @@ -77,7 +81,7 @@ public String runningStateDetails() { /** * Get the containers property: The containers collection under a replica. - * + * * @return the containers value. */ public List containers() { @@ -86,7 +90,7 @@ public List containers() { /** * Set the containers property: The containers collection under a replica. - * + * * @param containers the containers value to set. * @return the ReplicaProperties object itself. */ @@ -97,7 +101,7 @@ public ReplicaProperties withContainers(List containers) { /** * Get the initContainers property: The init containers collection under a replica. - * + * * @return the initContainers value. */ public List initContainers() { @@ -106,7 +110,7 @@ public List initContainers() { /** * Set the initContainers property: The init containers collection under a replica. - * + * * @param initContainers the initContainers value to set. * @return the ReplicaProperties object itself. */ @@ -117,7 +121,7 @@ public ReplicaProperties withInitContainers(List initContainer /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java index 178306f4e3f2..a5635ffbc21b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionInner.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.RevisionHealthState; import com.azure.resourcemanager.appcontainers.models.RevisionProvisioningState; import com.azure.resourcemanager.appcontainers.models.RevisionRunningState; @@ -13,7 +14,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Container App Revision. */ +/** + * Container App Revision. + */ @Immutable public final class RevisionInner extends ProxyResource { /* @@ -22,13 +25,21 @@ public final class RevisionInner extends ProxyResource { @JsonProperty(value = "properties") private RevisionProperties innerProperties; - /** Creates an instance of RevisionInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of RevisionInner class. + */ public RevisionInner() { } /** * Get the innerProperties property: Revision resource specific properties. - * + * * @return the innerProperties value. */ private RevisionProperties innerProperties() { @@ -36,8 +47,18 @@ private RevisionProperties innerProperties() { } /** - * Get the createdTime property: Timestamp describing when the revision was created by controller. - * + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Get the createdTime property: Timestamp describing when the revision was created + * by controller. + * * @return the createdTime value. */ public OffsetDateTime createdTime() { @@ -47,7 +68,7 @@ public OffsetDateTime createdTime() { /** * Get the lastActiveTime property: Timestamp describing when the revision was last active. Only meaningful when * revision is inactive. - * + * * @return the lastActiveTime value. */ public OffsetDateTime lastActiveTime() { @@ -56,7 +77,7 @@ public OffsetDateTime lastActiveTime() { /** * Get the fqdn property: Fully qualified domain name of the revision. - * + * * @return the fqdn value. */ public String fqdn() { @@ -64,9 +85,10 @@ public String fqdn() { } /** - * Get the template property: Container App Revision Template with all possible settings and the defaults if user - * did not provide them. The defaults are populated as they were at the creation time. - * + * Get the template property: Container App Revision Template with all possible settings and the + * defaults if user did not provide them. The defaults are populated + * as they were at the creation time. + * * @return the template value. */ public Template template() { @@ -75,7 +97,7 @@ public Template template() { /** * Get the active property: Boolean describing if the Revision is Active. - * + * * @return the active value. */ public Boolean active() { @@ -84,7 +106,7 @@ public Boolean active() { /** * Get the replicas property: Number of pods currently running for this revision. - * + * * @return the replicas value. */ public Integer replicas() { @@ -93,7 +115,7 @@ public Integer replicas() { /** * Get the trafficWeight property: Traffic weight assigned to this revision. - * + * * @return the trafficWeight value. */ public Integer trafficWeight() { @@ -102,7 +124,7 @@ public Integer trafficWeight() { /** * Get the provisioningError property: Optional Field - Platform Error Message. - * + * * @return the provisioningError value. */ public String provisioningError() { @@ -111,7 +133,7 @@ public String provisioningError() { /** * Get the healthState property: Current health State of the revision. - * + * * @return the healthState value. */ public RevisionHealthState healthState() { @@ -120,7 +142,7 @@ public RevisionHealthState healthState() { /** * Get the provisioningState property: Current provisioning State of the revision. - * + * * @return the provisioningState value. */ public RevisionProvisioningState provisioningState() { @@ -129,7 +151,7 @@ public RevisionProvisioningState provisioningState() { /** * Get the runningState property: Current running state of the revision. - * + * * @return the runningState value. */ public RevisionRunningState runningState() { @@ -138,7 +160,7 @@ public RevisionRunningState runningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionProperties.java index 64782de6f21c..e05d58766764 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/RevisionProperties.java @@ -12,7 +12,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Revision resource specific properties. */ +/** + * Revision resource specific properties. + */ @Immutable public final class RevisionProperties { /* @@ -84,13 +86,16 @@ public final class RevisionProperties { @JsonProperty(value = "runningState", access = JsonProperty.Access.WRITE_ONLY) private RevisionRunningState runningState; - /** Creates an instance of RevisionProperties class. */ + /** + * Creates an instance of RevisionProperties class. + */ public RevisionProperties() { } /** - * Get the createdTime property: Timestamp describing when the revision was created by controller. - * + * Get the createdTime property: Timestamp describing when the revision was created + * by controller. + * * @return the createdTime value. */ public OffsetDateTime createdTime() { @@ -100,7 +105,7 @@ public OffsetDateTime createdTime() { /** * Get the lastActiveTime property: Timestamp describing when the revision was last active. Only meaningful when * revision is inactive. - * + * * @return the lastActiveTime value. */ public OffsetDateTime lastActiveTime() { @@ -109,7 +114,7 @@ public OffsetDateTime lastActiveTime() { /** * Get the fqdn property: Fully qualified domain name of the revision. - * + * * @return the fqdn value. */ public String fqdn() { @@ -117,9 +122,10 @@ public String fqdn() { } /** - * Get the template property: Container App Revision Template with all possible settings and the defaults if user - * did not provide them. The defaults are populated as they were at the creation time. - * + * Get the template property: Container App Revision Template with all possible settings and the + * defaults if user did not provide them. The defaults are populated + * as they were at the creation time. + * * @return the template value. */ public Template template() { @@ -128,7 +134,7 @@ public Template template() { /** * Get the active property: Boolean describing if the Revision is Active. - * + * * @return the active value. */ public Boolean active() { @@ -137,7 +143,7 @@ public Boolean active() { /** * Get the replicas property: Number of pods currently running for this revision. - * + * * @return the replicas value. */ public Integer replicas() { @@ -146,7 +152,7 @@ public Integer replicas() { /** * Get the trafficWeight property: Traffic weight assigned to this revision. - * + * * @return the trafficWeight value. */ public Integer trafficWeight() { @@ -155,7 +161,7 @@ public Integer trafficWeight() { /** * Get the provisioningError property: Optional Field - Platform Error Message. - * + * * @return the provisioningError value. */ public String provisioningError() { @@ -164,7 +170,7 @@ public String provisioningError() { /** * Get the healthState property: Current health State of the revision. - * + * * @return the healthState value. */ public RevisionHealthState healthState() { @@ -173,7 +179,7 @@ public RevisionHealthState healthState() { /** * Get the provisioningState property: Current provisioning State of the revision. - * + * * @return the provisioningState value. */ public RevisionProvisioningState provisioningState() { @@ -182,7 +188,7 @@ public RevisionProvisioningState provisioningState() { /** * Get the runningState property: Current running state of the revision. - * + * * @return the runningState value. */ public RevisionRunningState runningState() { @@ -191,7 +197,7 @@ public RevisionRunningState runningState() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SecretsCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SecretsCollectionInner.java index 4d9eaacf9c0d..f3ee91d90586 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SecretsCollectionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SecretsCollectionInner.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Container App Secrets Collection ARM resource. */ +/** + * Container App Secrets Collection ARM resource. + */ @Fluent public final class SecretsCollectionInner { /* @@ -19,13 +21,15 @@ public final class SecretsCollectionInner { @JsonProperty(value = "value", required = true) private List value; - /** Creates an instance of SecretsCollectionInner class. */ + /** + * Creates an instance of SecretsCollectionInner class. + */ public SecretsCollectionInner() { } /** * Get the value property: Collection of resources. - * + * * @return the value value. */ public List value() { @@ -34,7 +38,7 @@ public List value() { /** * Set the value property: Collection of resources. - * + * * @param value the value value to set. * @return the SecretsCollectionInner object itself. */ @@ -45,14 +49,13 @@ public SecretsCollectionInner withValue(List value) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model SecretsCollectionInner")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model SecretsCollectionInner")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlInner.java index 74f9577011f6..434e069ed942 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlInner.java @@ -6,11 +6,14 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; import com.azure.resourcemanager.appcontainers.models.SourceControlOperationState; import com.fasterxml.jackson.annotation.JsonProperty; -/** Container App SourceControl. */ +/** + * Container App SourceControl. + */ @Fluent public final class SourceControlInner extends ProxyResource { /* @@ -19,22 +22,39 @@ public final class SourceControlInner extends ProxyResource { @JsonProperty(value = "properties") private SourceControlProperties innerProperties; - /** Creates an instance of SourceControlInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of SourceControlInner class. + */ public SourceControlInner() { } /** * Get the innerProperties property: SourceControl resource specific properties. - * + * * @return the innerProperties value. */ private SourceControlProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the operationState property: Current provisioning State of the operation. - * + * * @return the operationState value. */ public SourceControlOperationState operationState() { @@ -43,7 +63,7 @@ public SourceControlOperationState operationState() { /** * Get the repoUrl property: The repo url which will be integrated to ContainerApp. - * + * * @return the repoUrl value. */ public String repoUrl() { @@ -52,7 +72,7 @@ public String repoUrl() { /** * Set the repoUrl property: The repo url which will be integrated to ContainerApp. - * + * * @param repoUrl the repoUrl value to set. * @return the SourceControlInner object itself. */ @@ -66,7 +86,7 @@ public SourceControlInner withRepoUrl(String repoUrl) { /** * Get the branch property: The branch which will trigger the auto deployment. - * + * * @return the branch value. */ public String branch() { @@ -75,7 +95,7 @@ public String branch() { /** * Set the branch property: The branch which will trigger the auto deployment. - * + * * @param branch the branch value to set. * @return the SourceControlInner object itself. */ @@ -89,8 +109,9 @@ public SourceControlInner withBranch(String branch) { /** * Get the githubActionConfiguration property: Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated as they were at the creation time. - * + * defaults if user did not provide them. The defaults are populated + * as they were at the creation time. + * * @return the githubActionConfiguration value. */ public GithubActionConfiguration githubActionConfiguration() { @@ -99,8 +120,9 @@ public GithubActionConfiguration githubActionConfiguration() { /** * Set the githubActionConfiguration property: Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated as they were at the creation time. - * + * defaults if user did not provide them. The defaults are populated + * as they were at the creation time. + * * @param githubActionConfiguration the githubActionConfiguration value to set. * @return the SourceControlInner object itself. */ @@ -114,7 +136,7 @@ public SourceControlInner withGithubActionConfiguration(GithubActionConfiguratio /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlProperties.java index 94c3efcb7970..c6111e7ed356 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlProperties.java @@ -9,7 +9,9 @@ import com.azure.resourcemanager.appcontainers.models.SourceControlOperationState; import com.fasterxml.jackson.annotation.JsonProperty; -/** SourceControl resource specific properties. */ +/** + * SourceControl resource specific properties. + */ @Fluent public final class SourceControlProperties { /* @@ -38,13 +40,15 @@ public final class SourceControlProperties { @JsonProperty(value = "githubActionConfiguration") private GithubActionConfiguration githubActionConfiguration; - /** Creates an instance of SourceControlProperties class. */ + /** + * Creates an instance of SourceControlProperties class. + */ public SourceControlProperties() { } /** * Get the operationState property: Current provisioning State of the operation. - * + * * @return the operationState value. */ public SourceControlOperationState operationState() { @@ -53,7 +57,7 @@ public SourceControlOperationState operationState() { /** * Get the repoUrl property: The repo url which will be integrated to ContainerApp. - * + * * @return the repoUrl value. */ public String repoUrl() { @@ -62,7 +66,7 @@ public String repoUrl() { /** * Set the repoUrl property: The repo url which will be integrated to ContainerApp. - * + * * @param repoUrl the repoUrl value to set. * @return the SourceControlProperties object itself. */ @@ -73,7 +77,7 @@ public SourceControlProperties withRepoUrl(String repoUrl) { /** * Get the branch property: The branch which will trigger the auto deployment. - * + * * @return the branch value. */ public String branch() { @@ -82,7 +86,7 @@ public String branch() { /** * Set the branch property: The branch which will trigger the auto deployment. - * + * * @param branch the branch value to set. * @return the SourceControlProperties object itself. */ @@ -93,8 +97,9 @@ public SourceControlProperties withBranch(String branch) { /** * Get the githubActionConfiguration property: Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated as they were at the creation time. - * + * defaults if user did not provide them. The defaults are populated + * as they were at the creation time. + * * @return the githubActionConfiguration value. */ public GithubActionConfiguration githubActionConfiguration() { @@ -103,8 +108,9 @@ public GithubActionConfiguration githubActionConfiguration() { /** * Set the githubActionConfiguration property: Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated as they were at the creation time. - * + * defaults if user did not provide them. The defaults are populated + * as they were at the creation time. + * * @param githubActionConfiguration the githubActionConfiguration value to set. * @return the SourceControlProperties object itself. */ @@ -115,7 +121,7 @@ public SourceControlProperties withGithubActionConfiguration(GithubActionConfigu /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/UsageInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/UsageInner.java new file mode 100644 index 000000000000..e37f5a12c5f9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/UsageInner.java @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.models.UsageName; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes Compute Resource Usage. + */ +@Fluent +public final class UsageInner { + /* + * An enum describing the unit of usage measurement. + */ + @JsonProperty(value = "unit", required = true) + private String unit = "Count"; + + /* + * The current usage of the resource. + */ + @JsonProperty(value = "currentValue", required = true) + private float currentValue; + + /* + * The maximum permitted usage of the resource. + */ + @JsonProperty(value = "limit", required = true) + private float limit; + + /* + * The name of the type of usage. + */ + @JsonProperty(value = "name", required = true) + private UsageName name; + + /** + * Creates an instance of UsageInner class. + */ + public UsageInner() { + } + + /** + * Get the unit property: An enum describing the unit of usage measurement. + * + * @return the unit value. + */ + public String unit() { + return this.unit; + } + + /** + * Set the unit property: An enum describing the unit of usage measurement. + * + * @param unit the unit value to set. + * @return the UsageInner object itself. + */ + public UsageInner withUnit(String unit) { + this.unit = unit; + return this; + } + + /** + * Get the currentValue property: The current usage of the resource. + * + * @return the currentValue value. + */ + public float currentValue() { + return this.currentValue; + } + + /** + * Set the currentValue property: The current usage of the resource. + * + * @param currentValue the currentValue value to set. + * @return the UsageInner object itself. + */ + public UsageInner withCurrentValue(float currentValue) { + this.currentValue = currentValue; + return this; + } + + /** + * Get the limit property: The maximum permitted usage of the resource. + * + * @return the limit value. + */ + public float limit() { + return this.limit; + } + + /** + * Set the limit property: The maximum permitted usage of the resource. + * + * @param limit the limit value to set. + * @return the UsageInner object itself. + */ + public UsageInner withLimit(float limit) { + this.limit = limit; + return this; + } + + /** + * Get the name property: The name of the type of usage. + * + * @return the name value. + */ + public UsageName name() { + return this.name; + } + + /** + * Set the name property: The name of the type of usage. + * + * @param name the name value to set. + * @return the UsageInner object itself. + */ + public UsageInner withName(UsageName name) { + this.name = name; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property name in model UsageInner")); + } else { + name().validate(); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(UsageInner.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkloadProfileStatesInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkloadProfileStatesInner.java index 825cf626a1bf..50c4bf0688d8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkloadProfileStatesInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkloadProfileStatesInner.java @@ -6,10 +6,13 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; import com.fasterxml.jackson.annotation.JsonProperty; -/** Collection of all the workload Profile States for a Managed Environment.. */ +/** + * Collection of all the workload Profile States for a Managed Environment.. + */ @Fluent public final class WorkloadProfileStatesInner extends ProxyResource { /* @@ -18,13 +21,21 @@ public final class WorkloadProfileStatesInner extends ProxyResource { @JsonProperty(value = "properties") private WorkloadProfileStatesProperties properties; - /** Creates an instance of WorkloadProfileStatesInner class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of WorkloadProfileStatesInner class. + */ public WorkloadProfileStatesInner() { } /** * Get the properties property: Workload Profile resource specific properties. - * + * * @return the properties value. */ public WorkloadProfileStatesProperties properties() { @@ -33,7 +44,7 @@ public WorkloadProfileStatesProperties properties() { /** * Set the properties property: Workload Profile resource specific properties. - * + * * @param properties the properties value to set. * @return the WorkloadProfileStatesInner object itself. */ @@ -42,9 +53,18 @@ public WorkloadProfileStatesInner withProperties(WorkloadProfileStatesProperties return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/package-info.java index a0507c49fad0..f87287ab52d0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/package-info.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/package-info.java @@ -2,5 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the inner data models for ContainerAppsApiClient. null. */ +/** + * Package containing the inner data models for ContainerAppsApiClient. + * Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the + * function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions + * extension resource. + */ package com.azure.resourcemanager.appcontainers.fluent.models; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/package-info.java index 4d3731d374d3..0eba2fe983f2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/package-info.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/package-info.java @@ -2,5 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the service clients for ContainerAppsApiClient. null. */ +/** + * Package containing the service clients for ContainerAppsApiClient. + * Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the + * function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions + * extension resource. + */ package com.azure.resourcemanager.appcontainers.fluent; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResilienciesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResilienciesClientImpl.java new file mode 100644 index 000000000000..af7bcd069fbb --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResilienciesClientImpl.java @@ -0,0 +1,930 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.appcontainers.fluent.AppResilienciesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.AppResiliencyInner; +import com.azure.resourcemanager.appcontainers.models.AppResiliencyCollection; +import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in AppResilienciesClient. + */ +public final class AppResilienciesClientImpl implements AppResilienciesClient { + /** + * The proxy service used to perform REST calls. + */ + private final AppResilienciesService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of AppResilienciesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AppResilienciesClientImpl(ContainerAppsApiClientImpl client) { + this.service + = RestProxy.create(AppResilienciesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientAppResiliencies to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface AppResilienciesService { + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("appName") String appName, + @PathParam("name") String name, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AppResiliencyInner resiliencyEnvelope, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> update(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("appName") String appName, + @PathParam("name") String name, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") AppResiliencyInner resiliencyEnvelope, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("appName") String appName, + @PathParam("name") String name, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("appName") String appName, + @PathParam("name") String name, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{appName}/resiliencyPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("appName") String appName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Create or update an application's resiliency policy. + * + * Create or update container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param resiliencyEnvelope The resiliency policy to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration to setup App Resiliency along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String appName, + String name, AppResiliencyInner resiliencyEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (appName == null) { + return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (resiliencyEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter resiliencyEnvelope is required and cannot be null.")); + } else { + resiliencyEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, appName, name, this.client.getApiVersion(), resiliencyEnvelope, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update an application's resiliency policy. + * + * Create or update container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param resiliencyEnvelope The resiliency policy to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration to setup App Resiliency along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, String appName, + String name, AppResiliencyInner resiliencyEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (appName == null) { + return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (resiliencyEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter resiliencyEnvelope is required and cannot be null.")); + } else { + resiliencyEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + appName, name, this.client.getApiVersion(), resiliencyEnvelope, accept, context); + } + + /** + * Create or update an application's resiliency policy. + * + * Create or update container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param resiliencyEnvelope The resiliency policy to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration to setup App Resiliency on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String appName, String name, + AppResiliencyInner resiliencyEnvelope) { + return createOrUpdateWithResponseAsync(resourceGroupName, appName, name, resiliencyEnvelope) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Create or update an application's resiliency policy. + * + * Create or update container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param resiliencyEnvelope The resiliency policy to create or update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration to setup App Resiliency along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, String appName, + String name, AppResiliencyInner resiliencyEnvelope, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, appName, name, resiliencyEnvelope, context).block(); + } + + /** + * Create or update an application's resiliency policy. + * + * Create or update container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param resiliencyEnvelope The resiliency policy to create or update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration to setup App Resiliency. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AppResiliencyInner createOrUpdate(String resourceGroupName, String appName, String name, + AppResiliencyInner resiliencyEnvelope) { + return createOrUpdateWithResponse(resourceGroupName, appName, name, resiliencyEnvelope, Context.NONE) + .getValue(); + } + + /** + * Update an application's resiliency policy. + * + * Update container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param resiliencyEnvelope The resiliency policy to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration to setup App Resiliency along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, String appName, + String name, AppResiliencyInner resiliencyEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (appName == null) { + return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (resiliencyEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter resiliencyEnvelope is required and cannot be null.")); + } else { + resiliencyEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, appName, name, this.client.getApiVersion(), resiliencyEnvelope, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update an application's resiliency policy. + * + * Update container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param resiliencyEnvelope The resiliency policy to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration to setup App Resiliency along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> updateWithResponseAsync(String resourceGroupName, String appName, + String name, AppResiliencyInner resiliencyEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (appName == null) { + return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (resiliencyEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter resiliencyEnvelope is required and cannot be null.")); + } else { + resiliencyEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, appName, + name, this.client.getApiVersion(), resiliencyEnvelope, accept, context); + } + + /** + * Update an application's resiliency policy. + * + * Update container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param resiliencyEnvelope The resiliency policy to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration to setup App Resiliency on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String appName, String name, + AppResiliencyInner resiliencyEnvelope) { + return updateWithResponseAsync(resourceGroupName, appName, name, resiliencyEnvelope) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update an application's resiliency policy. + * + * Update container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param resiliencyEnvelope The resiliency policy to update. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration to setup App Resiliency along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse(String resourceGroupName, String appName, String name, + AppResiliencyInner resiliencyEnvelope, Context context) { + return updateWithResponseAsync(resourceGroupName, appName, name, resiliencyEnvelope, context).block(); + } + + /** + * Update an application's resiliency policy. + * + * Update container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param resiliencyEnvelope The resiliency policy to update. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration to setup App Resiliency. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AppResiliencyInner update(String resourceGroupName, String appName, String name, + AppResiliencyInner resiliencyEnvelope) { + return updateWithResponse(resourceGroupName, appName, name, resiliencyEnvelope, Context.NONE).getValue(); + } + + /** + * Delete an application's resiliency policy. + * + * Delete container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String appName, String name) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (appName == null) { + return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, appName, name, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete an application's resiliency policy. + * + * Delete container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String appName, String name, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (appName == null) { + return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, appName, + name, this.client.getApiVersion(), accept, context); + } + + /** + * Delete an application's resiliency policy. + * + * Delete container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String appName, String name) { + return deleteWithResponseAsync(resourceGroupName, appName, name).flatMap(ignored -> Mono.empty()); + } + + /** + * Delete an application's resiliency policy. + * + * Delete container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String appName, String name, Context context) { + return deleteWithResponseAsync(resourceGroupName, appName, name, context).block(); + } + + /** + * Delete an application's resiliency policy. + * + * Delete container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String appName, String name) { + deleteWithResponse(resourceGroupName, appName, name, Context.NONE); + } + + /** + * Get an application's resiliency policy. + * + * Get container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container app resiliency policy along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String appName, + String name) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (appName == null) { + return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, appName, name, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get an application's resiliency policy. + * + * Get container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container app resiliency policy along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String appName, + String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (appName == null) { + return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, appName, name, + this.client.getApiVersion(), accept, context); + } + + /** + * Get an application's resiliency policy. + * + * Get container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container app resiliency policy on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String appName, String name) { + return getWithResponseAsync(resourceGroupName, appName, name).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get an application's resiliency policy. + * + * Get container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container app resiliency policy along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String appName, String name, + Context context) { + return getWithResponseAsync(resourceGroupName, appName, name, context).block(); + } + + /** + * Get an application's resiliency policy. + * + * Get container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container app resiliency policy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public AppResiliencyInner get(String resourceGroupName, String appName, String name) { + return getWithResponse(resourceGroupName, appName, name, Context.NONE).getValue(); + } + + /** + * List an application's resiliency policies. + * + * List container app resiliency policies. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of AppResiliency policies along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String appName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (appName == null) { + return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, appName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List an application's resiliency policies. + * + * List container app resiliency policies. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of AppResiliency policies along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String appName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (appName == null) { + return Mono.error(new IllegalArgumentException("Parameter appName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, appName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List an application's resiliency policies. + * + * List container app resiliency policies. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of AppResiliency policies as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String appName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, appName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List an application's resiliency policies. + * + * List container app resiliency policies. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of AppResiliency policies as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String appName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, appName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List an application's resiliency policies. + * + * List container app resiliency policies. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of AppResiliency policies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String appName) { + return new PagedIterable<>(listAsync(resourceGroupName, appName)); + } + + /** + * List an application's resiliency policies. + * + * List container app resiliency policies. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of AppResiliency policies as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String appName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, appName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of AppResiliency policies along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of AppResiliency policies along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResilienciesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResilienciesImpl.java new file mode 100644 index 000000000000..d1884526629d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResilienciesImpl.java @@ -0,0 +1,156 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.AppResilienciesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.AppResiliencyInner; +import com.azure.resourcemanager.appcontainers.models.AppResiliencies; +import com.azure.resourcemanager.appcontainers.models.AppResiliency; + +public final class AppResilienciesImpl implements AppResiliencies { + private static final ClientLogger LOGGER = new ClientLogger(AppResilienciesImpl.class); + + private final AppResilienciesClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public AppResilienciesImpl(AppResilienciesClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response deleteWithResponse(String resourceGroupName, String appName, String name, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, appName, name, context); + } + + public void delete(String resourceGroupName, String appName, String name) { + this.serviceClient().delete(resourceGroupName, appName, name); + } + + public Response getWithResponse(String resourceGroupName, String appName, String name, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, appName, name, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new AppResiliencyImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public AppResiliency get(String resourceGroupName, String appName, String name) { + AppResiliencyInner inner = this.serviceClient().get(resourceGroupName, appName, name); + if (inner != null) { + return new AppResiliencyImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable list(String resourceGroupName, String appName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, appName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AppResiliencyImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String appName, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, appName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AppResiliencyImpl(inner1, this.manager())); + } + + public AppResiliency getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String appName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); + if (appName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); + } + String name = ResourceManagerUtils.getValueFromIdByName(id, "resiliencyPolicies"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resiliencyPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, appName, name, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String appName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); + if (appName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); + } + String name = ResourceManagerUtils.getValueFromIdByName(id, "resiliencyPolicies"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resiliencyPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, appName, name, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String appName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); + if (appName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); + } + String name = ResourceManagerUtils.getValueFromIdByName(id, "resiliencyPolicies"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resiliencyPolicies'.", id))); + } + this.deleteWithResponse(resourceGroupName, appName, name, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String appName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); + if (appName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); + } + String name = ResourceManagerUtils.getValueFromIdByName(id, "resiliencyPolicies"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resiliencyPolicies'.", id))); + } + return this.deleteWithResponse(resourceGroupName, appName, name, context); + } + + private AppResilienciesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + public AppResiliencyImpl define(String name) { + return new AppResiliencyImpl(name, this.manager()); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResiliencyImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResiliencyImpl.java new file mode 100644 index 000000000000..2d715f1928f4 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AppResiliencyImpl.java @@ -0,0 +1,171 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.AppResiliencyInner; +import com.azure.resourcemanager.appcontainers.models.AppResiliency; +import com.azure.resourcemanager.appcontainers.models.CircuitBreakerPolicy; +import com.azure.resourcemanager.appcontainers.models.HttpConnectionPool; +import com.azure.resourcemanager.appcontainers.models.HttpRetryPolicy; +import com.azure.resourcemanager.appcontainers.models.TcpConnectionPool; +import com.azure.resourcemanager.appcontainers.models.TcpRetryPolicy; +import com.azure.resourcemanager.appcontainers.models.TimeoutPolicy; + +public final class AppResiliencyImpl implements AppResiliency, AppResiliency.Definition, AppResiliency.Update { + private AppResiliencyInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public TimeoutPolicy timeoutPolicy() { + return this.innerModel().timeoutPolicy(); + } + + public HttpRetryPolicy httpRetryPolicy() { + return this.innerModel().httpRetryPolicy(); + } + + public TcpRetryPolicy tcpRetryPolicy() { + return this.innerModel().tcpRetryPolicy(); + } + + public CircuitBreakerPolicy circuitBreakerPolicy() { + return this.innerModel().circuitBreakerPolicy(); + } + + public HttpConnectionPool httpConnectionPool() { + return this.innerModel().httpConnectionPool(); + } + + public TcpConnectionPool tcpConnectionPool() { + return this.innerModel().tcpConnectionPool(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public AppResiliencyInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String appName; + + private String name; + + public AppResiliencyImpl withExistingContainerApp(String resourceGroupName, String appName) { + this.resourceGroupName = resourceGroupName; + this.appName = appName; + return this; + } + + public AppResiliency create() { + this.innerObject = serviceManager.serviceClient().getAppResiliencies() + .createOrUpdateWithResponse(resourceGroupName, appName, name, this.innerModel(), Context.NONE).getValue(); + return this; + } + + public AppResiliency create(Context context) { + this.innerObject = serviceManager.serviceClient().getAppResiliencies() + .createOrUpdateWithResponse(resourceGroupName, appName, name, this.innerModel(), context).getValue(); + return this; + } + + AppResiliencyImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = new AppResiliencyInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public AppResiliencyImpl update() { + return this; + } + + public AppResiliency apply() { + this.innerObject = serviceManager.serviceClient().getAppResiliencies() + .updateWithResponse(resourceGroupName, appName, name, this.innerModel(), Context.NONE).getValue(); + return this; + } + + public AppResiliency apply(Context context) { + this.innerObject = serviceManager.serviceClient().getAppResiliencies() + .updateWithResponse(resourceGroupName, appName, name, this.innerModel(), context).getValue(); + return this; + } + + AppResiliencyImpl(AppResiliencyInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.appName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "containerApps"); + this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resiliencyPolicies"); + } + + public AppResiliency refresh() { + this.innerObject = serviceManager.serviceClient().getAppResiliencies() + .getWithResponse(resourceGroupName, appName, name, Context.NONE).getValue(); + return this; + } + + public AppResiliency refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getAppResiliencies() + .getWithResponse(resourceGroupName, appName, name, context).getValue(); + return this; + } + + public AppResiliencyImpl withTimeoutPolicy(TimeoutPolicy timeoutPolicy) { + this.innerModel().withTimeoutPolicy(timeoutPolicy); + return this; + } + + public AppResiliencyImpl withHttpRetryPolicy(HttpRetryPolicy httpRetryPolicy) { + this.innerModel().withHttpRetryPolicy(httpRetryPolicy); + return this; + } + + public AppResiliencyImpl withTcpRetryPolicy(TcpRetryPolicy tcpRetryPolicy) { + this.innerModel().withTcpRetryPolicy(tcpRetryPolicy); + return this; + } + + public AppResiliencyImpl withCircuitBreakerPolicy(CircuitBreakerPolicy circuitBreakerPolicy) { + this.innerModel().withCircuitBreakerPolicy(circuitBreakerPolicy); + return this; + } + + public AppResiliencyImpl withHttpConnectionPool(HttpConnectionPool httpConnectionPool) { + this.innerModel().withHttpConnectionPool(httpConnectionPool); + return this; + } + + public AppResiliencyImpl withTcpConnectionPool(TcpConnectionPool tcpConnectionPool) { + this.innerModel().withTcpConnectionPool(tcpConnectionPool); + return this; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AuthConfigImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AuthConfigImpl.java index 9db849c965eb..579bbf3d7b60 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AuthConfigImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AuthConfigImpl.java @@ -9,6 +9,7 @@ import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner; import com.azure.resourcemanager.appcontainers.models.AuthConfig; import com.azure.resourcemanager.appcontainers.models.AuthPlatform; +import com.azure.resourcemanager.appcontainers.models.EncryptionSettings; import com.azure.resourcemanager.appcontainers.models.GlobalValidation; import com.azure.resourcemanager.appcontainers.models.HttpSettings; import com.azure.resourcemanager.appcontainers.models.IdentityProviders; @@ -55,6 +56,10 @@ public HttpSettings httpSettings() { return this.innerModel().httpSettings(); } + public EncryptionSettings encryptionSettings() { + return this.innerModel().encryptionSettings(); + } + public String resourceGroupName() { return resourceGroupName; } @@ -80,24 +85,16 @@ public AuthConfigImpl withExistingContainerApp(String resourceGroupName, String } public AuthConfig create() { - this.innerObject = - serviceManager - .serviceClient() - .getContainerAppsAuthConfigs() - .createOrUpdateWithResponse( - resourceGroupName, containerAppName, authConfigName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject + = serviceManager.serviceClient().getContainerAppsAuthConfigs().createOrUpdateWithResponse(resourceGroupName, + containerAppName, authConfigName, this.innerModel(), Context.NONE).getValue(); return this; } public AuthConfig create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getContainerAppsAuthConfigs() - .createOrUpdateWithResponse( - resourceGroupName, containerAppName, authConfigName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getContainerAppsAuthConfigs() + .createOrUpdateWithResponse(resourceGroupName, containerAppName, authConfigName, this.innerModel(), context) + .getValue(); return this; } @@ -112,53 +109,37 @@ public AuthConfigImpl update() { } public AuthConfig apply() { - this.innerObject = - serviceManager - .serviceClient() - .getContainerAppsAuthConfigs() - .createOrUpdateWithResponse( - resourceGroupName, containerAppName, authConfigName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject + = serviceManager.serviceClient().getContainerAppsAuthConfigs().createOrUpdateWithResponse(resourceGroupName, + containerAppName, authConfigName, this.innerModel(), Context.NONE).getValue(); return this; } public AuthConfig apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getContainerAppsAuthConfigs() - .createOrUpdateWithResponse( - resourceGroupName, containerAppName, authConfigName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getContainerAppsAuthConfigs() + .createOrUpdateWithResponse(resourceGroupName, containerAppName, authConfigName, this.innerModel(), context) + .getValue(); return this; } - AuthConfigImpl( - AuthConfigInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + AuthConfigImpl(AuthConfigInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.containerAppName = Utils.getValueFromIdByName(innerObject.id(), "containerApps"); - this.authConfigName = Utils.getValueFromIdByName(innerObject.id(), "authConfigs"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.containerAppName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "containerApps"); + this.authConfigName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "authConfigs"); } public AuthConfig refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getContainerAppsAuthConfigs() - .getWithResponse(resourceGroupName, containerAppName, authConfigName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getContainerAppsAuthConfigs() + .getWithResponse(resourceGroupName, containerAppName, authConfigName, Context.NONE).getValue(); return this; } public AuthConfig refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getContainerAppsAuthConfigs() - .getWithResponse(resourceGroupName, containerAppName, authConfigName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getContainerAppsAuthConfigs() + .getWithResponse(resourceGroupName, containerAppName, authConfigName, context).getValue(); return this; } @@ -186,4 +167,9 @@ public AuthConfigImpl withHttpSettings(HttpSettings httpSettings) { this.innerModel().withHttpSettings(httpSettings); return this; } + + public AuthConfigImpl withEncryptionSettings(EncryptionSettings encryptionSettings) { + this.innerModel().withEncryptionSettings(encryptionSettings); + return this; + } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfileImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfileImpl.java index c43cffd130a1..a4636a09d35b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfileImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfileImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfile; import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; @@ -13,8 +14,7 @@ public final class AvailableWorkloadProfileImpl implements AvailableWorkloadProf private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - AvailableWorkloadProfileImpl( - AvailableWorkloadProfileInner innerObject, + AvailableWorkloadProfileImpl(AvailableWorkloadProfileInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -40,6 +40,10 @@ public AvailableWorkloadProfileProperties properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public AvailableWorkloadProfileInner innerModel() { return this.innerObject; } 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 15172ec96e9c..8b2591bf0788 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 @@ -30,24 +30,28 @@ import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfilesCollection; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in AvailableWorkloadProfilesClient. */ +/** + * An instance of this class provides access to all the operations defined in AvailableWorkloadProfilesClient. + */ public final class AvailableWorkloadProfilesClientImpl implements AvailableWorkloadProfilesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final AvailableWorkloadProfilesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerAppsApiClientImpl client; /** * Initializes an instance of AvailableWorkloadProfilesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ AvailableWorkloadProfilesClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create( - AvailableWorkloadProfilesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(AvailableWorkloadProfilesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -58,109 +62,79 @@ public final class AvailableWorkloadProfilesClientImpl implements AvailableWorkl @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") public interface AvailableWorkloadProfilesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}/availableManagedEnvironmentsWorkloadProfileTypes") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}/availableManagedEnvironmentsWorkloadProfileTypes") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(ManagementException.class) Mono> getNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Get available workload profiles by location. - * - *

Get all available workload profiles for a location. - * + * + * Get all available workload profiles for a location. + * * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all available workload profiles for a location along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getSinglePageAsync(String location) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get available workload profiles by location. - * - *

Get all available workload profiles for a location. - * + * + * Get all available workload profiles for a location. + * * @param location The name of Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all available workload profiles for a location along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getSinglePageAsync(String location, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); @@ -168,29 +142,17 @@ private Mono> getSinglePageAsync(St final String accept = "application/json"; context = this.client.mergeContext(context); return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, this.client.getApiVersion(), + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get available workload profiles by location. - * - *

Get all available workload profiles for a location. - * + * + * Get all available workload profiles for a location. + * * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -204,9 +166,9 @@ private PagedFlux getAsync(String location) { /** * Get available workload profiles by location. - * - *

Get all available workload profiles for a location. - * + * + * Get all available workload profiles for a location. + * * @param location The name of Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -216,15 +178,15 @@ private PagedFlux getAsync(String location) { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux getAsync(String location, Context context) { - return new PagedFlux<>( - () -> getSinglePageAsync(location, context), nextLink -> getNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> getSinglePageAsync(location, context), + nextLink -> getNextSinglePageAsync(nextLink, context)); } /** * Get available workload profiles by location. - * - *

Get all available workload profiles for a location. - * + * + * Get all available workload profiles for a location. + * * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. @@ -238,9 +200,9 @@ public PagedIterable get(String location) { /** * Get available workload profiles by location. - * - *

Get all available workload profiles for a location. - * + * + * Get all available workload profiles for a location. + * * @param location The name of Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -255,14 +217,15 @@ public PagedIterable get(String location, Context /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return collection of available workload profiles in the location along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getNextSinglePageAsync(String nextLink) { @@ -270,62 +233,43 @@ private Mono> getNextSinglePageAsyn return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.getNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.getNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return collection of available workload profiles in the location along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getNextSinglePageAsync( - String nextLink, Context context) { + private Mono> getNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.getNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesImpl.java index 51a0cb9f72df..de9fd579bec6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesImpl.java @@ -19,8 +19,7 @@ public final class AvailableWorkloadProfilesImpl implements AvailableWorkloadPro private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - public AvailableWorkloadProfilesImpl( - AvailableWorkloadProfilesClient innerClient, + public AvailableWorkloadProfilesImpl(AvailableWorkloadProfilesClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -28,12 +27,12 @@ public AvailableWorkloadProfilesImpl( public PagedIterable get(String location) { PagedIterable inner = this.serviceClient().get(location); - return Utils.mapPage(inner, inner1 -> new AvailableWorkloadProfileImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailableWorkloadProfileImpl(inner1, this.manager())); } public PagedIterable get(String location, Context context) { PagedIterable inner = this.serviceClient().get(location, context); - return Utils.mapPage(inner, inner1 -> new AvailableWorkloadProfileImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AvailableWorkloadProfileImpl(inner1, this.manager())); } private AvailableWorkloadProfilesClient serviceClient() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMeterCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMeterCollectionImpl.java index 309f306eadbb..b87bf3c7ed11 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMeterCollectionImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMeterCollectionImpl.java @@ -15,8 +15,7 @@ public final class BillingMeterCollectionImpl implements BillingMeterCollection private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - BillingMeterCollectionImpl( - BillingMeterCollectionInner innerObject, + BillingMeterCollectionImpl(BillingMeterCollectionInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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 ca38979de6dc..5d7a6a26b229 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 @@ -25,22 +25,28 @@ import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in BillingMetersClient. */ +/** + * An instance of this class provides access to all the operations defined in BillingMetersClient. + */ public final class BillingMetersClientImpl implements BillingMetersClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final BillingMetersService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerAppsApiClientImpl client; /** * Initializes an instance of BillingMetersClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ BillingMetersClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy.create(BillingMetersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(BillingMetersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -51,24 +57,20 @@ public final class BillingMetersClientImpl implements BillingMetersClient { @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") public interface BillingMetersService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}/billingMeters") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @PathParam("location") String location, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @PathParam("location") String location, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); } /** * Get billing meters by location. - * - *

Get all billingMeters for a location. - * + * + * Get all billingMeters for a location. + * * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -78,40 +80,28 @@ Mono> get( @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String location) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get billing meters by location. - * - *

Get all billingMeters for a location. - * + * + * Get all billingMeters for a location. + * * @param location The name of Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -122,37 +112,27 @@ private Mono> getWithResponseAsync(String @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getWithResponseAsync(String location, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (location == null) { return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - location, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), location, + this.client.getApiVersion(), accept, context); } /** * Get billing meters by location. - * - *

Get all billingMeters for a location. - * + * + * Get all billingMeters for a location. + * * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -166,9 +146,9 @@ private Mono getAsync(String location) { /** * Get billing meters by location. - * - *

Get all billingMeters for a location. - * + * + * Get all billingMeters for a location. + * * @param location The name of Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -183,9 +163,9 @@ public Response getWithResponse(String location, Co /** * Get billing meters by location. - * - *

Get all billingMeters for a location. - * + * + * Get all billingMeters for a location. + * * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersImpl.java index 5032c704cca8..8b793dcb1ac0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersImpl.java @@ -20,8 +20,7 @@ public final class BillingMetersImpl implements BillingMeters { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - public BillingMetersImpl( - BillingMetersClient innerClient, + public BillingMetersImpl(BillingMetersClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -30,10 +29,7 @@ public BillingMetersImpl( public Response getWithResponse(String location, Context context) { Response inner = this.serviceClient().getWithResponse(location, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new BillingMeterCollectionImpl(inner.getValue(), this.manager())); } else { return null; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildAuthTokensClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildAuthTokensClientImpl.java new file mode 100644 index 000000000000..416f699371ba --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildAuthTokensClientImpl.java @@ -0,0 +1,202 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.appcontainers.fluent.BuildAuthTokensClient; +import com.azure.resourcemanager.appcontainers.fluent.models.BuildTokenInner; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in BuildAuthTokensClient. + */ +public final class BuildAuthTokensClientImpl implements BuildAuthTokensClient { + /** + * The proxy service used to perform REST calls. + */ + private final BuildAuthTokensService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of BuildAuthTokensClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + BuildAuthTokensClientImpl(ContainerAppsApiClientImpl client) { + this.service + = RestProxy.create(BuildAuthTokensService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientBuildAuthTokens to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface BuildAuthTokensService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}/listAuthToken") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("builderName") String builderName, + @PathParam("buildName") String buildName, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the token used to connect to the endpoint where source code can be uploaded for a build. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the token used to connect to the endpoint where source code can be uploaded for a build along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWithResponseAsync(String resourceGroupName, String builderName, + String buildName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (buildName == null) { + return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, builderName, buildName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the token used to connect to the endpoint where source code can be uploaded for a build. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the token used to connect to the endpoint where source code can be uploaded for a build along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWithResponseAsync(String resourceGroupName, String builderName, + String buildName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (buildName == null) { + return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, builderName, buildName, accept, context); + } + + /** + * Gets the token used to connect to the endpoint where source code can be uploaded for a build. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the token used to connect to the endpoint where source code can be uploaded for a build on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listAsync(String resourceGroupName, String builderName, String buildName) { + return listWithResponseAsync(resourceGroupName, builderName, buildName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Gets the token used to connect to the endpoint where source code can be uploaded for a build. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the token used to connect to the endpoint where source code can be uploaded for a build along with + * {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listWithResponse(String resourceGroupName, String builderName, String buildName, + Context context) { + return listWithResponseAsync(resourceGroupName, builderName, buildName, context).block(); + } + + /** + * Gets the token used to connect to the endpoint where source code can be uploaded for a build. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the token used to connect to the endpoint where source code can be uploaded for a build. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BuildTokenInner list(String resourceGroupName, String builderName, String buildName) { + return listWithResponse(resourceGroupName, builderName, buildName, Context.NONE).getValue(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildAuthTokensImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildAuthTokensImpl.java new file mode 100644 index 000000000000..be90dbf62492 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildAuthTokensImpl.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.BuildAuthTokensClient; +import com.azure.resourcemanager.appcontainers.fluent.models.BuildTokenInner; +import com.azure.resourcemanager.appcontainers.models.BuildAuthTokens; +import com.azure.resourcemanager.appcontainers.models.BuildToken; + +public final class BuildAuthTokensImpl implements BuildAuthTokens { + private static final ClientLogger LOGGER = new ClientLogger(BuildAuthTokensImpl.class); + + private final BuildAuthTokensClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public BuildAuthTokensImpl(BuildAuthTokensClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response listWithResponse(String resourceGroupName, String builderName, String buildName, + Context context) { + Response inner + = this.serviceClient().listWithResponse(resourceGroupName, builderName, buildName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new BuildTokenImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public BuildToken list(String resourceGroupName, String builderName, String buildName) { + BuildTokenInner inner = this.serviceClient().list(resourceGroupName, builderName, buildName); + if (inner != null) { + return new BuildTokenImpl(inner, this.manager()); + } else { + return null; + } + } + + private BuildAuthTokensClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildResourceImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildResourceImpl.java new file mode 100644 index 000000000000..da4354a5db34 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildResourceImpl.java @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; +import com.azure.resourcemanager.appcontainers.models.BuildConfiguration; +import com.azure.resourcemanager.appcontainers.models.BuildProvisioningState; +import com.azure.resourcemanager.appcontainers.models.BuildResource; +import com.azure.resourcemanager.appcontainers.models.BuildStatus; +import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; + +public final class BuildResourceImpl implements BuildResource, BuildResource.Definition, BuildResource.Update { + private BuildResourceInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public BuildProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public BuildStatus buildStatus() { + return this.innerModel().buildStatus(); + } + + public ContainerRegistryWithCustomImage destinationContainerRegistry() { + return this.innerModel().destinationContainerRegistry(); + } + + public BuildConfiguration configuration() { + return this.innerModel().configuration(); + } + + public String uploadEndpoint() { + return this.innerModel().uploadEndpoint(); + } + + public String logStreamEndpoint() { + return this.innerModel().logStreamEndpoint(); + } + + public String tokenEndpoint() { + return this.innerModel().tokenEndpoint(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public BuildResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String builderName; + + private String buildName; + + public BuildResourceImpl withExistingBuilder(String resourceGroupName, String builderName) { + this.resourceGroupName = resourceGroupName; + this.builderName = builderName; + return this; + } + + public BuildResource create() { + this.innerObject = serviceManager.serviceClient().getBuilds().createOrUpdate(resourceGroupName, builderName, + buildName, this.innerModel(), Context.NONE); + return this; + } + + public BuildResource create(Context context) { + this.innerObject = serviceManager.serviceClient().getBuilds().createOrUpdate(resourceGroupName, builderName, + buildName, this.innerModel(), context); + return this; + } + + BuildResourceImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = new BuildResourceInner(); + this.serviceManager = serviceManager; + this.buildName = name; + } + + public BuildResourceImpl update() { + return this; + } + + public BuildResource apply() { + this.innerObject = serviceManager.serviceClient().getBuilds().createOrUpdate(resourceGroupName, builderName, + buildName, this.innerModel(), Context.NONE); + return this; + } + + public BuildResource apply(Context context) { + this.innerObject = serviceManager.serviceClient().getBuilds().createOrUpdate(resourceGroupName, builderName, + buildName, this.innerModel(), context); + return this; + } + + BuildResourceImpl(BuildResourceInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.builderName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "builders"); + this.buildName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "builds"); + } + + public BuildResource refresh() { + this.innerObject = serviceManager.serviceClient().getBuilds() + .getWithResponse(resourceGroupName, builderName, buildName, Context.NONE).getValue(); + return this; + } + + public BuildResource refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getBuilds() + .getWithResponse(resourceGroupName, builderName, buildName, context).getValue(); + return this; + } + + public BuildResourceImpl + withDestinationContainerRegistry(ContainerRegistryWithCustomImage destinationContainerRegistry) { + this.innerModel().withDestinationContainerRegistry(destinationContainerRegistry); + return this; + } + + public BuildResourceImpl withConfiguration(BuildConfiguration configuration) { + this.innerModel().withConfiguration(configuration); + return this; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildTokenImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildTokenImpl.java new file mode 100644 index 000000000000..cd7d3b491370 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildTokenImpl.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.resourcemanager.appcontainers.fluent.models.BuildTokenInner; +import com.azure.resourcemanager.appcontainers.models.BuildToken; +import java.time.OffsetDateTime; + +public final class BuildTokenImpl implements BuildToken { + private BuildTokenInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + BuildTokenImpl(BuildTokenInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String token() { + return this.innerModel().token(); + } + + public OffsetDateTime expires() { + return this.innerModel().expires(); + } + + public BuildTokenInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuilderResourceImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuilderResourceImpl.java new file mode 100644 index 000000000000..9926d63f18bc --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuilderResourceImpl.java @@ -0,0 +1,209 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; +import com.azure.resourcemanager.appcontainers.models.BuilderProvisioningState; +import com.azure.resourcemanager.appcontainers.models.BuilderResource; +import com.azure.resourcemanager.appcontainers.models.BuilderResourceUpdate; +import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class BuilderResourceImpl implements BuilderResource, BuilderResource.Definition, BuilderResource.Update { + private BuilderResourceInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public String location() { + return this.innerModel().location(); + } + + public Map tags() { + Map inner = this.innerModel().tags(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public BuilderProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String environmentId() { + return this.innerModel().environmentId(); + } + + public List containerRegistries() { + List inner = this.innerModel().containerRegistries(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public BuilderResourceInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String builderName; + + private BuilderResourceUpdate updateBuilderEnvelope; + + public BuilderResourceImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public BuilderResource create() { + this.innerObject = serviceManager.serviceClient().getBuilders().createOrUpdate(resourceGroupName, builderName, + this.innerModel(), Context.NONE); + return this; + } + + public BuilderResource create(Context context) { + this.innerObject = serviceManager.serviceClient().getBuilders().createOrUpdate(resourceGroupName, builderName, + this.innerModel(), context); + return this; + } + + BuilderResourceImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = new BuilderResourceInner(); + this.serviceManager = serviceManager; + this.builderName = name; + } + + public BuilderResourceImpl update() { + this.updateBuilderEnvelope = new BuilderResourceUpdate(); + return this; + } + + public BuilderResource apply() { + this.innerObject = serviceManager.serviceClient().getBuilders().update(resourceGroupName, builderName, + updateBuilderEnvelope, Context.NONE); + return this; + } + + public BuilderResource apply(Context context) { + this.innerObject = serviceManager.serviceClient().getBuilders().update(resourceGroupName, builderName, + updateBuilderEnvelope, context); + return this; + } + + BuilderResourceImpl(BuilderResourceInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.builderName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "builders"); + } + + public BuilderResource refresh() { + this.innerObject = serviceManager.serviceClient().getBuilders() + .getByResourceGroupWithResponse(resourceGroupName, builderName, Context.NONE).getValue(); + return this; + } + + public BuilderResource refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getBuilders() + .getByResourceGroupWithResponse(resourceGroupName, builderName, context).getValue(); + return this; + } + + public BuilderResourceImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public BuilderResourceImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public BuilderResourceImpl withTags(Map tags) { + if (isInCreateMode()) { + this.innerModel().withTags(tags); + return this; + } else { + this.updateBuilderEnvelope.withTags(tags); + return this; + } + } + + public BuilderResourceImpl withIdentity(ManagedServiceIdentity identity) { + if (isInCreateMode()) { + this.innerModel().withIdentity(identity); + return this; + } else { + this.updateBuilderEnvelope.withIdentity(identity); + return this; + } + } + + public BuilderResourceImpl withEnvironmentId(String environmentId) { + if (isInCreateMode()) { + this.innerModel().withEnvironmentId(environmentId); + return this; + } else { + this.updateBuilderEnvelope.withEnvironmentId(environmentId); + return this; + } + } + + public BuilderResourceImpl withContainerRegistries(List containerRegistries) { + this.innerModel().withContainerRegistries(containerRegistries); + return this; + } + + private boolean isInCreateMode() { + return this.innerModel().id() == null; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersClientImpl.java new file mode 100644 index 000000000000..9387f812cdd8 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersClientImpl.java @@ -0,0 +1,1290 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appcontainers.fluent.BuildersClient; +import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; +import com.azure.resourcemanager.appcontainers.models.BuilderCollection; +import com.azure.resourcemanager.appcontainers.models.BuilderResourceUpdate; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in BuildersClient. + */ +public final class BuildersClientImpl implements BuildersClient { + /** + * The proxy service used to perform REST calls. + */ + private final BuildersService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of BuildersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + BuildersClientImpl(ContainerAppsApiClientImpl client) { + this.service = RestProxy.create(BuildersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientBuilders to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface BuildersService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/builders") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getByResourceGroup(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("builderName") String builderName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("builderName") String builderName, + @BodyParam("application/json") BuilderResourceInner builderEnvelope, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("builderName") String builderName, + @BodyParam("application/json") BuilderResourceUpdate builderEnvelope, @HeaderParam("Accept") String accept, + Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("builderName") String builderName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listBySubscriptionNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listByResourceGroupNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * List BuilderResource resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List BuilderResource resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), accept, + context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List BuilderResource resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync() { + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + } + + /** + * List BuilderResource resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + } + + /** + * List BuilderResource resources by subscription ID. + * + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * List BuilderResource resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(context)); + } + + /** + * List BuilderResource resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List BuilderResource resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List BuilderResource resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); + } + + /** + * List BuilderResource resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); + } + + /** + * List BuilderResource resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * List BuilderResource resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, context)); + } + + /** + * Get a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuilderResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String builderName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, builderName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuilderResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String builderName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, builderName, accept, context); + } + + /** + * Get a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuilderResource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getByResourceGroupAsync(String resourceGroupName, String builderName) { + return getByResourceGroupWithResponseAsync(resourceGroupName, builderName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuilderResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse(String resourceGroupName, String builderName, + Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, builderName, context).block(); + } + + /** + * Get a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuilderResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BuilderResourceInner getByResourceGroup(String resourceGroupName, String builderName) { + return getByResourceGroupWithResponse(resourceGroupName, builderName, Context.NONE).getValue(); + } + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String builderName, BuilderResourceInner builderEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (builderEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter builderEnvelope is required and cannot be null.")); + } else { + builderEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, builderName, builderEnvelope, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String builderName, BuilderResourceInner builderEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (builderEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter builderEnvelope is required and cannot be null.")); + } else { + builderEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, builderName, builderEnvelope, accept, context); + } + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BuilderResourceInner> + beginCreateOrUpdateAsync(String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, builderName, builderEnvelope); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BuilderResourceInner.class, BuilderResourceInner.class, this.client.getContext()); + } + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BuilderResourceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, builderName, builderEnvelope, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BuilderResourceInner.class, BuilderResourceInner.class, context); + } + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BuilderResourceInner> + beginCreateOrUpdate(String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope) { + return this.beginCreateOrUpdateAsync(resourceGroupName, builderName, builderEnvelope).getSyncPoller(); + } + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BuilderResourceInner> beginCreateOrUpdate( + String resourceGroupName, String builderName, BuilderResourceInner builderEnvelope, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, builderName, builderEnvelope, context).getSyncPoller(); + } + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String builderName, + BuilderResourceInner builderEnvelope) { + return beginCreateOrUpdateAsync(resourceGroupName, builderName, builderEnvelope).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String builderName, + BuilderResourceInner builderEnvelope, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, builderName, builderEnvelope, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BuilderResourceInner createOrUpdate(String resourceGroupName, String builderName, + BuilderResourceInner builderEnvelope) { + return createOrUpdateAsync(resourceGroupName, builderName, builderEnvelope).block(); + } + + /** + * Create or update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope Resource create parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BuilderResourceInner createOrUpdate(String resourceGroupName, String builderName, + BuilderResourceInner builderEnvelope, Context context) { + return createOrUpdateAsync(resourceGroupName, builderName, builderEnvelope, context).block(); + } + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String builderName, + BuilderResourceUpdate builderEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (builderEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter builderEnvelope is required and cannot be null.")); + } else { + builderEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, builderName, builderEnvelope, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource along with {@link Response} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String builderName, + BuilderResourceUpdate builderEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (builderEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter builderEnvelope is required and cannot be null.")); + } else { + builderEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, builderName, builderEnvelope, accept, context); + } + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BuilderResourceInner> + beginUpdateAsync(String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, builderName, builderEnvelope); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BuilderResourceInner.class, BuilderResourceInner.class, this.client.getContext()); + } + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BuilderResourceInner> beginUpdateAsync( + String resourceGroupName, String builderName, BuilderResourceUpdate builderEnvelope, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, builderName, builderEnvelope, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BuilderResourceInner.class, BuilderResourceInner.class, context); + } + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BuilderResourceInner> beginUpdate(String resourceGroupName, + String builderName, BuilderResourceUpdate builderEnvelope) { + return this.beginUpdateAsync(resourceGroupName, builderName, builderEnvelope).getSyncPoller(); + } + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BuilderResourceInner> beginUpdate(String resourceGroupName, + String builderName, BuilderResourceUpdate builderEnvelope, Context context) { + return this.beginUpdateAsync(resourceGroupName, builderName, builderEnvelope, context).getSyncPoller(); + } + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String builderName, + BuilderResourceUpdate builderEnvelope) { + return beginUpdateAsync(resourceGroupName, builderName, builderEnvelope).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String builderName, + BuilderResourceUpdate builderEnvelope, Context context) { + return beginUpdateAsync(resourceGroupName, builderName, builderEnvelope, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BuilderResourceInner update(String resourceGroupName, String builderName, + BuilderResourceUpdate builderEnvelope) { + return updateAsync(resourceGroupName, builderName, builderEnvelope).block(); + } + + /** + * Update a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param builderEnvelope The resource properties to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information about the SourceToCloud builder resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BuilderResourceInner update(String resourceGroupName, String builderName, + BuilderResourceUpdate builderEnvelope, Context context) { + return updateAsync(resourceGroupName, builderName, builderEnvelope, context).block(); + } + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String builderName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, builderName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String builderName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, builderName, accept, context); + } + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String builderName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, builderName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String builderName, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = deleteWithResponseAsync(resourceGroupName, builderName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String builderName) { + return this.beginDeleteAsync(resourceGroupName, builderName).getSyncPoller(); + } + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String builderName, + Context context) { + return this.beginDeleteAsync(resourceGroupName, builderName, context).getSyncPoller(); + } + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String builderName) { + return beginDeleteAsync(resourceGroupName, builderName).last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String builderName, Context context) { + return beginDeleteAsync(resourceGroupName, builderName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String builderName) { + deleteAsync(resourceGroupName, builderName).block(); + } + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String builderName, Context context) { + deleteAsync(resourceGroupName, builderName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersImpl.java new file mode 100644 index 000000000000..afb724f88caf --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildersImpl.java @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.BuildersClient; +import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; +import com.azure.resourcemanager.appcontainers.models.BuilderResource; +import com.azure.resourcemanager.appcontainers.models.Builders; + +public final class BuildersImpl implements Builders { + private static final ClientLogger LOGGER = new ClientLogger(BuildersImpl.class); + + private final BuildersClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public BuildersImpl(BuildersClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list() { + PagedIterable inner = this.serviceClient().list(); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BuilderResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(Context context) { + PagedIterable inner = this.serviceClient().list(context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BuilderResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BuilderResourceImpl(inner1, this.manager())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BuilderResourceImpl(inner1, this.manager())); + } + + public Response getByResourceGroupWithResponse(String resourceGroupName, String builderName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, builderName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new BuilderResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public BuilderResource getByResourceGroup(String resourceGroupName, String builderName) { + BuilderResourceInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, builderName); + if (inner != null) { + return new BuilderResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String builderName) { + this.serviceClient().delete(resourceGroupName, builderName); + } + + public void delete(String resourceGroupName, String builderName, Context context) { + this.serviceClient().delete(resourceGroupName, builderName, context); + } + + public BuilderResource getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String builderName = ResourceManagerUtils.getValueFromIdByName(id, "builders"); + if (builderName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, builderName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String builderName = ResourceManagerUtils.getValueFromIdByName(id, "builders"); + if (builderName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, builderName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String builderName = ResourceManagerUtils.getValueFromIdByName(id, "builders"); + if (builderName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); + } + this.delete(resourceGroupName, builderName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String builderName = ResourceManagerUtils.getValueFromIdByName(id, "builders"); + if (builderName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); + } + this.delete(resourceGroupName, builderName, context); + } + + private BuildersClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + public BuilderResourceImpl define(String name) { + return new BuilderResourceImpl(name, this.manager()); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsByBuilderResourcesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsByBuilderResourcesClientImpl.java new file mode 100644 index 000000000000..d1239550cfb1 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsByBuilderResourcesClientImpl.java @@ -0,0 +1,278 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.appcontainers.fluent.BuildsByBuilderResourcesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; +import com.azure.resourcemanager.appcontainers.models.BuildCollection; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in BuildsByBuilderResourcesClient. + */ +public final class BuildsByBuilderResourcesClientImpl implements BuildsByBuilderResourcesClient { + /** + * The proxy service used to perform REST calls. + */ + private final BuildsByBuilderResourcesService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of BuildsByBuilderResourcesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + BuildsByBuilderResourcesClientImpl(ContainerAppsApiClientImpl client) { + this.service = RestProxy.create(BuildsByBuilderResourcesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientBuildsByBuilderResources to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface BuildsByBuilderResourcesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("builderName") String builderName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * List BuildResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuildResource list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String builderName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, builderName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * List BuildResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuildResource list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String builderName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, builderName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * List BuildResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuildResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String builderName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, builderName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * List BuildResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuildResource list operation as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String builderName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, builderName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * List BuildResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuildResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String builderName) { + return new PagedIterable<>(listAsync(resourceGroupName, builderName)); + } + + /** + * List BuildResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuildResource list operation as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String builderName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, builderName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuildResource list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuildResource list operation along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsByBuilderResourcesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsByBuilderResourcesImpl.java new file mode 100644 index 000000000000..d1222c2dc55d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsByBuilderResourcesImpl.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.BuildsByBuilderResourcesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; +import com.azure.resourcemanager.appcontainers.models.BuildResource; +import com.azure.resourcemanager.appcontainers.models.BuildsByBuilderResources; + +public final class BuildsByBuilderResourcesImpl implements BuildsByBuilderResources { + private static final ClientLogger LOGGER = new ClientLogger(BuildsByBuilderResourcesImpl.class); + + private final BuildsByBuilderResourcesClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public BuildsByBuilderResourcesImpl(BuildsByBuilderResourcesClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String builderName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, builderName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BuildResourceImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String builderName, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, builderName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new BuildResourceImpl(inner1, this.manager())); + } + + private BuildsByBuilderResourcesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsClientImpl.java new file mode 100644 index 000000000000..c297118316ac --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsClientImpl.java @@ -0,0 +1,696 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appcontainers.fluent.BuildsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in BuildsClient. + */ +public final class BuildsClientImpl implements BuildsClient { + /** + * The proxy service used to perform REST calls. + */ + private final BuildsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of BuildsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + BuildsClientImpl(ContainerAppsApiClientImpl client) { + this.service = RestProxy.create(BuildsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientBuilds to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface BuildsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("builderName") String builderName, + @PathParam("buildName") String buildName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("builderName") String builderName, + @PathParam("buildName") String buildName, @BodyParam("application/json") BuildResourceInner buildEnvelope, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/builders/{builderName}/builds/{buildName}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("builderName") String builderName, + @PathParam("buildName") String buildName, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuildResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String builderName, + String buildName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (buildName == null) { + return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, builderName, buildName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuildResource along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String builderName, + String buildName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (buildName == null) { + return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, builderName, buildName, accept, context); + } + + /** + * Get a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuildResource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String builderName, String buildName) { + return getWithResponseAsync(resourceGroupName, builderName, buildName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuildResource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String builderName, String buildName, + Context context) { + return getWithResponseAsync(resourceGroupName, builderName, buildName, context).block(); + } + + /** + * Get a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuildResource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BuildResourceInner get(String resourceGroupName, String builderName, String buildName) { + return getWithResponse(resourceGroupName, builderName, buildName, Context.NONE).getValue(); + } + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information pertaining to an individual build along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String builderName, String buildName, BuildResourceInner buildEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (buildName == null) { + return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); + } + if (buildEnvelope == null) { + return Mono.error(new IllegalArgumentException("Parameter buildEnvelope is required and cannot be null.")); + } else { + buildEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, builderName, buildName, buildEnvelope, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information pertaining to an individual build along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String builderName, String buildName, BuildResourceInner buildEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (buildName == null) { + return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); + } + if (buildEnvelope == null) { + return Mono.error(new IllegalArgumentException("Parameter buildEnvelope is required and cannot be null.")); + } else { + buildEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, builderName, buildName, buildEnvelope, accept, context); + } + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of information pertaining to an individual build. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BuildResourceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String builderName, String buildName, BuildResourceInner buildEnvelope) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, builderName, buildName, buildEnvelope); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BuildResourceInner.class, BuildResourceInner.class, this.client.getContext()); + } + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of information pertaining to an individual build. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, BuildResourceInner> beginCreateOrUpdateAsync( + String resourceGroupName, String builderName, String buildName, BuildResourceInner buildEnvelope, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, builderName, buildName, buildEnvelope, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + BuildResourceInner.class, BuildResourceInner.class, context); + } + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of information pertaining to an individual build. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BuildResourceInner> beginCreateOrUpdate(String resourceGroupName, + String builderName, String buildName, BuildResourceInner buildEnvelope) { + return this.beginCreateOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope).getSyncPoller(); + } + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of information pertaining to an individual build. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, BuildResourceInner> beginCreateOrUpdate(String resourceGroupName, + String builderName, String buildName, BuildResourceInner buildEnvelope, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope, context) + .getSyncPoller(); + } + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information pertaining to an individual build on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String builderName, String buildName, + BuildResourceInner buildEnvelope) { + return beginCreateOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information pertaining to an individual build on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String builderName, String buildName, + BuildResourceInner buildEnvelope, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information pertaining to an individual build. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BuildResourceInner createOrUpdate(String resourceGroupName, String builderName, String buildName, + BuildResourceInner buildEnvelope) { + return createOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope).block(); + } + + /** + * Create a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param buildEnvelope Resource create or update parameters. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return information pertaining to an individual build. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BuildResourceInner createOrUpdate(String resourceGroupName, String builderName, String buildName, + BuildResourceInner buildEnvelope, Context context) { + return createOrUpdateAsync(resourceGroupName, builderName, buildName, buildEnvelope, context).block(); + } + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String builderName, + String buildName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (buildName == null) { + return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getApiVersion(), + this.client.getSubscriptionId(), resourceGroupName, builderName, buildName, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String builderName, + String buildName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (builderName == null) { + return Mono.error(new IllegalArgumentException("Parameter builderName is required and cannot be null.")); + } + if (buildName == null) { + return Mono.error(new IllegalArgumentException("Parameter buildName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getApiVersion(), this.client.getSubscriptionId(), + resourceGroupName, builderName, buildName, accept, context); + } + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String builderName, + String buildName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, builderName, buildName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String builderName, + String buildName, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, builderName, buildName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String builderName, + String buildName) { + return this.beginDeleteAsync(resourceGroupName, builderName, buildName).getSyncPoller(); + } + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String builderName, + String buildName, Context context) { + return this.beginDeleteAsync(resourceGroupName, builderName, buildName, context).getSyncPoller(); + } + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String builderName, String buildName) { + return beginDeleteAsync(resourceGroupName, builderName, buildName).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String builderName, String buildName, Context context) { + return beginDeleteAsync(resourceGroupName, builderName, buildName, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String builderName, String buildName) { + deleteAsync(resourceGroupName, builderName, buildName).block(); + } + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String builderName, String buildName, Context context) { + deleteAsync(resourceGroupName, builderName, buildName, context).block(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsImpl.java new file mode 100644 index 000000000000..7f29012d629e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BuildsImpl.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.BuildsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; +import com.azure.resourcemanager.appcontainers.models.BuildResource; +import com.azure.resourcemanager.appcontainers.models.Builds; + +public final class BuildsImpl implements Builds { + private static final ClientLogger LOGGER = new ClientLogger(BuildsImpl.class); + + private final BuildsClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public BuildsImpl(BuildsClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String resourceGroupName, String builderName, String buildName, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, builderName, buildName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new BuildResourceImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public BuildResource get(String resourceGroupName, String builderName, String buildName) { + BuildResourceInner inner = this.serviceClient().get(resourceGroupName, builderName, buildName); + if (inner != null) { + return new BuildResourceImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String builderName, String buildName) { + this.serviceClient().delete(resourceGroupName, builderName, buildName); + } + + public void delete(String resourceGroupName, String builderName, String buildName, Context context) { + this.serviceClient().delete(resourceGroupName, builderName, buildName, context); + } + + public BuildResource getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String builderName = ResourceManagerUtils.getValueFromIdByName(id, "builders"); + if (builderName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); + } + String buildName = ResourceManagerUtils.getValueFromIdByName(id, "builds"); + if (buildName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builds'.", id))); + } + return this.getWithResponse(resourceGroupName, builderName, buildName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String builderName = ResourceManagerUtils.getValueFromIdByName(id, "builders"); + if (builderName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); + } + String buildName = ResourceManagerUtils.getValueFromIdByName(id, "builds"); + if (buildName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builds'.", id))); + } + return this.getWithResponse(resourceGroupName, builderName, buildName, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String builderName = ResourceManagerUtils.getValueFromIdByName(id, "builders"); + if (builderName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); + } + String buildName = ResourceManagerUtils.getValueFromIdByName(id, "builds"); + if (buildName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builds'.", id))); + } + this.delete(resourceGroupName, builderName, buildName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String builderName = ResourceManagerUtils.getValueFromIdByName(id, "builders"); + if (builderName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builders'.", id))); + } + String buildName = ResourceManagerUtils.getValueFromIdByName(id, "builds"); + if (buildName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'builds'.", id))); + } + this.delete(resourceGroupName, builderName, buildName, context); + } + + private BuildsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + public BuildResourceImpl define(String name) { + return new BuildResourceImpl(name, this.manager()); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificateImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificateImpl.java index 2c083dfc0e7c..237e1e0d2aa2 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 @@ -87,24 +87,17 @@ public CertificateImpl withExistingConnectedEnvironment(String resourceGroupName } public Certificate create() { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironmentsCertificates() - .createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, certificateName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsCertificates() + .createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, this.innerModel(), + Context.NONE) + .getValue(); return this; } public Certificate create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironmentsCertificates() - .createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, certificateName, this.innerModel(), context) - .getValue(); + this.innerObject + = serviceManager.serviceClient().getConnectedEnvironmentsCertificates().createOrUpdateWithResponse( + resourceGroupName, connectedEnvironmentName, certificateName, this.innerModel(), context).getValue(); return this; } @@ -120,57 +113,40 @@ public CertificateImpl update() { } public Certificate apply() { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironmentsCertificates() - .updateWithResponse( - resourceGroupName, - connectedEnvironmentName, - certificateName, - updateCertificateEnvelope, - Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsCertificates() + .updateWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, updateCertificateEnvelope, + Context.NONE) + .getValue(); return this; } public Certificate apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironmentsCertificates() - .updateWithResponse( - resourceGroupName, connectedEnvironmentName, certificateName, updateCertificateEnvelope, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsCertificates() + .updateWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, updateCertificateEnvelope, + context) + .getValue(); return this; } - CertificateImpl( - CertificateInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + CertificateImpl(CertificateInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.connectedEnvironmentName = Utils.getValueFromIdByName(innerObject.id(), "connectedEnvironments"); - this.certificateName = Utils.getValueFromIdByName(innerObject.id(), "certificates"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.connectedEnvironmentName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "connectedEnvironments"); + this.certificateName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "certificates"); } public Certificate refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironmentsCertificates() - .getWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsCertificates() + .getWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, Context.NONE).getValue(); return this; } public Certificate refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironmentsCertificates() - .getWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().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 3e60f999c0ac..3a3b7b71bd48 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 @@ -35,144 +35,121 @@ import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in CertificatesClient. */ +/** + * An instance of this class provides access to all the operations defined in CertificatesClient. + */ public final class CertificatesClientImpl implements CertificatesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final CertificatesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerAppsApiClientImpl client; /** * Initializes an instance of CertificatesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ CertificatesClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy.create(CertificatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(CertificatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ContainerAppsApiClientCertificates to be used by the proxy service to - * perform REST calls. + * The interface defining all the services for ContainerAppsApiClientCertificates to be used by the proxy service + * to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") public interface CertificatesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("certificateName") String certificateName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("environmentName") String environmentName, @PathParam("certificateName") String certificateName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("certificateName") String certificateName, + @PathParam("environmentName") String environmentName, @PathParam("certificateName") String certificateName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CertificateInner certificateEnvelope, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") CertificateInner certificateEnvelope, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete( - @HostParam("$host") String endpoint, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("certificateName") String certificateName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("environmentName") String environmentName, @PathParam("certificateName") String certificateName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/certificates/{certificateName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> update( - @HostParam("$host") String endpoint, + Mono> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("certificateName") String certificateName, + @PathParam("environmentName") String environmentName, @PathParam("certificateName") String certificateName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CertificatePatch certificateEnvelope, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") CertificatePatch certificateEnvelope, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Get the Certificates in a given managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Certificates in a given managed environment along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String environmentName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String environmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -184,32 +161,16 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the Certificates in a given managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param context The context to associate with this operation. @@ -217,22 +178,18 @@ private Mono> listSinglePageAsync( * @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 Certificates in a given managed environment along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String environmentName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String environmentName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -245,28 +202,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, environmentName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the Certificates in a given managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -276,14 +220,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String environmentName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, environmentName), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Get the Certificates in a given managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param context The context to associate with this operation. @@ -294,14 +237,13 @@ private PagedFlux listAsync(String resourceGroupName, String e */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String environmentName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, environmentName, context), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Get the Certificates in a given managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -316,7 +258,7 @@ public PagedIterable list(String resourceGroupName, String env /** * Get the Certificates in a given managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param context The context to associate with this operation. @@ -332,7 +274,7 @@ public PagedIterable list(String resourceGroupName, String env /** * Get the specified 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. @@ -342,19 +284,15 @@ public PagedIterable list(String resourceGroupName, String env * @return the specified Certificate along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String environmentName, String certificateName) { + private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, + String certificateName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -370,24 +308,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - certificateName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, certificateName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the specified 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. @@ -398,19 +326,15 @@ private Mono> getWithResponseAsync( * @return the specified Certificate along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String environmentName, String certificateName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, + String certificateName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -426,21 +350,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - certificateName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, certificateName, this.client.getApiVersion(), accept, context); } /** * Get the specified 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. @@ -457,7 +373,7 @@ private Mono getAsync(String resourceGroupName, String environ /** * Get the specified 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. @@ -468,14 +384,14 @@ private Mono getAsync(String resourceGroupName, String environ * @return the specified Certificate along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String environmentName, String certificateName, Context context) { + public Response getWithResponse(String resourceGroupName, String environmentName, + String certificateName, Context context) { return getWithResponseAsync(resourceGroupName, environmentName, certificateName, context).block(); } /** * Get the specified 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. @@ -491,7 +407,7 @@ public CertificateInner get(String resourceGroupName, String environmentName, St /** * 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. @@ -499,26 +415,19 @@ public CertificateInner get(String resourceGroupName, String environmentName, St * @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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response} on successful completion of {@link Mono}. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String environmentName, - String certificateName, - CertificateInner certificateEnvelope) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String environmentName, String certificateName, CertificateInner certificateEnvelope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -537,25 +446,15 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - certificateName, - this.client.getApiVersion(), - certificateEnvelope, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, certificateName, this.client.getApiVersion(), certificateEnvelope, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -564,27 +463,19 @@ private Mono> createOrUpdateWithResponseAsync( * @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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response} on successful completion of {@link Mono}. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String environmentName, - String certificateName, - CertificateInner certificateEnvelope, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String environmentName, String certificateName, CertificateInner certificateEnvelope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -603,22 +494,13 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - certificateName, - this.client.getApiVersion(), - certificateEnvelope, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, certificateName, this.client.getApiVersion(), certificateEnvelope, accept, context); } /** * 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. @@ -626,11 +508,11 @@ private Mono> createOrUpdateWithResponseAsync( * @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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String environmentName, String certificateName) { + private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, + String certificateName) { final CertificateInner certificateEnvelope = null; return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, certificateName, certificateEnvelope) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -638,7 +520,7 @@ private Mono createOrUpdateAsync( /** * 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. @@ -647,24 +529,19 @@ private Mono createOrUpdateAsync( * @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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response}. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String environmentName, - String certificateName, - CertificateInner certificateEnvelope, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, environmentName, certificateName, certificateEnvelope, context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, String environmentName, + String certificateName, CertificateInner certificateEnvelope, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, certificateName, certificateEnvelope, + context).block(); } /** * 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. @@ -676,14 +553,13 @@ public Response createOrUpdateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) public CertificateInner createOrUpdate(String resourceGroupName, String environmentName, String certificateName) { final CertificateInner certificateEnvelope = null; - return createOrUpdateWithResponse( - resourceGroupName, environmentName, certificateName, certificateEnvelope, Context.NONE) - .getValue(); + return createOrUpdateWithResponse(resourceGroupName, environmentName, certificateName, certificateEnvelope, + Context.NONE).getValue(); } /** * Deletes the specified 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. @@ -693,19 +569,15 @@ public CertificateInner createOrUpdate(String resourceGroupName, String environm * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String environmentName, String certificateName) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String environmentName, + String certificateName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -721,24 +593,14 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - certificateName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, certificateName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the specified 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. @@ -749,19 +611,15 @@ private Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String environmentName, String certificateName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String environmentName, + String certificateName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -777,21 +635,13 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - certificateName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, certificateName, this.client.getApiVersion(), accept, context); } /** * Deletes the specified 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. @@ -808,7 +658,7 @@ private Mono deleteAsync(String resourceGroupName, String environmentName, /** * Deletes the specified 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. @@ -819,14 +669,14 @@ private Mono deleteAsync(String resourceGroupName, String environmentName, * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String environmentName, String certificateName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String environmentName, String certificateName, + Context context) { return deleteWithResponseAsync(resourceGroupName, environmentName, certificateName, context).block(); } /** * Deletes the specified 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. @@ -841,9 +691,9 @@ public void delete(String resourceGroupName, String environmentName, String cert /** * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * + * + * 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. @@ -851,26 +701,19 @@ public void delete(String resourceGroupName, String environmentName, String cert * @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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response} on successful completion of {@link Mono}. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String environmentName, - String certificateName, - CertificatePatch certificateEnvelope) { + private Mono> updateWithResponseAsync(String resourceGroupName, String environmentName, + String certificateName, CertificatePatch certificateEnvelope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -892,27 +735,17 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - certificateName, - this.client.getApiVersion(), - certificateEnvelope, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, certificateName, this.client.getApiVersion(), certificateEnvelope, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * + * + * 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. @@ -921,27 +754,19 @@ 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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response} on successful completion of {@link Mono}. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String environmentName, - String certificateName, - CertificatePatch certificateEnvelope, - Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, String environmentName, + String certificateName, CertificatePatch certificateEnvelope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -963,24 +788,15 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - certificateName, - this.client.getApiVersion(), - certificateEnvelope, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, certificateName, this.client.getApiVersion(), certificateEnvelope, accept, context); } /** * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * + * + * 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. @@ -989,13 +805,10 @@ private Mono> updateWithResponseAsync( * @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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String environmentName, - String certificateName, + private Mono updateAsync(String resourceGroupName, String environmentName, String certificateName, CertificatePatch certificateEnvelope) { return updateWithResponseAsync(resourceGroupName, environmentName, certificateName, certificateEnvelope) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -1003,9 +816,9 @@ private Mono updateAsync( /** * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * + * + * 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. @@ -1014,26 +827,21 @@ 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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response}. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String environmentName, - String certificateName, - CertificatePatch certificateEnvelope, - Context context) { - return updateWithResponseAsync( - resourceGroupName, environmentName, certificateName, certificateEnvelope, context) - .block(); + public Response updateWithResponse(String resourceGroupName, String environmentName, + String certificateName, CertificatePatch certificateEnvelope, Context context) { + return updateWithResponseAsync(resourceGroupName, environmentName, certificateName, certificateEnvelope, + context).block(); } /** * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * + * + * 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. @@ -1044,21 +852,18 @@ public Response updateWithResponse( * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CertificateInner update( - String resourceGroupName, - String environmentName, - String certificateName, + public CertificateInner update(String resourceGroupName, String environmentName, String certificateName, CertificatePatch certificateEnvelope) { - return updateWithResponse( - resourceGroupName, environmentName, certificateName, certificateEnvelope, Context.NONE) - .getValue(); + return updateWithResponse(resourceGroupName, environmentName, certificateName, certificateEnvelope, + Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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. @@ -1070,31 +875,22 @@ private Mono> listNextSinglePageAsync(String nex return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1107,23 +903,13 @@ private Mono> listNextSinglePageAsync(String nex return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesImpl.java index 9a24cb875758..bb48fdd2cdf8 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 @@ -22,8 +22,7 @@ public final class CertificatesImpl implements Certificates { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - public CertificatesImpl( - CertificatesClient innerClient, + public CertificatesImpl(CertificatesClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -31,23 +30,20 @@ public CertificatesImpl( public PagedIterable list(String resourceGroupName, String environmentName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName); - return Utils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String environmentName, Context context) { PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName, context); - return Utils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String environmentName, String certificateName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, environmentName, certificateName, context); + public Response getWithResponse(String resourceGroupName, String environmentName, + String certificateName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, environmentName, certificateName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CertificateImpl(inner.getValue(), this.manager())); } else { return null; @@ -63,22 +59,12 @@ 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); + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CertificateImpl(inner.getValue(), this.manager())); } else { return null; @@ -86,8 +72,8 @@ public Response createOrUpdateWithResponse( } public Certificate createOrUpdate(String resourceGroupName, String environmentName, String certificateName) { - CertificateInner inner = - this.serviceClient().createOrUpdate(resourceGroupName, environmentName, certificateName); + CertificateInner inner + = this.serviceClient().createOrUpdate(resourceGroupName, environmentName, certificateName); if (inner != null) { return new CertificateImpl(inner, this.manager()); } else { @@ -95,8 +81,8 @@ public Certificate createOrUpdate(String resourceGroupName, String environmentNa } } - public Response deleteWithResponse( - String resourceGroupName, String environmentName, String certificateName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String environmentName, String certificateName, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, certificateName, context); } @@ -104,34 +90,22 @@ public void delete(String resourceGroupName, String environmentName, String cert this.serviceClient().delete(resourceGroupName, environmentName, certificateName); } - public Response updateWithResponse( - String resourceGroupName, - String environmentName, - String certificateName, - CertificatePatch certificateEnvelope, - Context context) { - Response inner = - this - .serviceClient() - .updateWithResponse(resourceGroupName, environmentName, certificateName, certificateEnvelope, context); + 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(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CertificateImpl(inner.getValue(), this.manager())); } else { return null; } } - public Certificate update( - String resourceGroupName, - String environmentName, - String certificateName, + public Certificate update(String resourceGroupName, String environmentName, String certificateName, CertificatePatch certificateEnvelope) { - CertificateInner inner = - this.serviceClient().update(resourceGroupName, environmentName, certificateName, certificateEnvelope); + CertificateInner inner + = this.serviceClient().update(resourceGroupName, environmentName, certificateName, certificateEnvelope); if (inner != null) { return new CertificateImpl(inner, this.manager()); } else { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CheckNameAvailabilityResponseImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CheckNameAvailabilityResponseImpl.java index 59b89b6157c1..fcc2727cde3d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CheckNameAvailabilityResponseImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CheckNameAvailabilityResponseImpl.java @@ -13,8 +13,7 @@ public final class CheckNameAvailabilityResponseImpl implements CheckNameAvailab private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - CheckNameAvailabilityResponseImpl( - CheckNameAvailabilityResponseInner innerObject, + CheckNameAvailabilityResponseImpl(CheckNameAvailabilityResponseInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentImpl.java index 316012fa67de..a733c450c07e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentImpl.java @@ -111,25 +111,19 @@ public ConnectedEnvironmentImpl withExistingResourceGroup(String resourceGroupNa } public ConnectedEnvironment create() { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironments() - .createOrUpdate(resourceGroupName, connectedEnvironmentName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getConnectedEnvironments().createOrUpdate(resourceGroupName, + connectedEnvironmentName, this.innerModel(), Context.NONE); return this; } public ConnectedEnvironment create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironments() - .createOrUpdate(resourceGroupName, connectedEnvironmentName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getConnectedEnvironments().createOrUpdate(resourceGroupName, + connectedEnvironmentName, this.innerModel(), context); return this; } - ConnectedEnvironmentImpl( - String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + ConnectedEnvironmentImpl(String name, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = new ConnectedEnvironmentInner(); this.serviceManager = serviceManager; this.connectedEnvironmentName = name; @@ -140,65 +134,48 @@ public ConnectedEnvironmentImpl update() { } public ConnectedEnvironment apply() { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironments() - .createOrUpdate(resourceGroupName, connectedEnvironmentName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getConnectedEnvironments().createOrUpdate(resourceGroupName, + connectedEnvironmentName, this.innerModel(), Context.NONE); return this; } public ConnectedEnvironment apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironments() - .createOrUpdate(resourceGroupName, connectedEnvironmentName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getConnectedEnvironments().createOrUpdate(resourceGroupName, + connectedEnvironmentName, this.innerModel(), context); return this; } - ConnectedEnvironmentImpl( - ConnectedEnvironmentInner innerObject, + ConnectedEnvironmentImpl(ConnectedEnvironmentInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.connectedEnvironmentName = Utils.getValueFromIdByName(innerObject.id(), "connectedEnvironments"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.connectedEnvironmentName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "connectedEnvironments"); } public ConnectedEnvironment refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironments() - .getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getConnectedEnvironments() + .getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, Context.NONE).getValue(); return this; } public ConnectedEnvironment refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironments() - .getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getConnectedEnvironments() + .getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, context).getValue(); return this; } - public Response checkNameAvailabilityWithResponse( - CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context) { - return serviceManager - .connectedEnvironments() - .checkNameAvailabilityWithResponse( - resourceGroupName, connectedEnvironmentName, checkNameAvailabilityRequest, context); + public Response + checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context) { + return serviceManager.connectedEnvironments().checkNameAvailabilityWithResponse(resourceGroupName, + connectedEnvironmentName, checkNameAvailabilityRequest, context); } - public CheckNameAvailabilityResponse checkNameAvailability( - CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - return serviceManager - .connectedEnvironments() - .checkNameAvailability(resourceGroupName, connectedEnvironmentName, checkNameAvailabilityRequest); + public CheckNameAvailabilityResponse + checkNameAvailability(CheckNameAvailabilityRequest checkNameAvailabilityRequest) { + return serviceManager.connectedEnvironments().checkNameAvailability(resourceGroupName, connectedEnvironmentName, + checkNameAvailabilityRequest); } public ConnectedEnvironmentImpl withRegion(Region location) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStorageImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStorageImpl.java index 4e0adba8acb4..1dfa1dde464c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStorageImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStorageImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner; import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorage; @@ -31,6 +32,10 @@ public ConnectedEnvironmentStorageProperties properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String resourceGroupName() { return resourceGroupName; } @@ -49,37 +54,27 @@ private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager( private String storageName; - public ConnectedEnvironmentStorageImpl withExistingConnectedEnvironment( - String resourceGroupName, String connectedEnvironmentName) { + public ConnectedEnvironmentStorageImpl withExistingConnectedEnvironment(String resourceGroupName, + String connectedEnvironmentName) { this.resourceGroupName = resourceGroupName; this.connectedEnvironmentName = connectedEnvironmentName; return this; } public ConnectedEnvironmentStorage create() { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironmentsStorages() - .createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsStorages().createOrUpdateWithResponse( + resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), Context.NONE).getValue(); return this; } public ConnectedEnvironmentStorage create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironmentsStorages() - .createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsStorages().createOrUpdateWithResponse( + resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), context).getValue(); return this; } - ConnectedEnvironmentStorageImpl( - String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + ConnectedEnvironmentStorageImpl(String name, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = new ConnectedEnvironmentStorageInner(); this.serviceManager = serviceManager; this.storageName = name; @@ -90,54 +85,36 @@ public ConnectedEnvironmentStorageImpl update() { } public ConnectedEnvironmentStorage apply() { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironmentsStorages() - .createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsStorages().createOrUpdateWithResponse( + resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), Context.NONE).getValue(); return this; } public ConnectedEnvironmentStorage apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironmentsStorages() - .createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsStorages().createOrUpdateWithResponse( + resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), context).getValue(); return this; } - ConnectedEnvironmentStorageImpl( - ConnectedEnvironmentStorageInner innerObject, + ConnectedEnvironmentStorageImpl(ConnectedEnvironmentStorageInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.connectedEnvironmentName = Utils.getValueFromIdByName(innerObject.id(), "connectedEnvironments"); - this.storageName = Utils.getValueFromIdByName(innerObject.id(), "storages"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.connectedEnvironmentName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "connectedEnvironments"); + this.storageName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "storages"); } public ConnectedEnvironmentStorage refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironmentsStorages() - .getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsStorages() + .getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, Context.NONE).getValue(); return this; } public ConnectedEnvironmentStorage refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironmentsStorages() - .getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsStorages() + .getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context).getValue(); return this; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStoragesCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStoragesCollectionImpl.java index e3f77be64af1..98958a7e2466 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStoragesCollectionImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStoragesCollectionImpl.java @@ -17,8 +17,7 @@ public final class ConnectedEnvironmentStoragesCollectionImpl implements Connect private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - ConnectedEnvironmentStoragesCollectionImpl( - ConnectedEnvironmentStoragesCollectionInner innerObject, + ConnectedEnvironmentStoragesCollectionImpl(ConnectedEnvironmentStoragesCollectionInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -27,12 +26,9 @@ public final class ConnectedEnvironmentStoragesCollectionImpl implements Connect public List value() { List inner = this.innerModel().value(); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new ConnectedEnvironmentStorageImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList( + inner.stream().map(inner1 -> new ConnectedEnvironmentStorageImpl(inner1, this.manager())) + .collect(Collectors.toList())); } else { return Collections.emptyList(); } 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 5e48209c0144..be1c333d2d80 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 @@ -39,184 +39,140 @@ * An instance of this class provides access to all the operations defined in ConnectedEnvironmentsCertificatesClient. */ public final class ConnectedEnvironmentsCertificatesClientImpl implements ConnectedEnvironmentsCertificatesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ConnectedEnvironmentsCertificatesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerAppsApiClientImpl client; /** * Initializes an instance of ConnectedEnvironmentsCertificatesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ConnectedEnvironmentsCertificatesClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create( - ConnectedEnvironmentsCertificatesService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ConnectedEnvironmentsCertificatesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ContainerAppsApiClientConnectedEnvironmentsCertificates to be used by - * the proxy service to perform REST calls. + * The interface defining all the services for ContainerAppsApiClientConnectedEnvironmentsCertificates to be used + * by the proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") public interface ConnectedEnvironmentsCertificatesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("certificateName") String certificateName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("certificateName") String certificateName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("certificateName") String certificateName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CertificateInner certificateEnvelope, - @HeaderParam("Accept") String accept, + @PathParam("certificateName") String certificateName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CertificateInner certificateEnvelope, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete( - @HostParam("$host") String endpoint, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("certificateName") String certificateName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("certificateName") String certificateName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/certificates/{certificateName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> update( - @HostParam("$host") String endpoint, + Mono> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("certificateName") String certificateName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") CertificatePatch certificateEnvelope, - @HeaderParam("Accept") String accept, + @PathParam("certificateName") String certificateName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") CertificatePatch certificateEnvelope, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Get the Certificates in a given connected environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Connected Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Certificates in a given connected environment along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String connectedEnvironmentName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String connectedEnvironmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, connectedEnvironmentName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the Certificates in a given connected environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Connected Environment. * @param context The context to associate with this operation. @@ -224,57 +180,39 @@ private Mono> listSinglePageAsync( * @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 Certificates in a given connected environment along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String connectedEnvironmentName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String connectedEnvironmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + connectedEnvironmentName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the Certificates in a given connected environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Connected Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -284,14 +222,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String connectedEnvironmentName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, connectedEnvironmentName), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, connectedEnvironmentName), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Get the Certificates in a given connected environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Connected Environment. * @param context The context to associate with this operation. @@ -301,16 +238,15 @@ private PagedFlux listAsync(String resourceGroupName, String c * @return the Certificates in a given connected environment as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String connectedEnvironmentName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, connectedEnvironmentName, context), + private PagedFlux listAsync(String resourceGroupName, String connectedEnvironmentName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, connectedEnvironmentName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Get the Certificates in a given connected environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Connected Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -325,7 +261,7 @@ public PagedIterable list(String resourceGroupName, String con /** * Get the Certificates in a given connected environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Connected Environment. * @param context The context to associate with this operation. @@ -335,14 +271,14 @@ public PagedIterable list(String resourceGroupName, String con * @return the Certificates in a given connected environment as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String connectedEnvironmentName, Context context) { + public PagedIterable list(String resourceGroupName, String connectedEnvironmentName, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, connectedEnvironmentName, context)); } /** * 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. @@ -352,28 +288,23 @@ public PagedIterable list( * @return the specified Certificate along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, String certificateName) { + private Mono> getWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, String certificateName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (certificateName == null) { return Mono @@ -382,23 +313,14 @@ private Mono> getWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - certificateName, - this.client.getApiVersion(), - accept, - context)) + context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + connectedEnvironmentName, certificateName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -409,28 +331,23 @@ private Mono> getWithResponseAsync( * @return the specified Certificate along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, String certificateName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (certificateName == null) { return Mono @@ -438,21 +355,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - certificateName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + connectedEnvironmentName, certificateName, this.client.getApiVersion(), accept, context); } /** * 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. @@ -462,15 +371,15 @@ private Mono> getWithResponseAsync( * @return the specified Certificate on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String connectedEnvironmentName, String certificateName) { + private Mono getAsync(String resourceGroupName, String connectedEnvironmentName, + String certificateName) { return getWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -481,14 +390,14 @@ private Mono getAsync( * @return the specified Certificate along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context) { + public Response getWithResponse(String resourceGroupName, String connectedEnvironmentName, + String certificateName, Context context) { return getWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName, context).block(); } /** * 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. @@ -504,7 +413,7 @@ public CertificateInner get(String resourceGroupName, String connectedEnvironmen /** * Create or Update a 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. @@ -512,35 +421,27 @@ public CertificateInner get(String resourceGroupName, String connectedEnvironmen * @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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response} on successful completion of {@link Mono}. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificateInner certificateEnvelope) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, String certificateName, CertificateInner certificateEnvelope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (certificateName == null) { return Mono @@ -551,25 +452,15 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - certificateName, - this.client.getApiVersion(), - certificateEnvelope, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, connectedEnvironmentName, certificateName, this.client.getApiVersion(), + certificateEnvelope, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create or Update a 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. @@ -578,36 +469,28 @@ private Mono> createOrUpdateWithResponseAsync( * @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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response} on successful completion of {@link Mono}. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificateInner certificateEnvelope, + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, String certificateName, CertificateInner certificateEnvelope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (certificateName == null) { return Mono @@ -618,22 +501,14 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - certificateName, - this.client.getApiVersion(), - certificateEnvelope, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + connectedEnvironmentName, certificateName, this.client.getApiVersion(), certificateEnvelope, accept, + context); } /** * Create or Update a 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. @@ -641,20 +516,19 @@ private Mono> createOrUpdateWithResponseAsync( * @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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String connectedEnvironmentName, String certificateName) { + private Mono createOrUpdateAsync(String resourceGroupName, String connectedEnvironmentName, + String certificateName) { final CertificateInner certificateEnvelope = null; - return createOrUpdateWithResponseAsync( - resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + return createOrUpdateWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName, + certificateEnvelope).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Create or Update a 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. @@ -663,24 +537,20 @@ private Mono createOrUpdateAsync( * @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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response}. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificateInner certificateEnvelope, + public Response createOrUpdateWithResponse(String resourceGroupName, + String connectedEnvironmentName, String certificateName, CertificateInner certificateEnvelope, Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, context) - .block(); + return createOrUpdateWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName, + certificateEnvelope, context).block(); } /** * Create or Update a 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. @@ -690,17 +560,16 @@ public Response createOrUpdateWithResponse( * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CertificateInner createOrUpdate( - String resourceGroupName, String connectedEnvironmentName, String certificateName) { + public CertificateInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, + String certificateName) { final CertificateInner certificateEnvelope = null; - return createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, Context.NONE) - .getValue(); + return createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, + certificateEnvelope, Context.NONE).getValue(); } /** * 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. @@ -710,28 +579,23 @@ public CertificateInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, String certificateName) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String connectedEnvironmentName, + String certificateName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (certificateName == null) { return Mono @@ -740,23 +604,14 @@ private Mono> deleteWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - certificateName, - this.client.getApiVersion(), - accept, - context)) + context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + connectedEnvironmentName, certificateName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -767,28 +622,23 @@ private Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String connectedEnvironmentName, + String certificateName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (certificateName == null) { return Mono @@ -796,21 +646,13 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - certificateName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + connectedEnvironmentName, certificateName, this.client.getApiVersion(), accept, context); } /** * 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. @@ -827,7 +669,7 @@ private Mono deleteAsync(String resourceGroupName, String connectedEnviron /** * 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. @@ -838,14 +680,14 @@ private Mono deleteAsync(String resourceGroupName, String connectedEnviron * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, + String certificateName, Context context) { return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName, context).block(); } /** * 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. @@ -860,9 +702,9 @@ public void delete(String resourceGroupName, String connectedEnvironmentName, St /** * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * + * + * Patches a certificate. Currently only patching of tags is supported. + * * @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. @@ -870,35 +712,27 @@ public void delete(String resourceGroupName, String connectedEnvironmentName, St * @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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response} on successful completion of {@link Mono}. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificatePatch certificateEnvelope) { + private Mono> updateWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, String certificateName, CertificatePatch certificateEnvelope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (certificateName == null) { return Mono @@ -912,27 +746,17 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - certificateName, - this.client.getApiVersion(), - certificateEnvelope, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, connectedEnvironmentName, certificateName, this.client.getApiVersion(), + certificateEnvelope, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * + * + * Patches a certificate. Currently only patching of tags is supported. + * * @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. @@ -941,36 +765,28 @@ 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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response} on successful completion of {@link Mono}. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificatePatch certificateEnvelope, + private Mono> updateWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, String certificateName, CertificatePatch certificateEnvelope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (certificateName == null) { return Mono @@ -984,24 +800,16 @@ private Mono> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - certificateName, - this.client.getApiVersion(), - certificateEnvelope, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + connectedEnvironmentName, certificateName, this.client.getApiVersion(), certificateEnvelope, accept, + context); } /** * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * + * + * Patches a certificate. Currently only patching of tags is supported. + * * @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. @@ -1010,24 +818,20 @@ private Mono> updateWithResponseAsync( * @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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificatePatch certificateEnvelope) { - return updateWithResponseAsync( - resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono updateAsync(String resourceGroupName, String connectedEnvironmentName, + String certificateName, CertificatePatch certificateEnvelope) { + return updateWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName, + certificateEnvelope).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * + * + * Patches a certificate. Currently only patching of tags is supported. + * * @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. @@ -1036,26 +840,21 @@ 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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link - * Response}. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, - CertificatePatch certificateEnvelope, - Context context) { - return updateWithResponseAsync( - resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, context) - .block(); + public Response updateWithResponse(String resourceGroupName, String connectedEnvironmentName, + String certificateName, CertificatePatch certificateEnvelope, Context context) { + return updateWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName, + certificateEnvelope, context).block(); } /** * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * + * + * Patches a certificate. Currently only patching of tags is supported. + * * @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. @@ -1066,21 +865,18 @@ public Response updateWithResponse( * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CertificateInner update( - String resourceGroupName, - String connectedEnvironmentName, - String certificateName, + public CertificateInner update(String resourceGroupName, String connectedEnvironmentName, String certificateName, CertificatePatch certificateEnvelope) { - return updateWithResponse( - resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, Context.NONE) - .getValue(); + return updateWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, + Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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. @@ -1092,31 +888,22 @@ private Mono> listNextSinglePageAsync(String nex return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1129,23 +916,13 @@ private Mono> listNextSinglePageAsync(String nex return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesImpl.java index 6c5a00ced3de..599b752b8e5b 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 @@ -21,8 +21,7 @@ public final class ConnectedEnvironmentsCertificatesImpl implements ConnectedEnv private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - public ConnectedEnvironmentsCertificatesImpl( - ConnectedEnvironmentsCertificatesClient innerClient, + public ConnectedEnvironmentsCertificatesImpl(ConnectedEnvironmentsCertificatesClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -30,24 +29,21 @@ public ConnectedEnvironmentsCertificatesImpl( public PagedIterable list(String resourceGroupName, String connectedEnvironmentName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, connectedEnvironmentName); - return Utils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String connectedEnvironmentName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, connectedEnvironmentName, context); - return Utils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, connectedEnvironmentName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, context); + public Response getWithResponse(String resourceGroupName, String connectedEnvironmentName, + String certificateName, Context context) { + Response inner = this.serviceClient().getWithResponse(resourceGroupName, + connectedEnvironmentName, certificateName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CertificateImpl(inner.getValue(), this.manager())); } else { return null; @@ -63,11 +59,10 @@ public Certificate get(String resourceGroupName, String connectedEnvironmentName } } - public Response deleteWithResponse( - String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context) { - return this - .serviceClient() - .deleteWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, context); + public Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, + String certificateName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, + context); } public void delete(String resourceGroupName, String connectedEnvironmentName, String certificateName) { @@ -75,119 +70,78 @@ public void delete(String resourceGroupName, String connectedEnvironmentName, St } public Certificate getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String connectedEnvironmentName = ResourceManagerUtils.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))); + 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"); + String certificateName = ResourceManagerUtils.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))); + 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) + return this.getWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, Context.NONE) .getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String connectedEnvironmentName = ResourceManagerUtils.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))); + 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"); + String certificateName = ResourceManagerUtils.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))); + 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"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String connectedEnvironmentName = ResourceManagerUtils.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))); + 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"); + String certificateName = ResourceManagerUtils.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))); + 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"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String connectedEnvironmentName = ResourceManagerUtils.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))); + 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"); + String certificateName = ResourceManagerUtils.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))); + 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); } 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 e502ade54c63..ab3ab2053e3f 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 @@ -42,23 +42,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ConnectedEnvironmentsClient. */ +/** + * An instance of this class provides access to all the operations defined in ConnectedEnvironmentsClient. + */ public final class ConnectedEnvironmentsClientImpl implements ConnectedEnvironmentsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ConnectedEnvironmentsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerAppsApiClientImpl client; /** * Initializes an instance of ConnectedEnvironmentsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ConnectedEnvironmentsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create(ConnectedEnvironmentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ConnectedEnvironmentsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -69,228 +74,166 @@ public final class ConnectedEnvironmentsClientImpl implements ConnectedEnvironme @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") public interface ConnectedEnvironmentsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/connectedEnvironments") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ConnectedEnvironmentInner environmentEnvelope, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> update( - @HostParam("$host") String endpoint, + Mono> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/checkNameAvailability") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/checkNameAvailability") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> checkNameAvailability( - @HostParam("$host") String endpoint, + Mono> checkNameAvailability(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") CheckNameAvailabilityRequest checkNameAvailabilityRequest, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Get all connectedEnvironments for a subscription. - * + * * @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 all connectedEnvironments for a subscription along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get all connectedEnvironments for a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all connectedEnvironments for a subscription along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get all connectedEnvironments for a subscription. - * + * * @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 all connectedEnvironments for a subscription as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** * Get all connectedEnvironments for a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -299,13 +242,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** * Get all connectedEnvironments for a subscription. - * + * * @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 all connectedEnvironments for a subscription as paginated response with {@link PagedIterable}. @@ -317,7 +260,7 @@ public PagedIterable list() { /** * Get all connectedEnvironments for a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -331,28 +274,24 @@ public PagedIterable list(Context context) { /** * Get all connectedEnvironments in a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 all connectedEnvironments in a resource group along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName) { + private Mono> + listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -360,53 +299,34 @@ private Mono> listByResourceGroupSingle } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get all connectedEnvironments in a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all connectedEnvironments in a resource group along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -415,27 +335,15 @@ private Mono> listByResourceGroupSingle final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get all connectedEnvironments in a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -444,14 +352,13 @@ private Mono> listByResourceGroupSingle */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Get all connectedEnvironments in a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -461,14 +368,13 @@ private PagedFlux listByResourceGroupAsync(String res */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * Get all connectedEnvironments in a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -482,7 +388,7 @@ public PagedIterable listByResourceGroup(String resou /** * Get all connectedEnvironments in a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -497,107 +403,82 @@ public PagedIterable listByResourceGroup(String resou /** * Get the properties of an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @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 properties of an connectedEnvironment along with {@link Response} on successful completion of {@link - * Mono}. + * @return the properties of an connectedEnvironment along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - accept, - context)) + context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, connectedEnvironmentName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the properties of an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of an connectedEnvironment along with {@link Response} on successful completion of {@link - * Mono}. + * @return the properties of an connectedEnvironment along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + connectedEnvironmentName, this.client.getApiVersion(), accept, context); } /** * Get the properties of an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -606,15 +487,15 @@ private Mono> getByResourceGroupWithResponse * @return the properties of an connectedEnvironment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getByResourceGroupAsync( - String resourceGroupName, String connectedEnvironmentName) { + private Mono getByResourceGroupAsync(String resourceGroupName, + String connectedEnvironmentName) { return getByResourceGroupWithResponseAsync(resourceGroupName, connectedEnvironmentName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get the properties of an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @param context The context to associate with this operation. @@ -624,14 +505,14 @@ private Mono getByResourceGroupAsync( * @return the properties of an connectedEnvironment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String connectedEnvironmentName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, + String connectedEnvironmentName, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, connectedEnvironmentName, context).block(); } /** * Get the properties of an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -646,7 +527,7 @@ public ConnectedEnvironmentInner getByResourceGroup(String resourceGroupName, St /** * Creates or updates an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @param environmentEnvelope Configuration details of the connectedEnvironment. @@ -654,31 +535,26 @@ public ConnectedEnvironmentInner getByResourceGroup(String resourceGroupName, St * @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 Kubernetes cluster specialized for web workloads by Azure App Service along with - * {@link Response} on successful completion of {@link Mono}. + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (environmentEnvelope == null) { return Mono @@ -688,24 +564,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - environmentEnvelope, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, connectedEnvironmentName, this.client.getApiVersion(), environmentEnvelope, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @param environmentEnvelope Configuration details of the connectedEnvironment. @@ -714,34 +581,26 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 Kubernetes cluster specialized for web workloads by Azure App Service along with - * {@link Response} on successful completion of {@link Mono}. + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String connectedEnvironmentName, - ConnectedEnvironmentInner environmentEnvelope, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (environmentEnvelope == null) { return Mono @@ -751,21 +610,13 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - environmentEnvelope, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + connectedEnvironmentName, this.client.getApiVersion(), environmentEnvelope, accept, context); } /** * Creates or updates an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @param environmentEnvelope Configuration details of the connectedEnvironment. @@ -773,26 +624,21 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 an environment for Kubernetes cluster specialized for web workloads - * by Azure App Service. + * by Azure App Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ConnectedEnvironmentInner> beginCreateOrUpdateAsync( String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ConnectedEnvironmentInner.class, - ConnectedEnvironmentInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ConnectedEnvironmentInner.class, ConnectedEnvironmentInner.class, + this.client.getContext()); } /** * Creates or updates an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @param environmentEnvelope Configuration details of the connectedEnvironment. @@ -801,30 +647,22 @@ private PollerFlux, ConnectedEnvironmentIn * @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 an environment for Kubernetes cluster specialized for web workloads - * by Azure App Service. + * by Azure App Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ConnectedEnvironmentInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String connectedEnvironmentName, - ConnectedEnvironmentInner environmentEnvelope, + String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ConnectedEnvironmentInner.class, - ConnectedEnvironmentInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, + connectedEnvironmentName, environmentEnvelope, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ConnectedEnvironmentInner.class, ConnectedEnvironmentInner.class, context); } /** * Creates or updates an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @param environmentEnvelope Configuration details of the connectedEnvironment. @@ -832,19 +670,18 @@ private PollerFlux, ConnectedEnvironmentIn * @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 an environment for Kubernetes cluster specialized for web workloads - * by Azure App Service. + * by Azure App Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConnectedEnvironmentInner> beginCreateOrUpdate( String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope) + return this.beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope) .getSyncPoller(); } /** * Creates or updates an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @param environmentEnvelope Configuration details of the connectedEnvironment. @@ -853,22 +690,19 @@ public SyncPoller, ConnectedEnvironmentInn * @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 an environment for Kubernetes cluster specialized for web workloads - * by Azure App Service. + * by Azure App Service. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ConnectedEnvironmentInner> beginCreateOrUpdate( - String resourceGroupName, - String connectedEnvironmentName, - ConnectedEnvironmentInner environmentEnvelope, + String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope, context) + return this.beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope, context) .getSyncPoller(); } /** * Creates or updates an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @param environmentEnvelope Configuration details of the connectedEnvironment. @@ -876,19 +710,18 @@ public SyncPoller, ConnectedEnvironmentInn * @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 Kubernetes cluster specialized for web workloads by Azure App Service on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, + String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope) { + return beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @param environmentEnvelope Configuration details of the connectedEnvironment. @@ -897,22 +730,18 @@ private Mono createOrUpdateAsync( * @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 Kubernetes cluster specialized for web workloads by Azure App Service on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String connectedEnvironmentName, - ConnectedEnvironmentInner environmentEnvelope, - Context context) { + private Mono createOrUpdateAsync(String resourceGroupName, + String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope, Context context) { return beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + .last().flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @param environmentEnvelope Configuration details of the connectedEnvironment. @@ -922,14 +751,14 @@ private Mono createOrUpdateAsync( * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectedEnvironmentInner createOrUpdate( - String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope) { + public ConnectedEnvironmentInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, + ConnectedEnvironmentInner environmentEnvelope) { return createOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope).block(); } /** * Creates or updates an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @param environmentEnvelope Configuration details of the connectedEnvironment. @@ -940,17 +769,14 @@ public ConnectedEnvironmentInner createOrUpdate( * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectedEnvironmentInner createOrUpdate( - String resourceGroupName, - String connectedEnvironmentName, - ConnectedEnvironmentInner environmentEnvelope, - Context context) { + public ConnectedEnvironmentInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, + ConnectedEnvironmentInner environmentEnvelope, Context context) { return createOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope, context).block(); } /** * Delete an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -959,48 +785,34 @@ public ConnectedEnvironmentInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, connectedEnvironmentName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @param context The context to associate with this operation. @@ -1010,45 +822,33 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + connectedEnvironmentName, this.client.getApiVersion(), accept, context); } /** * Delete an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1057,18 +857,16 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String connectedEnvironmentName) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String connectedEnvironmentName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @param context The context to associate with this operation. @@ -1078,19 +876,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String connectedEnvironmentName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, + String connectedEnvironmentName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1105,7 +902,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Delete an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @param context The context to associate with this operation. @@ -1115,14 +912,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String connectedEnvironmentName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String connectedEnvironmentName, + Context context) { return this.beginDeleteAsync(resourceGroupName, connectedEnvironmentName, context).getSyncPoller(); } /** * Delete an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1132,14 +929,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String connectedEnvironmentName) { - return beginDeleteAsync(resourceGroupName, connectedEnvironmentName) - .last() + return beginDeleteAsync(resourceGroupName, connectedEnvironmentName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @param context The context to associate with this operation. @@ -1150,14 +946,13 @@ private Mono deleteAsync(String resourceGroupName, String connectedEnviron */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String connectedEnvironmentName, Context context) { - return beginDeleteAsync(resourceGroupName, connectedEnvironmentName, context) - .last() + return beginDeleteAsync(resourceGroupName, connectedEnvironmentName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1171,7 +966,7 @@ public void delete(String resourceGroupName, String connectedEnvironmentName) { /** * Delete an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @param context The context to associate with this operation. @@ -1186,62 +981,48 @@ public void delete(String resourceGroupName, String connectedEnvironmentName, Co /** * Update connected Environment's properties. - * - *

Patches a Managed Environment. Only patching of tags is supported currently. - * + * + * Patches a Managed Environment. Only patching of tags is supported currently. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @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 Kubernetes cluster specialized for web workloads by Azure App Service along with - * {@link Response} on successful completion of {@link Mono}. + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName) { + private Mono> updateWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, connectedEnvironmentName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update connected Environment's properties. - * - *

Patches a Managed Environment. Only patching of tags is supported currently. - * + * + * Patches a Managed Environment. Only patching of tags is supported currently. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @param context The context to associate with this operation. @@ -1249,57 +1030,45 @@ private Mono> updateWithResponseAsync( * @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 Kubernetes cluster specialized for web workloads by Azure App Service along with - * {@link Response} on successful completion of {@link Mono}. + * {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, Context context) { + private Mono> updateWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + connectedEnvironmentName, this.client.getApiVersion(), accept, context); } /** * Update connected Environment's properties. - * - *

Patches a Managed Environment. Only patching of tags is supported currently. - * + * + * Patches a Managed Environment. Only patching of tags is supported currently. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @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 Kubernetes cluster specialized for web workloads by Azure App Service on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String connectedEnvironmentName) { @@ -1309,9 +1078,9 @@ private Mono updateAsync(String resourceGroupName, St /** * Update connected Environment's properties. - * - *

Patches a Managed Environment. Only patching of tags is supported currently. - * + * + * Patches a Managed Environment. Only patching of tags is supported currently. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @param context The context to associate with this operation. @@ -1319,19 +1088,19 @@ private Mono updateAsync(String resourceGroupName, St * @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 Kubernetes cluster specialized for web workloads by Azure App Service along with - * {@link Response}. + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, String connectedEnvironmentName, Context context) { + public Response updateWithResponse(String resourceGroupName, + String connectedEnvironmentName, Context context) { return updateWithResponseAsync(resourceGroupName, connectedEnvironmentName, context).block(); } /** * Update connected Environment's properties. - * - *

Patches a Managed Environment. Only patching of tags is supported currently. - * + * + * Patches a Managed Environment. Only patching of tags is supported currently. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1346,9 +1115,9 @@ public ConnectedEnvironmentInner update(String resourceGroupName, String connect /** * Checks the resource connectedEnvironmentName availability. - * - *

Checks if resource connectedEnvironmentName is available. - * + * + * Checks if resource connectedEnvironmentName is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Managed Environment. * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. @@ -1359,60 +1128,43 @@ public ConnectedEnvironmentInner update(String resourceGroupName, String connect */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkNameAvailabilityWithResponseAsync( - String resourceGroupName, - String connectedEnvironmentName, + String resourceGroupName, String connectedEnvironmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (checkNameAvailabilityRequest == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter checkNameAvailabilityRequest is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter checkNameAvailabilityRequest is required and cannot be null.")); } else { checkNameAvailabilityRequest.validate(); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .checkNameAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - checkNameAvailabilityRequest, - accept, - context)) + .withContext(context -> service.checkNameAvailability(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, connectedEnvironmentName, + this.client.getApiVersion(), checkNameAvailabilityRequest, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Checks the resource connectedEnvironmentName availability. - * - *

Checks if resource connectedEnvironmentName is available. - * + * + * Checks if resource connectedEnvironmentName is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Managed Environment. * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. @@ -1424,58 +1176,42 @@ private Mono> checkNameAvailability */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkNameAvailabilityWithResponseAsync( - String resourceGroupName, - String connectedEnvironmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest, - Context context) { + String resourceGroupName, String connectedEnvironmentName, + CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (checkNameAvailabilityRequest == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter checkNameAvailabilityRequest is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter checkNameAvailabilityRequest is required and cannot be null.")); } else { checkNameAvailabilityRequest.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .checkNameAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - checkNameAvailabilityRequest, - accept, - context); + return service.checkNameAvailability(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, connectedEnvironmentName, this.client.getApiVersion(), checkNameAvailabilityRequest, + accept, context); } /** * Checks the resource connectedEnvironmentName availability. - * - *

Checks if resource connectedEnvironmentName is available. - * + * + * Checks if resource connectedEnvironmentName is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Managed Environment. * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. @@ -1485,20 +1221,17 @@ private Mono> checkNameAvailability * @return the check availability result on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkNameAvailabilityAsync( - String resourceGroupName, - String connectedEnvironmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - return checkNameAvailabilityWithResponseAsync( - resourceGroupName, connectedEnvironmentName, checkNameAvailabilityRequest) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono checkNameAvailabilityAsync(String resourceGroupName, + String connectedEnvironmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest) { + return checkNameAvailabilityWithResponseAsync(resourceGroupName, connectedEnvironmentName, + checkNameAvailabilityRequest).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Checks the resource connectedEnvironmentName availability. - * - *

Checks if resource connectedEnvironmentName is available. - * + * + * Checks if resource connectedEnvironmentName is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Managed Environment. * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. @@ -1509,21 +1242,17 @@ private Mono checkNameAvailabilityAsync( * @return the check availability result along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkNameAvailabilityWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest, - Context context) { - return checkNameAvailabilityWithResponseAsync( - resourceGroupName, connectedEnvironmentName, checkNameAvailabilityRequest, context) - .block(); + public Response checkNameAvailabilityWithResponse(String resourceGroupName, + String connectedEnvironmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context) { + return checkNameAvailabilityWithResponseAsync(resourceGroupName, connectedEnvironmentName, + checkNameAvailabilityRequest, context).block(); } /** * Checks the resource connectedEnvironmentName availability. - * - *

Checks if resource connectedEnvironmentName is available. - * + * + * Checks if resource connectedEnvironmentName is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Managed Environment. * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. @@ -1533,25 +1262,23 @@ public Response checkNameAvailabilityWithRes * @return the check availability result. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CheckNameAvailabilityResponseInner checkNameAvailability( - String resourceGroupName, - String connectedEnvironmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - return checkNameAvailabilityWithResponse( - resourceGroupName, connectedEnvironmentName, checkNameAvailabilityRequest, Context.NONE) - .getValue(); + public CheckNameAvailabilityResponseInner checkNameAvailability(String resourceGroupName, + String connectedEnvironmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest) { + return checkNameAvailabilityWithResponse(resourceGroupName, connectedEnvironmentName, + checkNameAvailabilityRequest, Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of connectedEnvironments along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return collection of connectedEnvironments along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -1559,76 +1286,59 @@ private Mono> listBySubscriptionNextSin return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of connectedEnvironments along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return collection of connectedEnvironments along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of connectedEnvironments along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return collection of connectedEnvironments along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -1636,63 +1346,45 @@ private Mono> listByResourceGroupNextSi return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of connectedEnvironments along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return collection of connectedEnvironments along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java index 7a8dd2baa954..bc4defccdabf 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 @@ -36,27 +36,28 @@ import reactor.core.publisher.Mono; /** - * An instance of this class provides access to all the operations defined in ConnectedEnvironmentsDaprComponentsClient. + * An instance of this class provides access to all the operations defined in + * ConnectedEnvironmentsDaprComponentsClient. */ public final class ConnectedEnvironmentsDaprComponentsClientImpl implements ConnectedEnvironmentsDaprComponentsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ConnectedEnvironmentsDaprComponentsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerAppsApiClientImpl client; /** * Initializes an instance of ConnectedEnvironmentsDaprComponentsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ConnectedEnvironmentsDaprComponentsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create( - ConnectedEnvironmentsDaprComponentsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ConnectedEnvironmentsDaprComponentsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -67,155 +68,112 @@ public final class ConnectedEnvironmentsDaprComponentsClientImpl implements Conn @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") public interface ConnectedEnvironmentsDaprComponentsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("componentName") String componentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("componentName") String componentName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("componentName") String componentName, - @QueryParam("api-version") String apiVersion, + @PathParam("componentName") String componentName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DaprComponentInner daprComponentEnvelope, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete( - @HostParam("$host") String endpoint, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("componentName") String componentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("componentName") String componentName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}/listSecrets") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/daprComponents/{componentName}/listSecrets") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listSecrets( - @HostParam("$host") String endpoint, + Mono> listSecrets(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("componentName") String componentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("componentName") String componentName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Get the Dapr Components for a connected environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connected environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Dapr Components for a connected environment along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String connectedEnvironmentName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String connectedEnvironmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, connectedEnvironmentName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the Dapr Components for a connected environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connected environment. * @param context The context to associate with this operation. @@ -223,57 +181,39 @@ private Mono> listSinglePageAsync( * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Dapr Components for a connected environment along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String connectedEnvironmentName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String connectedEnvironmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + connectedEnvironmentName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the Dapr Components for a connected environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connected environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -283,14 +223,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String connectedEnvironmentName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, connectedEnvironmentName), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, connectedEnvironmentName), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Get the Dapr Components for a connected environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connected environment. * @param context The context to associate with this operation. @@ -300,16 +239,15 @@ private PagedFlux listAsync(String resourceGroupName, String * @return the Dapr Components for a connected environment as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String connectedEnvironmentName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, connectedEnvironmentName, context), + private PagedFlux listAsync(String resourceGroupName, String connectedEnvironmentName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, connectedEnvironmentName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Get the Dapr Components for a connected environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connected environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -324,7 +262,7 @@ public PagedIterable list(String resourceGroupName, String c /** * Get the Dapr Components for a connected environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connected environment. * @param context The context to associate with this operation. @@ -334,14 +272,14 @@ public PagedIterable list(String resourceGroupName, String c * @return the Dapr Components for a connected environment as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String connectedEnvironmentName, Context context) { + public PagedIterable list(String resourceGroupName, String connectedEnvironmentName, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, connectedEnvironmentName, context)); } /** * 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. @@ -351,28 +289,23 @@ public PagedIterable list( * @return a dapr component along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, String componentName) { + private Mono> getWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, String componentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (componentName == null) { return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); @@ -380,23 +313,14 @@ private Mono> getWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - componentName, - this.client.getApiVersion(), - accept, - context)) + context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + connectedEnvironmentName, componentName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. @@ -407,49 +331,36 @@ private Mono> getWithResponseAsync( * @return a dapr component along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, String componentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (componentName == null) { return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - componentName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + connectedEnvironmentName, componentName, this.client.getApiVersion(), accept, context); } /** * 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. @@ -459,15 +370,15 @@ private Mono> getWithResponseAsync( * @return a dapr component on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String connectedEnvironmentName, String componentName) { + private Mono getAsync(String resourceGroupName, String connectedEnvironmentName, + String componentName) { return getWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. @@ -478,14 +389,14 @@ private Mono getAsync( * @return a dapr component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { + public Response getWithResponse(String resourceGroupName, String connectedEnvironmentName, + String componentName, Context context) { return getWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName, context).block(); } /** * 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. @@ -501,9 +412,9 @@ public DaprComponentInner get(String resourceGroupName, String connectedEnvironm /** * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in a connected environment. - * + * + * Creates or updates a Dapr Component in 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. @@ -514,31 +425,23 @@ public DaprComponentInner get(String resourceGroupName, String connectedEnvironm * @return dapr Component along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String connectedEnvironmentName, - String componentName, - DaprComponentInner daprComponentEnvelope) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, String componentName, DaprComponentInner daprComponentEnvelope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (componentName == null) { return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); @@ -551,27 +454,17 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - componentName, - this.client.getApiVersion(), - daprComponentEnvelope, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, connectedEnvironmentName, componentName, this.client.getApiVersion(), + daprComponentEnvelope, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in a connected environment. - * + * + * Creates or updates a Dapr Component in 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. @@ -583,32 +476,24 @@ private Mono> createOrUpdateWithResponseAsync( * @return dapr Component along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String connectedEnvironmentName, - String componentName, - DaprComponentInner daprComponentEnvelope, + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, String componentName, DaprComponentInner daprComponentEnvelope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (componentName == null) { return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); @@ -621,24 +506,16 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - componentName, - this.client.getApiVersion(), - daprComponentEnvelope, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + connectedEnvironmentName, componentName, this.client.getApiVersion(), daprComponentEnvelope, accept, + context); } /** * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in a connected environment. - * + * + * Creates or updates a Dapr Component in 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. @@ -649,21 +526,17 @@ private Mono> createOrUpdateWithResponseAsync( * @return dapr Component on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String connectedEnvironmentName, - String componentName, - DaprComponentInner daprComponentEnvelope) { - return createOrUpdateWithResponseAsync( - resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createOrUpdateAsync(String resourceGroupName, String connectedEnvironmentName, + String componentName, DaprComponentInner daprComponentEnvelope) { + return createOrUpdateWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName, + daprComponentEnvelope).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in a connected environment. - * + * + * Creates or updates a Dapr Component in 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. @@ -675,22 +548,18 @@ private Mono createOrUpdateAsync( * @return dapr Component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String componentName, - DaprComponentInner daprComponentEnvelope, + public Response createOrUpdateWithResponse(String resourceGroupName, + String connectedEnvironmentName, String componentName, DaprComponentInner daprComponentEnvelope, Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope, context) - .block(); + return createOrUpdateWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName, + daprComponentEnvelope, context).block(); } /** * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in a connected environment. - * + * + * Creates or updates a Dapr Component in 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. @@ -701,21 +570,17 @@ public Response createOrUpdateWithResponse( * @return dapr Component. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DaprComponentInner createOrUpdate( - String resourceGroupName, - String connectedEnvironmentName, - String componentName, - DaprComponentInner daprComponentEnvelope) { - return createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope, Context.NONE) - .getValue(); + public DaprComponentInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, + String componentName, DaprComponentInner daprComponentEnvelope) { + return createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, componentName, + daprComponentEnvelope, Context.NONE).getValue(); } /** * Delete a Dapr Component. - * - *

Delete a Dapr Component from 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. @@ -725,28 +590,23 @@ public DaprComponentInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, String componentName) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String connectedEnvironmentName, + String componentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (componentName == null) { return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); @@ -754,25 +614,16 @@ private Mono> deleteWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - componentName, - this.client.getApiVersion(), - accept, - context)) + context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + connectedEnvironmentName, componentName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a Dapr Component. - * - *

Delete a Dapr Component from 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. @@ -783,51 +634,38 @@ private Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String connectedEnvironmentName, + String componentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (componentName == null) { return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - componentName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + connectedEnvironmentName, componentName, this.client.getApiVersion(), accept, context); } /** * Delete a Dapr Component. - * - *

Delete a Dapr Component from 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. @@ -844,9 +682,9 @@ private Mono deleteAsync(String resourceGroupName, String connectedEnviron /** * Delete a Dapr Component. - * - *

Delete a Dapr Component from 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. @@ -857,16 +695,16 @@ private Mono deleteAsync(String resourceGroupName, String connectedEnviron * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, + String componentName, Context context) { return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName, context).block(); } /** * Delete a Dapr Component. - * - *

Delete a Dapr Component from 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. @@ -881,7 +719,7 @@ public void delete(String resourceGroupName, String connectedEnvironmentName, St /** * 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. * @param componentName Name of the Dapr Component. @@ -889,55 +727,41 @@ public void delete(String resourceGroupName, String connectedEnvironmentName, St * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, String componentName) { + private Mono> listSecretsWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, String componentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (componentName == null) { return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listSecrets( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - componentName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, connectedEnvironmentName, componentName, this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * 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. * @param componentName Name of the Dapr Component. @@ -946,52 +770,39 @@ private Mono> listSecretsWithResponseAsync( * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { + private Mono> listSecretsWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, String componentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (componentName == null) { return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listSecrets( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - componentName, - this.client.getApiVersion(), - accept, - context); + return service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + connectedEnvironmentName, componentName, this.client.getApiVersion(), accept, context); } /** * 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. * @param componentName Name of the Dapr Component. @@ -1001,15 +812,15 @@ private Mono> listSecretsWithResponseAsync( * @return dapr component Secrets Collection for ListSecrets Action on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listSecretsAsync( - String resourceGroupName, String connectedEnvironmentName, String componentName) { + private Mono listSecretsAsync(String resourceGroupName, String connectedEnvironmentName, + String componentName) { return listSecretsWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * 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. * @param componentName Name of the Dapr Component. @@ -1020,15 +831,15 @@ private Mono listSecretsAsync( * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listSecretsWithResponse( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { + public Response listSecretsWithResponse(String resourceGroupName, + String connectedEnvironmentName, String componentName, Context context) { return listSecretsWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName, context) .block(); } /** * 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. * @param componentName Name of the Dapr Component. @@ -1038,17 +849,18 @@ public Response listSecretsWithResponse( * @return dapr component Secrets Collection for ListSecrets Action. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DaprSecretsCollectionInner listSecrets( - String resourceGroupName, String connectedEnvironmentName, String componentName) { + public DaprSecretsCollectionInner listSecrets(String resourceGroupName, String connectedEnvironmentName, + String componentName) { return listSecretsWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE) .getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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. @@ -1060,31 +872,22 @@ private Mono> listNextSinglePageAsync(String n return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1097,23 +900,13 @@ private Mono> listNextSinglePageAsync(String n return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java index a42732ed38b8..eacdeaebf3bb 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 @@ -23,35 +23,31 @@ public final class ConnectedEnvironmentsDaprComponentsImpl implements ConnectedE private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - public ConnectedEnvironmentsDaprComponentsImpl( - ConnectedEnvironmentsDaprComponentsClient innerClient, + public ConnectedEnvironmentsDaprComponentsImpl(ConnectedEnvironmentsDaprComponentsClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list(String resourceGroupName, String connectedEnvironmentName) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, connectedEnvironmentName); - return Utils.mapPage(inner, inner1 -> new DaprComponentImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, connectedEnvironmentName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DaprComponentImpl(inner1, this.manager())); } - public PagedIterable list( - String resourceGroupName, String connectedEnvironmentName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, connectedEnvironmentName, context); - return Utils.mapPage(inner, inner1 -> new DaprComponentImpl(inner1, this.manager())); + public PagedIterable list(String resourceGroupName, String connectedEnvironmentName, + Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, connectedEnvironmentName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DaprComponentImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); + public Response getWithResponse(String resourceGroupName, String connectedEnvironmentName, + String componentName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DaprComponentImpl(inner.getValue(), this.manager())); } else { return null; @@ -67,38 +63,32 @@ public DaprComponent get(String resourceGroupName, String connectedEnvironmentNa } } - public Response deleteWithResponse( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { - return this - .serviceClient() - .deleteWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); + public Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, + String componentName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, connectedEnvironmentName, componentName, + context); } public void delete(String resourceGroupName, String connectedEnvironmentName, String componentName) { this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, componentName); } - public Response listSecretsWithResponse( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { - Response inner = - this - .serviceClient() - .listSecretsWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); + public Response listSecretsWithResponse(String resourceGroupName, + String connectedEnvironmentName, String componentName, Context context) { + Response inner = this.serviceClient().listSecretsWithResponse(resourceGroupName, + connectedEnvironmentName, componentName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DaprSecretsCollectionImpl(inner.getValue(), this.manager())); } else { return null; } } - public DaprSecretsCollection listSecrets( - String resourceGroupName, String connectedEnvironmentName, String componentName) { - DaprSecretsCollectionInner inner = - this.serviceClient().listSecrets(resourceGroupName, connectedEnvironmentName, componentName); + public DaprSecretsCollection listSecrets(String resourceGroupName, String connectedEnvironmentName, + String componentName) { + DaprSecretsCollectionInner inner + = this.serviceClient().listSecrets(resourceGroupName, connectedEnvironmentName, componentName); if (inner != null) { return new DaprSecretsCollectionImpl(inner, this.manager()); } else { @@ -107,123 +97,78 @@ public DaprSecretsCollection listSecrets( } public DaprComponent getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String connectedEnvironmentName = ResourceManagerUtils.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"); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); + } + String componentName = ResourceManagerUtils.getValueFromIdByName(id, "daprComponents"); if (componentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); - } - return this - .getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE) + 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"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String connectedEnvironmentName = ResourceManagerUtils.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"); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); + } + String componentName = ResourceManagerUtils.getValueFromIdByName(id, "daprComponents"); if (componentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); + 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"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String connectedEnvironmentName = ResourceManagerUtils.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"); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); + } + String componentName = ResourceManagerUtils.getValueFromIdByName(id, "daprComponents"); if (componentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); + 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"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String connectedEnvironmentName = ResourceManagerUtils.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"); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); + } + String componentName = ResourceManagerUtils.getValueFromIdByName(id, "daprComponents"); if (componentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); + 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); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsImpl.java index 9bfc8b8b89fa..2919f62d27be 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsImpl.java @@ -24,8 +24,7 @@ public final class ConnectedEnvironmentsImpl implements ConnectedEnvironments { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - public ConnectedEnvironmentsImpl( - ConnectedEnvironmentsClient innerClient, + public ConnectedEnvironmentsImpl(ConnectedEnvironmentsClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -33,34 +32,31 @@ public ConnectedEnvironmentsImpl( public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ConnectedEnvironmentImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectedEnvironmentImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new ConnectedEnvironmentImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectedEnvironmentImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new ConnectedEnvironmentImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectedEnvironmentImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new ConnectedEnvironmentImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ConnectedEnvironmentImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String connectedEnvironmentName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, + String connectedEnvironmentName, Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ConnectedEnvironmentImpl(inner.getValue(), this.manager())); } else { return null; @@ -68,8 +64,8 @@ public Response getByResourceGroupWithResponse( } public ConnectedEnvironment getByResourceGroup(String resourceGroupName, String connectedEnvironmentName) { - ConnectedEnvironmentInner inner = - this.serviceClient().getByResourceGroup(resourceGroupName, connectedEnvironmentName); + ConnectedEnvironmentInner inner + = this.serviceClient().getByResourceGroup(resourceGroupName, connectedEnvironmentName); if (inner != null) { return new ConnectedEnvironmentImpl(inner, this.manager()); } else { @@ -85,15 +81,12 @@ public void delete(String resourceGroupName, String connectedEnvironmentName, Co this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, context); } - public Response updateWithResponse( - String resourceGroupName, String connectedEnvironmentName, Context context) { - Response inner = - this.serviceClient().updateWithResponse(resourceGroupName, connectedEnvironmentName, context); + public Response updateWithResponse(String resourceGroupName, String connectedEnvironmentName, + Context context) { + Response inner + = this.serviceClient().updateWithResponse(resourceGroupName, connectedEnvironmentName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ConnectedEnvironmentImpl(inner.getValue(), this.manager())); } else { return null; @@ -109,35 +102,22 @@ public ConnectedEnvironment update(String resourceGroupName, String connectedEnv } } - public Response checkNameAvailabilityWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest, - Context context) { - Response inner = - this - .serviceClient() - .checkNameAvailabilityWithResponse( - resourceGroupName, connectedEnvironmentName, checkNameAvailabilityRequest, context); + public Response checkNameAvailabilityWithResponse(String resourceGroupName, + String connectedEnvironmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context) { + Response inner = this.serviceClient().checkNameAvailabilityWithResponse( + resourceGroupName, connectedEnvironmentName, checkNameAvailabilityRequest, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CheckNameAvailabilityResponseImpl(inner.getValue(), this.manager())); } else { return null; } } - public CheckNameAvailabilityResponse checkNameAvailability( - String resourceGroupName, - String connectedEnvironmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - CheckNameAvailabilityResponseInner inner = - this - .serviceClient() - .checkNameAvailability(resourceGroupName, connectedEnvironmentName, checkNameAvailabilityRequest); + public CheckNameAvailabilityResponse checkNameAvailability(String resourceGroupName, + String connectedEnvironmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest) { + CheckNameAvailabilityResponseInner inner = this.serviceClient().checkNameAvailability(resourceGroupName, + connectedEnvironmentName, checkNameAvailabilityRequest); if (inner != null) { return new CheckNameAvailabilityResponseImpl(inner, this.manager()); } else { @@ -146,91 +126,58 @@ public CheckNameAvailabilityResponse checkNameAvailability( } public ConnectedEnvironment getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String connectedEnvironmentName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); } - return this - .getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, Context.NONE) + return this.getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, Context.NONE) .getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String connectedEnvironmentName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String connectedEnvironmentName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); } this.delete(resourceGroupName, connectedEnvironmentName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String connectedEnvironmentName = ResourceManagerUtils.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))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); } this.delete(resourceGroupName, connectedEnvironmentName, context); } 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 511e12aa1d1b..c44b673d9562 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 @@ -29,200 +29,160 @@ import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ConnectedEnvironmentsStoragesClient. */ +/** + * An instance of this class provides access to all the operations defined in ConnectedEnvironmentsStoragesClient. + */ public final class ConnectedEnvironmentsStoragesClientImpl implements ConnectedEnvironmentsStoragesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ConnectedEnvironmentsStoragesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerAppsApiClientImpl client; /** * Initializes an instance of ConnectedEnvironmentsStoragesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ConnectedEnvironmentsStoragesClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create( - ConnectedEnvironmentsStoragesService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ConnectedEnvironmentsStoragesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ContainerAppsApiClientConnectedEnvironmentsStorages to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for ContainerAppsApiClientConnectedEnvironmentsStorages to be used by + * the proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") public interface ConnectedEnvironmentsStoragesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("storageName") String storageName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("storageName") String storageName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("storageName") String storageName, - @QueryParam("api-version") String apiVersion, + @PathParam("storageName") String storageName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ConnectedEnvironmentStorageInner storageEnvelope, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/connectedEnvironments/{connectedEnvironmentName}/storages/{storageName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete( - @HostParam("$host") String endpoint, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("connectedEnvironmentName") String connectedEnvironmentName, - @PathParam("storageName") String storageName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("storageName") String storageName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); } /** * Get all storages for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a connectedEnvironment along with {@link Response} on successful completion of {@link - * Mono}. + * @return all storages for a connectedEnvironment along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName) { + private Mono> listWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, connectedEnvironmentName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get all storages for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a connectedEnvironment along with {@link Response} on successful completion of {@link - * Mono}. + * @return all storages for a connectedEnvironment along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, Context context) { + private Mono> listWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - this.client.getApiVersion(), - accept, - context); + return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + connectedEnvironmentName, this.client.getApiVersion(), accept, context); } /** * Get all storages for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -231,15 +191,15 @@ private Mono> listWithResp * @return all storages for a connectedEnvironment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync( - String resourceGroupName, String connectedEnvironmentName) { + private Mono listAsync(String resourceGroupName, + String connectedEnvironmentName) { return listWithResponseAsync(resourceGroupName, connectedEnvironmentName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get all storages for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param context The context to associate with this operation. @@ -249,14 +209,14 @@ private Mono listAsync( * @return all storages for a connectedEnvironment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String resourceGroupName, String connectedEnvironmentName, Context context) { + public Response listWithResponse(String resourceGroupName, + String connectedEnvironmentName, Context context) { return listWithResponseAsync(resourceGroupName, connectedEnvironmentName, context).block(); } /** * Get all storages for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -271,7 +231,7 @@ public ConnectedEnvironmentStoragesCollectionInner list(String resourceGroupName /** * Get storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. @@ -281,52 +241,37 @@ public ConnectedEnvironmentStoragesCollectionInner list(String resourceGroupName * @return storage for a connectedEnvironment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, String storageName) { + private Mono> getWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, String storageName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (storageName == null) { return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - storageName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, connectedEnvironmentName, storageName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. @@ -337,49 +282,36 @@ private Mono> getWithResponseAsync( * @return storage for a connectedEnvironment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, String storageName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, String storageName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (storageName == null) { return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - storageName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + connectedEnvironmentName, storageName, this.client.getApiVersion(), accept, context); } /** * Get storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. @@ -389,15 +321,15 @@ private Mono> getWithResponseAsync( * @return storage for a connectedEnvironment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String connectedEnvironmentName, String storageName) { + private Mono getAsync(String resourceGroupName, String connectedEnvironmentName, + String storageName) { return getWithResponseAsync(resourceGroupName, connectedEnvironmentName, storageName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. @@ -408,14 +340,14 @@ private Mono getAsync( * @return storage for a connectedEnvironment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String connectedEnvironmentName, String storageName, Context context) { + public Response getWithResponse(String resourceGroupName, + String connectedEnvironmentName, String storageName, Context context) { return getWithResponseAsync(resourceGroupName, connectedEnvironmentName, storageName, context).block(); } /** * Get storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. @@ -425,14 +357,14 @@ public Response getWithResponse( * @return storage for a connectedEnvironment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectedEnvironmentStorageInner get( - String resourceGroupName, String connectedEnvironmentName, String storageName) { + public ConnectedEnvironmentStorageInner get(String resourceGroupName, String connectedEnvironmentName, + String storageName) { return getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, Context.NONE).getValue(); } /** * Create or update storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. @@ -440,35 +372,27 @@ public ConnectedEnvironmentStorageInner get( * @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 storage resource for connectedEnvironment along with {@link Response} on successful completion of {@link - * Mono}. + * @return storage resource for connectedEnvironment along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String connectedEnvironmentName, - String storageName, - ConnectedEnvironmentStorageInner storageEnvelope) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, String storageName, ConnectedEnvironmentStorageInner storageEnvelope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (storageName == null) { return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); @@ -481,25 +405,15 @@ private Mono> createOrUpdateWithRespo } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - storageName, - this.client.getApiVersion(), - storageEnvelope, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, connectedEnvironmentName, storageName, this.client.getApiVersion(), storageEnvelope, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create or update storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. @@ -508,36 +422,28 @@ private Mono> createOrUpdateWithRespo * @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 storage resource for connectedEnvironment along with {@link Response} on successful completion of {@link - * Mono}. + * @return storage resource for connectedEnvironment along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String connectedEnvironmentName, - String storageName, - ConnectedEnvironmentStorageInner storageEnvelope, + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String connectedEnvironmentName, String storageName, ConnectedEnvironmentStorageInner storageEnvelope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (storageName == null) { return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); @@ -550,22 +456,13 @@ private Mono> createOrUpdateWithRespo } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - storageName, - this.client.getApiVersion(), - storageEnvelope, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + connectedEnvironmentName, storageName, this.client.getApiVersion(), storageEnvelope, accept, context); } /** * Create or update storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. @@ -576,19 +473,15 @@ private Mono> createOrUpdateWithRespo * @return storage resource for connectedEnvironment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String connectedEnvironmentName, - String storageName, - ConnectedEnvironmentStorageInner storageEnvelope) { - return createOrUpdateWithResponseAsync( - resourceGroupName, connectedEnvironmentName, storageName, storageEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono createOrUpdateAsync(String resourceGroupName, + String connectedEnvironmentName, String storageName, ConnectedEnvironmentStorageInner storageEnvelope) { + return createOrUpdateWithResponseAsync(resourceGroupName, connectedEnvironmentName, storageName, + storageEnvelope).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Create or update storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. @@ -600,20 +493,16 @@ private Mono createOrUpdateAsync( * @return storage resource for connectedEnvironment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - String storageName, - ConnectedEnvironmentStorageInner storageEnvelope, + public Response createOrUpdateWithResponse(String resourceGroupName, + String connectedEnvironmentName, String storageName, ConnectedEnvironmentStorageInner storageEnvelope, Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, connectedEnvironmentName, storageName, storageEnvelope, context) - .block(); + return createOrUpdateWithResponseAsync(resourceGroupName, connectedEnvironmentName, storageName, + storageEnvelope, context).block(); } /** * Create or update storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. @@ -624,19 +513,15 @@ public Response createOrUpdateWithResponse( * @return storage resource for connectedEnvironment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ConnectedEnvironmentStorageInner createOrUpdate( - String resourceGroupName, - String connectedEnvironmentName, - String storageName, - ConnectedEnvironmentStorageInner storageEnvelope) { - return createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, storageName, storageEnvelope, Context.NONE) - .getValue(); + public ConnectedEnvironmentStorageInner createOrUpdate(String resourceGroupName, String connectedEnvironmentName, + String storageName, ConnectedEnvironmentStorageInner storageEnvelope) { + return createOrUpdateWithResponse(resourceGroupName, connectedEnvironmentName, storageName, storageEnvelope, + Context.NONE).getValue(); } /** * Delete storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. @@ -646,52 +531,37 @@ public ConnectedEnvironmentStorageInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, String storageName) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String connectedEnvironmentName, + String storageName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (storageName == null) { return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - storageName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, connectedEnvironmentName, storageName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. @@ -702,49 +572,36 @@ private Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String connectedEnvironmentName, String storageName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String connectedEnvironmentName, + String storageName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); } if (connectedEnvironmentName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); } if (storageName == null) { return Mono.error(new IllegalArgumentException("Parameter storageName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - connectedEnvironmentName, - storageName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + connectedEnvironmentName, storageName, this.client.getApiVersion(), accept, context); } /** * Delete storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. @@ -761,7 +618,7 @@ private Mono deleteAsync(String resourceGroupName, String connectedEnviron /** * Delete storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. @@ -772,14 +629,14 @@ private Mono deleteAsync(String resourceGroupName, String connectedEnviron * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String connectedEnvironmentName, String storageName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, + String storageName, Context context) { return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, storageName, context).block(); } /** * Delete storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesImpl.java index a6bcb614f45f..3c5f66271c3b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesImpl.java @@ -22,22 +22,18 @@ public final class ConnectedEnvironmentsStoragesImpl implements ConnectedEnviron private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - public ConnectedEnvironmentsStoragesImpl( - ConnectedEnvironmentsStoragesClient innerClient, + public ConnectedEnvironmentsStoragesImpl(ConnectedEnvironmentsStoragesClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response listWithResponse( - String resourceGroupName, String connectedEnvironmentName, Context context) { - Response inner = - this.serviceClient().listWithResponse(resourceGroupName, connectedEnvironmentName, context); + public Response listWithResponse(String resourceGroupName, + String connectedEnvironmentName, Context context) { + Response inner + = this.serviceClient().listWithResponse(resourceGroupName, connectedEnvironmentName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ConnectedEnvironmentStoragesCollectionImpl(inner.getValue(), this.manager())); } else { return null; @@ -45,8 +41,8 @@ public Response listWithResponse( } public ConnectedEnvironmentStoragesCollection list(String resourceGroupName, String connectedEnvironmentName) { - ConnectedEnvironmentStoragesCollectionInner inner = - this.serviceClient().list(resourceGroupName, connectedEnvironmentName); + ConnectedEnvironmentStoragesCollectionInner inner + = this.serviceClient().list(resourceGroupName, connectedEnvironmentName); if (inner != null) { return new ConnectedEnvironmentStoragesCollectionImpl(inner, this.manager()); } else { @@ -54,25 +50,22 @@ public ConnectedEnvironmentStoragesCollection list(String resourceGroupName, Str } } - public Response getWithResponse( - String resourceGroupName, String connectedEnvironmentName, String storageName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context); + public Response getWithResponse(String resourceGroupName, + String connectedEnvironmentName, String storageName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ConnectedEnvironmentStorageImpl(inner.getValue(), this.manager())); } else { return null; } } - public ConnectedEnvironmentStorage get( - String resourceGroupName, String connectedEnvironmentName, String storageName) { - ConnectedEnvironmentStorageInner inner = - this.serviceClient().get(resourceGroupName, connectedEnvironmentName, storageName); + public ConnectedEnvironmentStorage get(String resourceGroupName, String connectedEnvironmentName, + String storageName) { + ConnectedEnvironmentStorageInner inner + = this.serviceClient().get(resourceGroupName, connectedEnvironmentName, storageName); if (inner != null) { return new ConnectedEnvironmentStorageImpl(inner, this.manager()); } else { @@ -80,11 +73,10 @@ public ConnectedEnvironmentStorage get( } } - public Response deleteWithResponse( - String resourceGroupName, String connectedEnvironmentName, String storageName, Context context) { - return this - .serviceClient() - .deleteWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context); + public Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, + String storageName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, connectedEnvironmentName, storageName, + context); } public void delete(String resourceGroupName, String connectedEnvironmentName, String storageName) { @@ -92,117 +84,77 @@ public void delete(String resourceGroupName, String connectedEnvironmentName, St } public ConnectedEnvironmentStorage getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String connectedEnvironmentName = ResourceManagerUtils.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 storageName = Utils.getValueFromIdByName(id, "storages"); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); + } + String storageName = ResourceManagerUtils.getValueFromIdByName(id, "storages"); if (storageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); } return this.getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String connectedEnvironmentName = ResourceManagerUtils.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 storageName = Utils.getValueFromIdByName(id, "storages"); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); + } + String storageName = ResourceManagerUtils.getValueFromIdByName(id, "storages"); if (storageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); } return this.getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String connectedEnvironmentName = ResourceManagerUtils.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 storageName = Utils.getValueFromIdByName(id, "storages"); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); + } + String storageName = ResourceManagerUtils.getValueFromIdByName(id, "storages"); if (storageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); } this.deleteWithResponse(resourceGroupName, connectedEnvironmentName, storageName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String connectedEnvironmentName = ResourceManagerUtils.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 storageName = Utils.getValueFromIdByName(id, "storages"); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", id))); + } + String storageName = ResourceManagerUtils.getValueFromIdByName(id, "storages"); if (storageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); } return this.deleteWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppAuthTokenImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppAuthTokenImpl.java index 186b92d42676..c0b49215b5a4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppAuthTokenImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppAuthTokenImpl.java @@ -16,8 +16,7 @@ public final class ContainerAppAuthTokenImpl implements ContainerAppAuthToken { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - ContainerAppAuthTokenImpl( - ContainerAppAuthTokenInner innerObject, + ContainerAppAuthTokenImpl(ContainerAppAuthTokenInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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 a56a23c9a439..1325dc07837e 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 @@ -151,20 +151,14 @@ public ContainerAppImpl withExistingResourceGroup(String resourceGroupName) { } public ContainerApp create() { - this.innerObject = - serviceManager - .serviceClient() - .getContainerApps() - .createOrUpdate(resourceGroupName, containerAppName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getContainerApps().createOrUpdate(resourceGroupName, + containerAppName, this.innerModel(), Context.NONE); return this; } public ContainerApp create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getContainerApps() - .createOrUpdate(resourceGroupName, containerAppName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getContainerApps().createOrUpdate(resourceGroupName, + containerAppName, this.innerModel(), context); return this; } @@ -179,56 +173,41 @@ public ContainerAppImpl update() { } public ContainerApp apply() { - this.innerObject = - serviceManager - .serviceClient() - .getContainerApps() - .update(resourceGroupName, containerAppName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getContainerApps().update(resourceGroupName, containerAppName, + this.innerModel(), Context.NONE); return this; } public ContainerApp apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getContainerApps() - .update(resourceGroupName, containerAppName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getContainerApps().update(resourceGroupName, containerAppName, + this.innerModel(), context); return this; } - ContainerAppImpl( - ContainerAppInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + ContainerAppImpl(ContainerAppInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.containerAppName = Utils.getValueFromIdByName(innerObject.id(), "containerApps"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.containerAppName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "containerApps"); } public ContainerApp refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getContainerApps() - .getByResourceGroupWithResponse(resourceGroupName, containerAppName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getContainerApps() + .getByResourceGroupWithResponse(resourceGroupName, containerAppName, Context.NONE).getValue(); return this; } public ContainerApp refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getContainerApps() - .getByResourceGroupWithResponse(resourceGroupName, containerAppName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getContainerApps() + .getByResourceGroupWithResponse(resourceGroupName, containerAppName, context).getValue(); return this; } - public Response listCustomHostnameAnalysisWithResponse( - String customHostname, Context context) { - return serviceManager - .containerApps() - .listCustomHostnameAnalysisWithResponse(resourceGroupName, containerAppName, customHostname, context); + public Response listCustomHostnameAnalysisWithResponse(String customHostname, + Context context) { + return serviceManager.containerApps().listCustomHostnameAnalysisWithResponse(resourceGroupName, + containerAppName, customHostname, context); } public CustomHostnameAnalysisResult listCustomHostnameAnalysis() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppJobExecutionsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppJobExecutionsImpl.java index 4fb1bf711914..6f7c1e0d91d3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppJobExecutionsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppJobExecutionsImpl.java @@ -17,8 +17,7 @@ public final class ContainerAppJobExecutionsImpl implements ContainerAppJobExecu private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - ContainerAppJobExecutionsImpl( - ContainerAppJobExecutionsInner innerObject, + ContainerAppJobExecutionsImpl(ContainerAppJobExecutionsInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -27,12 +26,8 @@ public final class ContainerAppJobExecutionsImpl implements ContainerAppJobExecu public List value() { List inner = this.innerModel().value(); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new JobExecutionImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new JobExecutionImpl(inner1, this.manager())).collect(Collectors.toList())); } else { return Collections.emptyList(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientBuilder.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientBuilder.java index 67c65c220581..49c7d2ab750a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientBuilder.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientBuilder.java @@ -14,17 +14,19 @@ import com.azure.core.util.serializer.SerializerAdapter; import java.time.Duration; -/** A builder for creating a new instance of the ContainerAppsApiClientImpl type. */ -@ServiceClientBuilder(serviceClients = {ContainerAppsApiClientImpl.class}) +/** + * A builder for creating a new instance of the ContainerAppsApiClientImpl type. + */ +@ServiceClientBuilder(serviceClients = { ContainerAppsApiClientImpl.class }) public final class ContainerAppsApiClientBuilder { /* - * The ID of the target subscription. + * The ID of the target subscription. The value must be an UUID. */ private String subscriptionId; /** - * Sets The ID of the target subscription. - * + * Sets The ID of the target subscription. The value must be an UUID. + * * @param subscriptionId the subscriptionId value. * @return the ContainerAppsApiClientBuilder. */ @@ -40,7 +42,7 @@ public ContainerAppsApiClientBuilder subscriptionId(String subscriptionId) { /** * Sets server parameter. - * + * * @param endpoint the endpoint value. * @return the ContainerAppsApiClientBuilder. */ @@ -56,7 +58,7 @@ public ContainerAppsApiClientBuilder endpoint(String endpoint) { /** * Sets The environment to connect to. - * + * * @param environment the environment value. * @return the ContainerAppsApiClientBuilder. */ @@ -72,7 +74,7 @@ public ContainerAppsApiClientBuilder environment(AzureEnvironment environment) { /** * Sets The HTTP pipeline to send requests through. - * + * * @param pipeline the pipeline value. * @return the ContainerAppsApiClientBuilder. */ @@ -88,7 +90,7 @@ public ContainerAppsApiClientBuilder pipeline(HttpPipeline pipeline) { /** * Sets The default poll interval for long-running operation. - * + * * @param defaultPollInterval the defaultPollInterval value. * @return the ContainerAppsApiClientBuilder. */ @@ -104,7 +106,7 @@ public ContainerAppsApiClientBuilder defaultPollInterval(Duration defaultPollInt /** * Sets The serializer to serialize an object into a string. - * + * * @param serializerAdapter the serializerAdapter value. * @return the ContainerAppsApiClientBuilder. */ @@ -115,30 +117,20 @@ public ContainerAppsApiClientBuilder serializerAdapter(SerializerAdapter seriali /** * Builds an instance of ContainerAppsApiClientImpl with the provided parameters. - * + * * @return an instance of ContainerAppsApiClientImpl. */ public ContainerAppsApiClientImpl buildClient() { String localEndpoint = (endpoint != null) ? endpoint : "https://management.azure.com"; AzureEnvironment localEnvironment = (environment != null) ? environment : AzureEnvironment.AZURE; - HttpPipeline localPipeline = - (pipeline != null) - ? pipeline - : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - Duration localDefaultPollInterval = - (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); - SerializerAdapter localSerializerAdapter = - (serializerAdapter != null) - ? serializerAdapter - : SerializerFactory.createDefaultManagementSerializerAdapter(); - ContainerAppsApiClientImpl client = - new ContainerAppsApiClientImpl( - localPipeline, - localSerializerAdapter, - localDefaultPollInterval, - localEnvironment, - this.subscriptionId, - localEndpoint); + HttpPipeline localPipeline = (pipeline != null) ? pipeline + : new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); + Duration localDefaultPollInterval + = (defaultPollInterval != null) ? defaultPollInterval : Duration.ofSeconds(30); + SerializerAdapter localSerializerAdapter = (serializerAdapter != null) ? serializerAdapter + : SerializerFactory.createDefaultManagementSerializerAdapter(); + ContainerAppsApiClientImpl client = new ContainerAppsApiClientImpl(localPipeline, localSerializerAdapter, + localDefaultPollInterval, localEnvironment, this.subscriptionId, localEndpoint); return client; } } 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 3289bbba9273..f3c112bc27b9 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 @@ -22,8 +22,13 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.appcontainers.fluent.AppResilienciesClient; import com.azure.resourcemanager.appcontainers.fluent.AvailableWorkloadProfilesClient; import com.azure.resourcemanager.appcontainers.fluent.BillingMetersClient; +import com.azure.resourcemanager.appcontainers.fluent.BuildAuthTokensClient; +import com.azure.resourcemanager.appcontainers.fluent.BuildersClient; +import com.azure.resourcemanager.appcontainers.fluent.BuildsByBuilderResourcesClient; +import com.azure.resourcemanager.appcontainers.fluent.BuildsClient; import com.azure.resourcemanager.appcontainers.fluent.CertificatesClient; import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsCertificatesClient; import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsClient; @@ -36,17 +41,24 @@ import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsRevisionReplicasClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsRevisionsClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsSourceControlsClient; +import com.azure.resourcemanager.appcontainers.fluent.DaprComponentResiliencyPoliciesClient; import com.azure.resourcemanager.appcontainers.fluent.DaprComponentsClient; +import com.azure.resourcemanager.appcontainers.fluent.DaprSubscriptionsClient; +import com.azure.resourcemanager.appcontainers.fluent.DotNetComponentsClient; +import com.azure.resourcemanager.appcontainers.fluent.FunctionsExtensionsClient; +import com.azure.resourcemanager.appcontainers.fluent.JavaComponentsClient; import com.azure.resourcemanager.appcontainers.fluent.JobsClient; import com.azure.resourcemanager.appcontainers.fluent.JobsExecutionsClient; import com.azure.resourcemanager.appcontainers.fluent.ManagedCertificatesClient; import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentDiagnosticsClient; +import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentUsagesClient; import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsClient; import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsDiagnosticsClient; import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsStoragesClient; import com.azure.resourcemanager.appcontainers.fluent.NamespacesClient; import com.azure.resourcemanager.appcontainers.fluent.OperationsClient; import com.azure.resourcemanager.appcontainers.fluent.ResourceProvidersClient; +import com.azure.resourcemanager.appcontainers.fluent.UsagesClient; import java.io.IOException; import java.lang.reflect.Type; import java.nio.ByteBuffer; @@ -56,395 +68,625 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** Initializes a new instance of the ContainerAppsApiClientImpl type. */ +/** + * Initializes a new instance of the ContainerAppsApiClientImpl type. + */ @ServiceClient(builder = ContainerAppsApiClientBuilder.class) public final class ContainerAppsApiClientImpl implements ContainerAppsApiClient { - /** The ID of the target subscription. */ + /** + * The ID of the target subscription. The value must be an UUID. + */ private final String subscriptionId; /** - * Gets The ID of the target subscription. - * + * Gets The ID of the target subscription. The value must be an UUID. + * * @return the subscriptionId value. */ public String getSubscriptionId() { return this.subscriptionId; } - /** server parameter. */ + /** + * server parameter. + */ private final String endpoint; /** * Gets server parameter. - * + * * @return the endpoint value. */ public String getEndpoint() { return this.endpoint; } - /** Api Version. */ + /** + * Api Version. + */ private final String apiVersion; /** * Gets Api Version. - * + * * @return the apiVersion value. */ public String getApiVersion() { return this.apiVersion; } - /** The HTTP pipeline to send requests through. */ + /** + * The HTTP pipeline to send requests through. + */ private final HttpPipeline httpPipeline; /** * Gets The HTTP pipeline to send requests through. - * + * * @return the httpPipeline value. */ public HttpPipeline getHttpPipeline() { return this.httpPipeline; } - /** The serializer to serialize an object into a string. */ + /** + * The serializer to serialize an object into a string. + */ private final SerializerAdapter serializerAdapter; /** * Gets The serializer to serialize an object into a string. - * + * * @return the serializerAdapter value. */ SerializerAdapter getSerializerAdapter() { return this.serializerAdapter; } - /** The default poll interval for long-running operation. */ + /** + * The default poll interval for long-running operation. + */ private final Duration defaultPollInterval; /** * Gets The default poll interval for long-running operation. - * + * * @return the defaultPollInterval value. */ public Duration getDefaultPollInterval() { return this.defaultPollInterval; } - /** The ContainerAppsAuthConfigsClient object to access its operations. */ + /** + * The AppResilienciesClient object to access its operations. + */ + private final AppResilienciesClient appResiliencies; + + /** + * Gets the AppResilienciesClient object to access its operations. + * + * @return the AppResilienciesClient object. + */ + public AppResilienciesClient getAppResiliencies() { + return this.appResiliencies; + } + + /** + * The ContainerAppsAuthConfigsClient object to access its operations. + */ private final ContainerAppsAuthConfigsClient containerAppsAuthConfigs; /** * Gets the ContainerAppsAuthConfigsClient object to access its operations. - * + * * @return the ContainerAppsAuthConfigsClient object. */ public ContainerAppsAuthConfigsClient getContainerAppsAuthConfigs() { return this.containerAppsAuthConfigs; } - /** The AvailableWorkloadProfilesClient object to access its operations. */ + /** + * 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. */ + /** + * 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. */ + /** + * The BuildersClient object to access its operations. + */ + private final BuildersClient builders; + + /** + * Gets the BuildersClient object to access its operations. + * + * @return the BuildersClient object. + */ + public BuildersClient getBuilders() { + return this.builders; + } + + /** + * The BuildsByBuilderResourcesClient object to access its operations. + */ + private final BuildsByBuilderResourcesClient buildsByBuilderResources; + + /** + * Gets the BuildsByBuilderResourcesClient object to access its operations. + * + * @return the BuildsByBuilderResourcesClient object. + */ + public BuildsByBuilderResourcesClient getBuildsByBuilderResources() { + return this.buildsByBuilderResources; + } + + /** + * The BuildsClient object to access its operations. + */ + private final BuildsClient builds; + + /** + * Gets the BuildsClient object to access its operations. + * + * @return the BuildsClient object. + */ + public BuildsClient getBuilds() { + return this.builds; + } + + /** + * The BuildAuthTokensClient object to access its operations. + */ + private final BuildAuthTokensClient buildAuthTokens; + + /** + * Gets the BuildAuthTokensClient object to access its operations. + * + * @return the BuildAuthTokensClient object. + */ + public BuildAuthTokensClient getBuildAuthTokens() { + return this.buildAuthTokens; + } + + /** + * The ConnectedEnvironmentsClient object to access its operations. + */ 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * 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. */ + /** + * The ContainerAppsClient object to access its operations. + */ private final ContainerAppsClient containerApps; /** * Gets the ContainerAppsClient object to access its operations. - * + * * @return the ContainerAppsClient object. */ public ContainerAppsClient getContainerApps() { return this.containerApps; } - /** The ContainerAppsRevisionsClient object to access its operations. */ + /** + * The ContainerAppsRevisionsClient object to access its operations. + */ private final ContainerAppsRevisionsClient containerAppsRevisions; /** * Gets the ContainerAppsRevisionsClient object to access its operations. - * + * * @return the ContainerAppsRevisionsClient object. */ public ContainerAppsRevisionsClient getContainerAppsRevisions() { return this.containerAppsRevisions; } - /** The ContainerAppsRevisionReplicasClient object to access its operations. */ + /** + * The ContainerAppsRevisionReplicasClient object to access its operations. + */ private final ContainerAppsRevisionReplicasClient containerAppsRevisionReplicas; /** * Gets the ContainerAppsRevisionReplicasClient object to access its operations. - * + * * @return the ContainerAppsRevisionReplicasClient object. */ public ContainerAppsRevisionReplicasClient getContainerAppsRevisionReplicas() { return this.containerAppsRevisionReplicas; } - /** The ContainerAppsDiagnosticsClient object to access its operations. */ + /** + * The ContainerAppsDiagnosticsClient object to access its operations. + */ private final ContainerAppsDiagnosticsClient containerAppsDiagnostics; /** * Gets the ContainerAppsDiagnosticsClient object to access its operations. - * + * * @return the ContainerAppsDiagnosticsClient object. */ public ContainerAppsDiagnosticsClient getContainerAppsDiagnostics() { return this.containerAppsDiagnostics; } - /** The ManagedEnvironmentDiagnosticsClient object to access its operations. */ + /** + * The ManagedEnvironmentDiagnosticsClient object to access its operations. + */ private final ManagedEnvironmentDiagnosticsClient managedEnvironmentDiagnostics; /** * Gets the ManagedEnvironmentDiagnosticsClient object to access its operations. - * + * * @return the ManagedEnvironmentDiagnosticsClient object. */ public ManagedEnvironmentDiagnosticsClient getManagedEnvironmentDiagnostics() { return this.managedEnvironmentDiagnostics; } - /** The ManagedEnvironmentsDiagnosticsClient object to access its operations. */ + /** + * The ManagedEnvironmentsDiagnosticsClient object to access its operations. + */ private final ManagedEnvironmentsDiagnosticsClient managedEnvironmentsDiagnostics; /** * Gets the ManagedEnvironmentsDiagnosticsClient object to access its operations. - * + * * @return the ManagedEnvironmentsDiagnosticsClient object. */ public ManagedEnvironmentsDiagnosticsClient getManagedEnvironmentsDiagnostics() { return this.managedEnvironmentsDiagnostics; } - /** The OperationsClient object to access its operations. */ + /** + * The JobsClient object to access its operations. + */ + private final JobsClient jobs; + + /** + * Gets the JobsClient object to access its operations. + * + * @return the JobsClient object. + */ + public JobsClient getJobs() { + return this.jobs; + } + + /** + * The DotNetComponentsClient object to access its operations. + */ + private final DotNetComponentsClient dotNetComponents; + + /** + * Gets the DotNetComponentsClient object to access its operations. + * + * @return the DotNetComponentsClient object. + */ + public DotNetComponentsClient getDotNetComponents() { + return this.dotNetComponents; + } + + /** + * The OperationsClient object to access its operations. + */ private final OperationsClient operations; /** * Gets the OperationsClient object to access its operations. - * + * * @return the OperationsClient object. */ public OperationsClient getOperations() { return this.operations; } - /** The JobsClient object to access its operations. */ - private final JobsClient jobs; + /** + * The JavaComponentsClient object to access its operations. + */ + private final JavaComponentsClient javaComponents; /** - * Gets the JobsClient object to access its operations. - * - * @return the JobsClient object. + * Gets the JavaComponentsClient object to access its operations. + * + * @return the JavaComponentsClient object. */ - public JobsClient getJobs() { - return this.jobs; + public JavaComponentsClient getJavaComponents() { + return this.javaComponents; } - /** The JobsExecutionsClient object to access its operations. */ + /** + * The JobsExecutionsClient object to access its operations. + */ private final JobsExecutionsClient jobsExecutions; /** * Gets the JobsExecutionsClient object to access its operations. - * + * * @return the JobsExecutionsClient object. */ public JobsExecutionsClient getJobsExecutions() { return this.jobsExecutions; } - /** The ResourceProvidersClient object to access its operations. */ + /** + * The ResourceProvidersClient object to access its operations. + */ private final ResourceProvidersClient resourceProviders; /** * Gets the ResourceProvidersClient object to access its operations. - * + * * @return the ResourceProvidersClient object. */ public ResourceProvidersClient getResourceProviders() { return this.resourceProviders; } - /** The ManagedEnvironmentsClient object to access its operations. */ + /** + * The ManagedEnvironmentsClient object to access its operations. + */ private final ManagedEnvironmentsClient managedEnvironments; /** * Gets the ManagedEnvironmentsClient object to access its operations. - * + * * @return the ManagedEnvironmentsClient object. */ public ManagedEnvironmentsClient getManagedEnvironments() { return this.managedEnvironments; } - /** The CertificatesClient object to access its operations. */ + /** + * The CertificatesClient object to access its operations. + */ private final CertificatesClient certificates; /** * Gets the CertificatesClient object to access its operations. - * + * * @return the CertificatesClient object. */ public CertificatesClient getCertificates() { return this.certificates; } - /** The ManagedCertificatesClient object to access its operations. */ + /** + * The ManagedCertificatesClient object to access its operations. + */ private final ManagedCertificatesClient managedCertificates; /** * Gets the ManagedCertificatesClient object to access its operations. - * + * * @return the ManagedCertificatesClient object. */ public ManagedCertificatesClient getManagedCertificates() { return this.managedCertificates; } - /** The NamespacesClient object to access its operations. */ + /** + * The NamespacesClient object to access its operations. + */ private final NamespacesClient namespaces; /** * Gets the NamespacesClient object to access its operations. - * + * * @return the NamespacesClient object. */ public NamespacesClient getNamespaces() { return this.namespaces; } - /** The DaprComponentsClient object to access its operations. */ + /** + * The DaprComponentResiliencyPoliciesClient object to access its operations. + */ + private final DaprComponentResiliencyPoliciesClient daprComponentResiliencyPolicies; + + /** + * Gets the DaprComponentResiliencyPoliciesClient object to access its operations. + * + * @return the DaprComponentResiliencyPoliciesClient object. + */ + public DaprComponentResiliencyPoliciesClient getDaprComponentResiliencyPolicies() { + return this.daprComponentResiliencyPolicies; + } + + /** + * The DaprComponentsClient object to access its operations. + */ 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. */ + /** + * The DaprSubscriptionsClient object to access its operations. + */ + private final DaprSubscriptionsClient daprSubscriptions; + + /** + * Gets the DaprSubscriptionsClient object to access its operations. + * + * @return the DaprSubscriptionsClient object. + */ + public DaprSubscriptionsClient getDaprSubscriptions() { + return this.daprSubscriptions; + } + + /** + * The ManagedEnvironmentsStoragesClient object to access its operations. + */ private final ManagedEnvironmentsStoragesClient managedEnvironmentsStorages; /** * Gets the ManagedEnvironmentsStoragesClient object to access its operations. - * + * * @return the ManagedEnvironmentsStoragesClient object. */ public ManagedEnvironmentsStoragesClient getManagedEnvironmentsStorages() { return this.managedEnvironmentsStorages; } - /** The ContainerAppsSourceControlsClient object to access its operations. */ + /** + * The ContainerAppsSourceControlsClient object to access its operations. + */ private final ContainerAppsSourceControlsClient containerAppsSourceControls; /** * Gets the ContainerAppsSourceControlsClient object to access its operations. - * + * * @return the ContainerAppsSourceControlsClient object. */ public ContainerAppsSourceControlsClient getContainerAppsSourceControls() { return this.containerAppsSourceControls; } + /** + * The UsagesClient object to access its operations. + */ + private final UsagesClient usages; + + /** + * Gets the UsagesClient object to access its operations. + * + * @return the UsagesClient object. + */ + public UsagesClient getUsages() { + return this.usages; + } + + /** + * The ManagedEnvironmentUsagesClient object to access its operations. + */ + private final ManagedEnvironmentUsagesClient managedEnvironmentUsages; + + /** + * Gets the ManagedEnvironmentUsagesClient object to access its operations. + * + * @return the ManagedEnvironmentUsagesClient object. + */ + public ManagedEnvironmentUsagesClient getManagedEnvironmentUsages() { + return this.managedEnvironmentUsages; + } + + /** + * The FunctionsExtensionsClient object to access its operations. + */ + private final FunctionsExtensionsClient functionsExtensions; + + /** + * Gets the FunctionsExtensionsClient object to access its operations. + * + * @return the FunctionsExtensionsClient object. + */ + public FunctionsExtensionsClient getFunctionsExtensions() { + return this.functionsExtensions; + } + /** * Initializes an instance of ContainerAppsApiClient client. - * + * * @param httpPipeline The HTTP pipeline to send requests through. * @param serializerAdapter The serializer to serialize an object into a string. * @param defaultPollInterval The default poll interval for long-running operation. * @param environment The Azure environment. - * @param subscriptionId The ID of the target subscription. + * @param subscriptionId The ID of the target subscription. The value must be an UUID. * @param endpoint server parameter. */ - ContainerAppsApiClientImpl( - HttpPipeline httpPipeline, - SerializerAdapter serializerAdapter, - Duration defaultPollInterval, - AzureEnvironment environment, - String subscriptionId, - String endpoint) { + ContainerAppsApiClientImpl(HttpPipeline httpPipeline, SerializerAdapter serializerAdapter, + Duration defaultPollInterval, AzureEnvironment environment, String subscriptionId, String endpoint) { this.httpPipeline = httpPipeline; this.serializerAdapter = serializerAdapter; this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2023-05-01"; + this.apiVersion = "2024-02-02-preview"; + this.appResiliencies = new AppResilienciesClientImpl(this); this.containerAppsAuthConfigs = new ContainerAppsAuthConfigsClientImpl(this); this.availableWorkloadProfiles = new AvailableWorkloadProfilesClientImpl(this); this.billingMeters = new BillingMetersClientImpl(this); + this.builders = new BuildersClientImpl(this); + this.buildsByBuilderResources = new BuildsByBuilderResourcesClientImpl(this); + this.builds = new BuildsClientImpl(this); + this.buildAuthTokens = new BuildAuthTokensClientImpl(this); this.connectedEnvironments = new ConnectedEnvironmentsClientImpl(this); this.connectedEnvironmentsCertificates = new ConnectedEnvironmentsCertificatesClientImpl(this); this.connectedEnvironmentsDaprComponents = new ConnectedEnvironmentsDaprComponentsClientImpl(this); @@ -455,22 +697,29 @@ public ContainerAppsSourceControlsClient getContainerAppsSourceControls() { this.containerAppsDiagnostics = new ContainerAppsDiagnosticsClientImpl(this); this.managedEnvironmentDiagnostics = new ManagedEnvironmentDiagnosticsClientImpl(this); this.managedEnvironmentsDiagnostics = new ManagedEnvironmentsDiagnosticsClientImpl(this); - this.operations = new OperationsClientImpl(this); this.jobs = new JobsClientImpl(this); + this.dotNetComponents = new DotNetComponentsClientImpl(this); + this.operations = new OperationsClientImpl(this); + this.javaComponents = new JavaComponentsClientImpl(this); this.jobsExecutions = new JobsExecutionsClientImpl(this); this.resourceProviders = new ResourceProvidersClientImpl(this); this.managedEnvironments = new ManagedEnvironmentsClientImpl(this); this.certificates = new CertificatesClientImpl(this); this.managedCertificates = new ManagedCertificatesClientImpl(this); this.namespaces = new NamespacesClientImpl(this); + this.daprComponentResiliencyPolicies = new DaprComponentResiliencyPoliciesClientImpl(this); this.daprComponents = new DaprComponentsClientImpl(this); + this.daprSubscriptions = new DaprSubscriptionsClientImpl(this); this.managedEnvironmentsStorages = new ManagedEnvironmentsStoragesClientImpl(this); this.containerAppsSourceControls = new ContainerAppsSourceControlsClientImpl(this); + this.usages = new UsagesClientImpl(this); + this.managedEnvironmentUsages = new ManagedEnvironmentUsagesClientImpl(this); + this.functionsExtensions = new FunctionsExtensionsClientImpl(this); } /** * Gets default client context. - * + * * @return the default client context. */ public Context getContext() { @@ -479,7 +728,7 @@ public Context getContext() { /** * Merges default client context with provided context. - * + * * @param context the context to be merged with default client context. * @return the merged context. */ @@ -489,7 +738,7 @@ public Context mergeContext(Context context) { /** * Gets long running operation result. - * + * * @param activationResponse the response of activation operation. * @param httpPipeline the http pipeline. * @param pollResultType type of poll result. @@ -499,26 +748,15 @@ public Context mergeContext(Context context) { * @param type of final result. * @return poller flux for poll result and final result. */ - public PollerFlux, U> getLroResult( - Mono>> activationResponse, - HttpPipeline httpPipeline, - Type pollResultType, - Type finalResultType, - Context context) { - return PollerFactory - .create( - serializerAdapter, - httpPipeline, - pollResultType, - finalResultType, - defaultPollInterval, - activationResponse, - context); + public PollerFlux, U> getLroResult(Mono>> activationResponse, + HttpPipeline httpPipeline, Type pollResultType, Type finalResultType, Context context) { + return PollerFactory.create(serializerAdapter, httpPipeline, pollResultType, finalResultType, + defaultPollInterval, activationResponse, context); } /** * Gets the final result, or an error, based on last async poll response. - * + * * @param response the last async poll response. * @param type of poll result. * @param type of final result. @@ -531,19 +769,16 @@ public Mono getLroFinalResultOrError(AsyncPollResponse, HttpResponse errorResponse = null; PollResult.Error lroError = response.getValue().getError(); if (lroError != null) { - errorResponse = - new HttpResponseImpl( - lroError.getResponseStatusCode(), lroError.getResponseHeaders(), lroError.getResponseBody()); + errorResponse = new HttpResponseImpl(lroError.getResponseStatusCode(), lroError.getResponseHeaders(), + lroError.getResponseBody()); errorMessage = response.getValue().getError().getMessage(); String errorBody = response.getValue().getError().getResponseBody(); if (errorBody != null) { // try to deserialize error body to ManagementError try { - managementError = - this - .getSerializerAdapter() - .deserialize(errorBody, ManagementError.class, SerializerEncoding.JSON); + managementError = this.getSerializerAdapter().deserialize(errorBody, ManagementError.class, + SerializerEncoding.JSON); if (managementError.getCode() == null || managementError.getMessage() == null) { managementError = null; } 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 e52c6e91fd92..83d04f142fbf 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 @@ -33,23 +33,28 @@ import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ContainerAppsAuthConfigsClient. */ +/** + * An instance of this class provides access to all the operations defined in ContainerAppsAuthConfigsClient. + */ public final class ContainerAppsAuthConfigsClientImpl implements ContainerAppsAuthConfigsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ContainerAppsAuthConfigsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerAppsApiClientImpl client; /** * Initializes an instance of ContainerAppsAuthConfigsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ContainerAppsAuthConfigsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create(ContainerAppsAuthConfigsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ContainerAppsAuthConfigsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -60,102 +65,78 @@ public final class ContainerAppsAuthConfigsClientImpl implements ContainerAppsAu @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") public interface ContainerAppsAuthConfigsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listByContainerApp( - @HostParam("$host") String endpoint, + Mono> listByContainerApp(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("containerAppName") String containerAppName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{authConfigName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{authConfigName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("authConfigName") String authConfigName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("containerAppName") String containerAppName, @PathParam("authConfigName") String authConfigName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{authConfigName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{authConfigName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("authConfigName") String authConfigName, + @PathParam("containerAppName") String containerAppName, @PathParam("authConfigName") String authConfigName, @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") AuthConfigInner authConfigEnvelope, - @HeaderParam("Accept") String accept, + @BodyParam("application/json") AuthConfigInner authConfigEnvelope, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{authConfigName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/authConfigs/{authConfigName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete( - @HostParam("$host") String endpoint, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("authConfigName") String authConfigName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("containerAppName") String containerAppName, @PathParam("authConfigName") String authConfigName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listByContainerAppNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Get the Container App AuthConfigs in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Container App AuthConfigs in a given resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByContainerAppSinglePageAsync( - String resourceGroupName, String containerAppName) { + private Mono> listByContainerAppSinglePageAsync(String resourceGroupName, + String containerAppName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -168,31 +149,16 @@ private Mono> listByContainerAppSinglePageAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listByContainerApp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.listByContainerApp(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the Container App AuthConfigs in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -200,22 +166,18 @@ private Mono> listByContainerAppSinglePageAsync( * @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 Container App AuthConfigs in a given resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByContainerAppSinglePageAsync( - String resourceGroupName, String containerAppName, Context context) { + private Mono> listByContainerAppSinglePageAsync(String resourceGroupName, + String containerAppName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -228,28 +190,15 @@ private Mono> listByContainerAppSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByContainerApp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByContainerApp(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the Container App AuthConfigs in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -259,14 +208,13 @@ private Mono> listByContainerAppSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByContainerAppAsync(String resourceGroupName, String containerAppName) { - return new PagedFlux<>( - () -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName), + return new PagedFlux<>(() -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName), nextLink -> listByContainerAppNextSinglePageAsync(nextLink)); } /** * Get the Container App AuthConfigs in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -276,16 +224,15 @@ private PagedFlux listByContainerAppAsync(String resourceGroupN * @return the Container App AuthConfigs in a given resource group as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByContainerAppAsync( - String resourceGroupName, String containerAppName, Context context) { - return new PagedFlux<>( - () -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName, context), + private PagedFlux listByContainerAppAsync(String resourceGroupName, String containerAppName, + Context context) { + return new PagedFlux<>(() -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName, context), nextLink -> listByContainerAppNextSinglePageAsync(nextLink, context)); } /** * Get the Container App AuthConfigs in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -300,7 +247,7 @@ public PagedIterable listByContainerApp(String resourceGroupNam /** * Get the Container App AuthConfigs in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -310,14 +257,14 @@ public PagedIterable listByContainerApp(String resourceGroupNam * @return the Container App AuthConfigs in a given resource group as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByContainerApp( - String resourceGroupName, String containerAppName, Context context) { + public PagedIterable listByContainerApp(String resourceGroupName, String containerAppName, + Context context) { return new PagedIterable<>(listByContainerAppAsync(resourceGroupName, containerAppName, context)); } /** * Get a AuthConfig of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. @@ -327,19 +274,15 @@ public PagedIterable listByContainerApp( * @return a AuthConfig of a Container App along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String containerAppName, String authConfigName) { + private Mono> getWithResponseAsync(String resourceGroupName, String containerAppName, + String authConfigName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -354,24 +297,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - authConfigName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, authConfigName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a AuthConfig of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. @@ -382,19 +315,15 @@ private Mono> getWithResponseAsync( * @return a AuthConfig of a Container App along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String containerAppName, String authConfigName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String containerAppName, + String authConfigName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -409,21 +338,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - authConfigName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, authConfigName, this.client.getApiVersion(), accept, context); } /** * Get a AuthConfig of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. @@ -440,7 +361,7 @@ private Mono getAsync(String resourceGroupName, String containe /** * Get a AuthConfig of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. @@ -451,14 +372,14 @@ private Mono getAsync(String resourceGroupName, String containe * @return a AuthConfig of a Container App along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String containerAppName, String authConfigName, Context context) { + public Response getWithResponse(String resourceGroupName, String containerAppName, + String authConfigName, Context context) { return getWithResponseAsync(resourceGroupName, containerAppName, authConfigName, context).block(); } /** * Get a AuthConfig of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. @@ -474,7 +395,7 @@ public AuthConfigInner get(String resourceGroupName, String containerAppName, St /** * Create or update the AuthConfig for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. @@ -483,22 +404,18 @@ public AuthConfigInner get(String resourceGroupName, String containerAppName, St * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return configuration settings for the Azure ContainerApp Service Authentication / Authorization feature along - * with {@link Response} on successful completion of {@link Mono}. + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, String containerAppName, String authConfigName, AuthConfigInner authConfigEnvelope) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String containerAppName, String authConfigName, AuthConfigInner authConfigEnvelope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -519,25 +436,15 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - authConfigName, - this.client.getApiVersion(), - authConfigEnvelope, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, authConfigName, this.client.getApiVersion(), authConfigEnvelope, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create or update the AuthConfig for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. @@ -547,26 +454,18 @@ private Mono> createOrUpdateWithResponseAsync( * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return configuration settings for the Azure ContainerApp Service Authentication / Authorization feature along - * with {@link Response} on successful completion of {@link Mono}. + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String containerAppName, - String authConfigName, - AuthConfigInner authConfigEnvelope, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String containerAppName, String authConfigName, AuthConfigInner authConfigEnvelope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -587,22 +486,13 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - authConfigName, - this.client.getApiVersion(), - authConfigEnvelope, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, authConfigName, this.client.getApiVersion(), authConfigEnvelope, accept, context); } /** * Create or update the AuthConfig for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. @@ -611,18 +501,18 @@ private Mono> createOrUpdateWithResponseAsync( * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return configuration settings for the Azure ContainerApp Service Authentication / Authorization feature on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String containerAppName, String authConfigName, AuthConfigInner authConfigEnvelope) { + private Mono createOrUpdateAsync(String resourceGroupName, String containerAppName, + String authConfigName, AuthConfigInner authConfigEnvelope) { return createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, authConfigName, authConfigEnvelope) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Create or update the AuthConfig for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. @@ -632,23 +522,18 @@ private Mono createOrUpdateAsync( * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return configuration settings for the Azure ContainerApp Service Authentication / Authorization feature along - * with {@link Response}. + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String containerAppName, - String authConfigName, - AuthConfigInner authConfigEnvelope, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, containerAppName, authConfigName, authConfigEnvelope, context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, String containerAppName, + String authConfigName, AuthConfigInner authConfigEnvelope, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, authConfigName, authConfigEnvelope, + context).block(); } /** * Create or update the AuthConfig for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. @@ -659,16 +544,15 @@ public Response createOrUpdateWithResponse( * @return configuration settings for the Azure ContainerApp Service Authentication / Authorization feature. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AuthConfigInner createOrUpdate( - String resourceGroupName, String containerAppName, String authConfigName, AuthConfigInner authConfigEnvelope) { - return createOrUpdateWithResponse( - resourceGroupName, containerAppName, authConfigName, authConfigEnvelope, Context.NONE) - .getValue(); + public AuthConfigInner createOrUpdate(String resourceGroupName, String containerAppName, String authConfigName, + AuthConfigInner authConfigEnvelope) { + return createOrUpdateWithResponse(resourceGroupName, containerAppName, authConfigName, authConfigEnvelope, + Context.NONE).getValue(); } /** * Delete a Container App AuthConfig. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. @@ -678,19 +562,15 @@ public AuthConfigInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String containerAppName, String authConfigName) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String containerAppName, + String authConfigName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -705,24 +585,14 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - authConfigName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, authConfigName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a Container App AuthConfig. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. @@ -733,19 +603,15 @@ private Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String containerAppName, String authConfigName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String containerAppName, + String authConfigName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -760,21 +626,13 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - authConfigName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, authConfigName, this.client.getApiVersion(), accept, context); } /** * Delete a Container App AuthConfig. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. @@ -791,7 +649,7 @@ private Mono deleteAsync(String resourceGroupName, String containerAppName /** * Delete a Container App AuthConfig. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. @@ -802,14 +660,14 @@ private Mono deleteAsync(String resourceGroupName, String containerAppName * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String containerAppName, String authConfigName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String containerAppName, String authConfigName, + Context context) { return deleteWithResponseAsync(resourceGroupName, containerAppName, authConfigName, context).block(); } /** * Delete a Container App AuthConfig. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. @@ -824,14 +682,15 @@ public void delete(String resourceGroupName, String containerAppName, String aut /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 authConfig collection ARM resource along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return authConfig collection ARM resource along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByContainerAppNextSinglePageAsync(String nextLink) { @@ -839,63 +698,45 @@ private Mono> listByContainerAppNextSinglePageAsy return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByContainerAppNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return authConfig collection ARM resource along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return authConfig collection ARM resource along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByContainerAppNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByContainerAppNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByContainerAppNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByContainerAppNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsImpl.java index b9c6591e44ca..f3d9f8b6c14a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsImpl.java @@ -21,35 +21,31 @@ public final class ContainerAppsAuthConfigsImpl implements ContainerAppsAuthConf private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - public ContainerAppsAuthConfigsImpl( - ContainerAppsAuthConfigsClient innerClient, + public ContainerAppsAuthConfigsImpl(ContainerAppsAuthConfigsClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable listByContainerApp(String resourceGroupName, String containerAppName) { - PagedIterable inner = - this.serviceClient().listByContainerApp(resourceGroupName, containerAppName); - return Utils.mapPage(inner, inner1 -> new AuthConfigImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByContainerApp(resourceGroupName, containerAppName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AuthConfigImpl(inner1, this.manager())); } - public PagedIterable listByContainerApp( - String resourceGroupName, String containerAppName, Context context) { - PagedIterable inner = - this.serviceClient().listByContainerApp(resourceGroupName, containerAppName, context); - return Utils.mapPage(inner, inner1 -> new AuthConfigImpl(inner1, this.manager())); + public PagedIterable listByContainerApp(String resourceGroupName, String containerAppName, + Context context) { + PagedIterable inner + = this.serviceClient().listByContainerApp(resourceGroupName, containerAppName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new AuthConfigImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String containerAppName, String authConfigName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, containerAppName, authConfigName, context); + public Response getWithResponse(String resourceGroupName, String containerAppName, + String authConfigName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, containerAppName, authConfigName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new AuthConfigImpl(inner.getValue(), this.manager())); } else { return null; @@ -65,8 +61,8 @@ public AuthConfig get(String resourceGroupName, String containerAppName, String } } - public Response deleteWithResponse( - String resourceGroupName, String containerAppName, String authConfigName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String containerAppName, String authConfigName, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, containerAppName, authConfigName, context); } @@ -75,105 +71,77 @@ public void delete(String resourceGroupName, String containerAppName, String aut } public AuthConfig getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String containerAppName = Utils.getValueFromIdByName(id, "containerApps"); + String containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); if (containerAppName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); } - String authConfigName = Utils.getValueFromIdByName(id, "authConfigs"); + String authConfigName = ResourceManagerUtils.getValueFromIdByName(id, "authConfigs"); if (authConfigName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'authConfigs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'authConfigs'.", id))); } return this.getWithResponse(resourceGroupName, containerAppName, authConfigName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String containerAppName = Utils.getValueFromIdByName(id, "containerApps"); + String containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); if (containerAppName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); } - String authConfigName = Utils.getValueFromIdByName(id, "authConfigs"); + String authConfigName = ResourceManagerUtils.getValueFromIdByName(id, "authConfigs"); if (authConfigName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'authConfigs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'authConfigs'.", id))); } return this.getWithResponse(resourceGroupName, containerAppName, authConfigName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String containerAppName = Utils.getValueFromIdByName(id, "containerApps"); + String containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); if (containerAppName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); } - String authConfigName = Utils.getValueFromIdByName(id, "authConfigs"); + String authConfigName = ResourceManagerUtils.getValueFromIdByName(id, "authConfigs"); if (authConfigName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'authConfigs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'authConfigs'.", id))); } this.deleteWithResponse(resourceGroupName, containerAppName, authConfigName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String containerAppName = Utils.getValueFromIdByName(id, "containerApps"); + String containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); if (containerAppName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); } - String authConfigName = Utils.getValueFromIdByName(id, "authConfigs"); + String authConfigName = ResourceManagerUtils.getValueFromIdByName(id, "authConfigs"); if (authConfigName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'authConfigs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'authConfigs'.", id))); } return this.deleteWithResponse(resourceGroupName, containerAppName, authConfigName, context); } 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 31d17e3abca0..fc84088e1a3b 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 @@ -44,22 +44,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ContainerAppsClient. */ +/** + * An instance of this class provides access to all the operations defined in ContainerAppsClient. + */ public final class ContainerAppsClientImpl implements ContainerAppsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ContainerAppsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerAppsApiClientImpl client; /** * Initializes an instance of ContainerAppsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ContainerAppsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy.create(ContainerAppsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ContainerAppsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -70,290 +76,206 @@ public final class ContainerAppsClientImpl implements ContainerAppsClient { @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") public interface ContainerAppsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/containerApps") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType( - value = ManagementException.class, - code = {404}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ManagementException.class, code = { 404 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("containerAppName") String containerAppName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ContainerAppInner containerAppEnvelope, - @HeaderParam("Accept") String accept, + @PathParam("containerAppName") String containerAppName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ContainerAppInner containerAppEnvelope, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("containerAppName") String containerAppName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> update( - @HostParam("$host") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") ContainerAppInner containerAppEnvelope, - @HeaderParam("Accept") String accept, + @PathParam("containerAppName") String containerAppName, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ContainerAppInner containerAppEnvelope, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/listCustomHostNameAnalysis") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/listCustomHostNameAnalysis") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listCustomHostnameAnalysis( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, + @HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @QueryParam("customHostname") String customHostname, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("containerAppName") String containerAppName, @QueryParam("customHostname") String customHostname, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/listSecrets") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/listSecrets") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listSecrets( - @HostParam("$host") String endpoint, + Mono> listSecrets(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("containerAppName") String containerAppName, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("containerAppName") String containerAppName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/getAuthtoken") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType( - value = ManagementException.class, - code = {404}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/getAuthtoken") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ManagementException.class, code = { 404 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getAuthToken( - @HostParam("$host") String endpoint, + Mono> getAuthToken(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("containerAppName") String containerAppName, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("containerAppName") String containerAppName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/start") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/start") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> start( - @HostParam("$host") String endpoint, + Mono>> start(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("containerAppName") String containerAppName, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("containerAppName") String containerAppName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/stop") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/stop") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> stop( - @HostParam("$host") String endpoint, + Mono>> stop(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("containerAppName") String containerAppName, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("containerAppName") String containerAppName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Get the Container Apps in a given subscription. - * + * * @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 Container Apps in a given subscription along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the Container Apps in a given subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Container Apps in a given subscription along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the Container Apps in a given subscription. - * + * * @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 Container Apps in a given subscription as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** * Get the Container Apps in a given subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -362,13 +284,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** * Get the Container Apps in a given subscription. - * + * * @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 Container Apps in a given subscription as paginated response with {@link PagedIterable}. @@ -380,7 +302,7 @@ public PagedIterable list() { /** * Get the Container Apps in a given subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -394,27 +316,23 @@ public PagedIterable list(Context context) { /** * Get the Container Apps in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Container Apps in a given resource group along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -422,53 +340,34 @@ private Mono> listByResourceGroupSinglePageAsyn } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the Container Apps in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Container Apps in a given resource group along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -477,27 +376,15 @@ private Mono> listByResourceGroupSinglePageAsyn final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the Container Apps in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -506,14 +393,13 @@ private Mono> listByResourceGroupSinglePageAsyn */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Get the Container Apps in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -523,14 +409,13 @@ private PagedFlux listByResourceGroupAsync(String resourceGro */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * Get the Container Apps in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -544,7 +429,7 @@ public PagedIterable listByResourceGroup(String resourceGroup /** * Get the Container Apps in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -559,7 +444,7 @@ public PagedIterable listByResourceGroup(String resourceGroup /** * Get the properties of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -569,19 +454,15 @@ public PagedIterable listByResourceGroup(String resourceGroup * @return the properties of a Container App along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String containerAppName) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String containerAppName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -594,22 +475,14 @@ private Mono> getByResourceGroupWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - accept, - context)) + context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the properties of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -620,19 +493,15 @@ private Mono> getByResourceGroupWithResponseAsync( * @return the properties of a Container App along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String containerAppName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String containerAppName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -644,20 +513,13 @@ private Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, this.client.getApiVersion(), accept, context); } /** * Get the properties of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -674,7 +536,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName /** * Get the properties of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -685,14 +547,14 @@ private Mono getByResourceGroupAsync(String resourceGroupName * @return the properties of a Container App along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String containerAppName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, String containerAppName, + Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, containerAppName, context).block(); } /** * Get the properties of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -708,7 +570,7 @@ public ContainerAppInner getByResourceGroup(String resourceGroupName, String con /** * Create or update a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param containerAppEnvelope Properties used to create a container app. @@ -718,19 +580,15 @@ public ContainerAppInner getByResourceGroup(String resourceGroupName, String con * @return container App along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String containerAppName, ContainerAppInner containerAppEnvelope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -748,24 +606,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - containerAppEnvelope, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, this.client.getApiVersion(), containerAppEnvelope, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create or update a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param containerAppEnvelope Properties used to create a container app. @@ -776,19 +625,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return container App along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -806,21 +651,13 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - containerAppEnvelope, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, this.client.getApiVersion(), containerAppEnvelope, accept, context); } /** * Create or update a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param containerAppEnvelope Properties used to create a container app. @@ -832,21 +669,15 @@ private Mono>> createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ContainerAppInner> beginCreateOrUpdateAsync( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, containerAppEnvelope); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ContainerAppInner.class, - ContainerAppInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, containerAppEnvelope); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ContainerAppInner.class, ContainerAppInner.class, this.client.getContext()); } /** * Create or update a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param containerAppEnvelope Properties used to create a container app. @@ -860,17 +691,15 @@ private PollerFlux, ContainerAppInner> beginCreate private PollerFlux, ContainerAppInner> beginCreateOrUpdateAsync( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, containerAppEnvelope, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ContainerAppInner.class, ContainerAppInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, containerAppEnvelope, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ContainerAppInner.class, ContainerAppInner.class, context); } /** * Create or update a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param containerAppEnvelope Properties used to create a container app. @@ -880,14 +709,14 @@ private PollerFlux, ContainerAppInner> beginCreate * @return the {@link SyncPoller} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContainerAppInner> beginCreateOrUpdate( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { + public SyncPoller, ContainerAppInner> beginCreateOrUpdate(String resourceGroupName, + String containerAppName, ContainerAppInner containerAppEnvelope) { return this.beginCreateOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope).getSyncPoller(); } /** * Create or update a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param containerAppEnvelope Properties used to create a container app. @@ -898,16 +727,15 @@ public SyncPoller, ContainerAppInner> beginCreateO * @return the {@link SyncPoller} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContainerAppInner> beginCreateOrUpdate( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context) + public SyncPoller, ContainerAppInner> beginCreateOrUpdate(String resourceGroupName, + String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context) .getSyncPoller(); } /** * Create or update a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param containerAppEnvelope Properties used to create a container app. @@ -917,16 +745,15 @@ public SyncPoller, ContainerAppInner> beginCreateO * @return container App on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String containerAppName, + ContainerAppInner containerAppEnvelope) { + return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create or update a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param containerAppEnvelope Properties used to create a container app. @@ -937,16 +764,15 @@ private Mono createOrUpdateAsync( * @return container App on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String containerAppName, + ContainerAppInner containerAppEnvelope, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create or update a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param containerAppEnvelope Properties used to create a container app. @@ -956,14 +782,14 @@ private Mono createOrUpdateAsync( * @return container App. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppInner createOrUpdate( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { + public ContainerAppInner createOrUpdate(String resourceGroupName, String containerAppName, + ContainerAppInner containerAppEnvelope) { return createOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope).block(); } /** * Create or update a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param containerAppEnvelope Properties used to create a container app. @@ -974,14 +800,14 @@ public ContainerAppInner createOrUpdate( * @return container App. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppInner createOrUpdate( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { + public ContainerAppInner createOrUpdate(String resourceGroupName, String containerAppName, + ContainerAppInner containerAppEnvelope, Context context) { return createOrUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context).block(); } /** * Delete a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -990,19 +816,15 @@ public ContainerAppInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String containerAppName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, + String containerAppName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1014,23 +836,14 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -1040,19 +853,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String containerAppName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String containerAppName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1064,20 +873,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, this.client.getApiVersion(), accept, context); } /** * Delete a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1088,15 +890,13 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String containerAppName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, containerAppName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -1106,18 +906,17 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String containerAppName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String containerAppName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceGroupName, containerAppName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1132,7 +931,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Delete a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -1142,14 +941,14 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String containerAppName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String containerAppName, + Context context) { return this.beginDeleteAsync(resourceGroupName, containerAppName, context).getSyncPoller(); } /** * Delete a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1159,14 +958,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String containerAppName) { - return beginDeleteAsync(resourceGroupName, containerAppName) - .last() + return beginDeleteAsync(resourceGroupName, containerAppName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -1177,14 +975,13 @@ private Mono deleteAsync(String resourceGroupName, String containerAppName */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String containerAppName, Context context) { - return beginDeleteAsync(resourceGroupName, containerAppName, context) - .last() + return beginDeleteAsync(resourceGroupName, containerAppName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1198,7 +995,7 @@ public void delete(String resourceGroupName, String containerAppName) { /** * Delete a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -1213,9 +1010,9 @@ public void delete(String resourceGroupName, String containerAppName, Context co /** * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * + * + * 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. @@ -1225,19 +1022,15 @@ public void delete(String resourceGroupName, String containerAppName, Context co * @return container App along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String containerAppName, + ContainerAppInner containerAppEnvelope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1256,25 +1049,16 @@ private Mono>> updateWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - containerAppEnvelope, - accept, - context)) + context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, this.client.getApiVersion(), containerAppEnvelope, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * + * + * 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. @@ -1285,19 +1069,15 @@ private Mono>> updateWithResponseAsync( * @return container App along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String containerAppName, + ContainerAppInner containerAppEnvelope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1315,23 +1095,15 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - containerAppEnvelope, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, this.client.getApiVersion(), containerAppEnvelope, accept, context); } /** * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * + * + * 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. @@ -1341,25 +1113,19 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContainerAppInner> beginUpdateAsync( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, containerAppName, containerAppEnvelope); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ContainerAppInner.class, - ContainerAppInner.class, - this.client.getContext()); + private PollerFlux, ContainerAppInner> beginUpdateAsync(String resourceGroupName, + String containerAppName, ContainerAppInner containerAppEnvelope) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, containerAppName, containerAppEnvelope); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ContainerAppInner.class, ContainerAppInner.class, this.client.getContext()); } /** * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * + * + * 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. @@ -1370,22 +1136,20 @@ private PollerFlux, ContainerAppInner> beginUpdate * @return the {@link PollerFlux} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContainerAppInner> beginUpdateAsync( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { + 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(), ContainerAppInner.class, ContainerAppInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, containerAppName, containerAppEnvelope, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ContainerAppInner.class, ContainerAppInner.class, context); } /** * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * + * + * 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. @@ -1395,16 +1159,16 @@ private PollerFlux, ContainerAppInner> beginUpdate * @return the {@link SyncPoller} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContainerAppInner> beginUpdate( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { + public SyncPoller, ContainerAppInner> beginUpdate(String resourceGroupName, + String containerAppName, ContainerAppInner containerAppEnvelope) { return this.beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope).getSyncPoller(); } /** * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * + * + * 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. @@ -1415,18 +1179,17 @@ public SyncPoller, ContainerAppInner> beginUpdate( * @return the {@link SyncPoller} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContainerAppInner> beginUpdate( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { - return this - .beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context) + public SyncPoller, ContainerAppInner> beginUpdate(String resourceGroupName, + String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { + return this.beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context) .getSyncPoller(); } /** * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * + * + * 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. @@ -1436,18 +1199,17 @@ public SyncPoller, ContainerAppInner> beginUpdate( * @return container App on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { - return beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope) - .last() + private Mono updateAsync(String resourceGroupName, String containerAppName, + ContainerAppInner containerAppEnvelope) { + return beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * + * + * 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. @@ -1458,18 +1220,17 @@ private Mono updateAsync( * @return container App on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { - return beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context) - .last() + private Mono updateAsync(String resourceGroupName, String containerAppName, + ContainerAppInner containerAppEnvelope, Context context) { + return beginUpdateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * + * + * 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. @@ -1479,16 +1240,16 @@ private Mono updateAsync( * @return container App. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppInner update( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope) { + public ContainerAppInner update(String resourceGroupName, String containerAppName, + ContainerAppInner containerAppEnvelope) { return updateAsync(resourceGroupName, containerAppName, containerAppEnvelope).block(); } /** * Update properties of a Container App - * - *

Patches a Container App using JSON Merge Patch. - * + * + * 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. @@ -1499,14 +1260,14 @@ public ContainerAppInner update( * @return container App. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppInner update( - String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context) { + public ContainerAppInner update(String resourceGroupName, String containerAppName, + ContainerAppInner containerAppEnvelope, Context context) { return updateAsync(resourceGroupName, containerAppName, containerAppEnvelope, context).block(); } /** * Analyzes a custom hostname for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param customHostname Custom hostname. @@ -1519,16 +1280,12 @@ public ContainerAppInner update( private Mono> listCustomHostnameAnalysisWithResponseAsync( String resourceGroupName, String containerAppName, String customHostname) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1540,24 +1297,15 @@ private Mono> listCustomHostnameAnal } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listCustomHostnameAnalysis( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - customHostname, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listCustomHostnameAnalysis(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, containerAppName, customHostname, + this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Analyzes a custom hostname for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param customHostname Custom hostname. @@ -1571,16 +1319,12 @@ private Mono> listCustomHostnameAnal private Mono> listCustomHostnameAnalysisWithResponseAsync( String resourceGroupName, String containerAppName, String customHostname, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1592,21 +1336,13 @@ private Mono> listCustomHostnameAnal } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listCustomHostnameAnalysis( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - customHostname, - this.client.getApiVersion(), - accept, - context); + return service.listCustomHostnameAnalysis(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, customHostname, this.client.getApiVersion(), accept, context); } /** * Analyzes a custom hostname for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1615,8 +1351,8 @@ private Mono> listCustomHostnameAnal * @return custom domain analysis on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listCustomHostnameAnalysisAsync( - String resourceGroupName, String containerAppName) { + private Mono listCustomHostnameAnalysisAsync(String resourceGroupName, + String containerAppName) { final String customHostname = null; return listCustomHostnameAnalysisWithResponseAsync(resourceGroupName, containerAppName, customHostname) .flatMap(res -> Mono.justOrEmpty(res.getValue())); @@ -1624,7 +1360,7 @@ private Mono listCustomHostnameAnalysisAsync( /** * Analyzes a custom hostname for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param customHostname Custom hostname. @@ -1635,15 +1371,15 @@ private Mono listCustomHostnameAnalysisAsync( * @return custom domain analysis along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listCustomHostnameAnalysisWithResponse( - String resourceGroupName, String containerAppName, String customHostname, Context context) { + public Response listCustomHostnameAnalysisWithResponse(String resourceGroupName, + String containerAppName, String customHostname, Context context) { return listCustomHostnameAnalysisWithResponseAsync(resourceGroupName, containerAppName, customHostname, context) .block(); } /** * Analyzes a custom hostname for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1652,8 +1388,8 @@ public Response listCustomHostnameAnalysisWit * @return custom domain analysis. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CustomHostnameAnalysisResultInner listCustomHostnameAnalysis( - String resourceGroupName, String containerAppName) { + public CustomHostnameAnalysisResultInner listCustomHostnameAnalysis(String resourceGroupName, + String containerAppName) { final String customHostname = null; return listCustomHostnameAnalysisWithResponse(resourceGroupName, containerAppName, customHostname, Context.NONE) .getValue(); @@ -1661,29 +1397,25 @@ public CustomHostnameAnalysisResultInner listCustomHostnameAnalysis( /** * List secrets for a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App Secrets Collection ARM resource along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync( - String resourceGroupName, String containerAppName) { + private Mono> listSecretsWithResponseAsync(String resourceGroupName, + String containerAppName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1695,23 +1427,14 @@ private Mono> listSecretsWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listSecrets( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - containerAppName, - accept, - context)) + .withContext(context -> service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), containerAppName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List secrets for a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -1719,22 +1442,18 @@ private Mono> listSecretsWithResponseAsync( * @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 Secrets Collection ARM resource along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync( - String resourceGroupName, String containerAppName, Context context) { + private Mono> listSecretsWithResponseAsync(String resourceGroupName, + String containerAppName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1746,20 +1465,13 @@ private Mono> listSecretsWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listSecrets( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - containerAppName, - accept, - context); + return service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), containerAppName, accept, context); } /** * List secrets for a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1775,7 +1487,7 @@ private Mono listSecretsAsync(String resourceGroupName, /** * List secrets for a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -1785,14 +1497,14 @@ private Mono listSecretsAsync(String resourceGroupName, * @return container App Secrets Collection ARM resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listSecretsWithResponse( - String resourceGroupName, String containerAppName, Context context) { + public Response listSecretsWithResponse(String resourceGroupName, String containerAppName, + Context context) { return listSecretsWithResponseAsync(resourceGroupName, containerAppName, context).block(); } /** * List secrets for a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1807,7 +1519,7 @@ public SecretsCollectionInner listSecrets(String resourceGroupName, String conta /** * Get auth token for a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1817,19 +1529,15 @@ public SecretsCollectionInner listSecrets(String resourceGroupName, String conta * @return auth token for a container app along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getAuthTokenWithResponseAsync( - String resourceGroupName, String containerAppName) { + private Mono> getAuthTokenWithResponseAsync(String resourceGroupName, + String containerAppName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1841,23 +1549,14 @@ private Mono> getAuthTokenWithResponseAsync } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getAuthToken( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - containerAppName, - accept, - context)) + .withContext(context -> service.getAuthToken(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), containerAppName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get auth token for a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -1868,19 +1567,15 @@ private Mono> getAuthTokenWithResponseAsync * @return auth token for a container app along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getAuthTokenWithResponseAsync( - String resourceGroupName, String containerAppName, Context context) { + private Mono> getAuthTokenWithResponseAsync(String resourceGroupName, + String containerAppName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1892,20 +1587,13 @@ private Mono> getAuthTokenWithResponseAsync } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getAuthToken( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - containerAppName, - accept, - context); + return service.getAuthToken(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), containerAppName, accept, context); } /** * Get auth token for a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1922,7 +1610,7 @@ private Mono getAuthTokenAsync(String resourceGroupN /** * Get auth token for a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -1933,14 +1621,14 @@ private Mono getAuthTokenAsync(String resourceGroupN * @return auth token for a container app along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAuthTokenWithResponse( - String resourceGroupName, String containerAppName, Context context) { + public Response getAuthTokenWithResponse(String resourceGroupName, + String containerAppName, Context context) { return getAuthTokenWithResponseAsync(resourceGroupName, containerAppName, context).block(); } /** * Get auth token for a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1956,7 +1644,7 @@ public ContainerAppAuthTokenInner getAuthToken(String resourceGroupName, String /** * Start a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1967,16 +1655,12 @@ public ContainerAppAuthTokenInner getAuthToken(String resourceGroupName, String @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> startWithResponseAsync(String resourceGroupName, String containerAppName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1988,23 +1672,14 @@ private Mono>> startWithResponseAsync(String resourceG } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .start( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - containerAppName, - accept, - context)) + .withContext(context -> service.start(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), containerAppName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Start a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -2014,19 +1689,15 @@ private Mono>> startWithResponseAsync(String resourceG * @return container App along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync( - String resourceGroupName, String containerAppName, Context context) { + private Mono>> startWithResponseAsync(String resourceGroupName, String containerAppName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2038,20 +1709,13 @@ private Mono>> startWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .start( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - containerAppName, - accept, - context); + return service.start(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), containerAppName, accept, context); } /** * Start a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2060,22 +1724,16 @@ private Mono>> startWithResponseAsync( * @return the {@link PollerFlux} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContainerAppInner> beginStartAsync( - String resourceGroupName, String containerAppName) { + private PollerFlux, ContainerAppInner> beginStartAsync(String resourceGroupName, + String containerAppName) { Mono>> mono = startWithResponseAsync(resourceGroupName, containerAppName); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ContainerAppInner.class, - ContainerAppInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ContainerAppInner.class, ContainerAppInner.class, this.client.getContext()); } /** * Start a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -2085,19 +1743,17 @@ private PollerFlux, ContainerAppInner> beginStartA * @return the {@link PollerFlux} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContainerAppInner> beginStartAsync( - String resourceGroupName, String containerAppName, Context context) { + private PollerFlux, ContainerAppInner> beginStartAsync(String resourceGroupName, + String containerAppName, Context context) { context = this.client.mergeContext(context); Mono>> mono = startWithResponseAsync(resourceGroupName, containerAppName, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ContainerAppInner.class, ContainerAppInner.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ContainerAppInner.class, ContainerAppInner.class, context); } /** * Start a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2106,14 +1762,14 @@ private PollerFlux, ContainerAppInner> beginStartA * @return the {@link SyncPoller} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContainerAppInner> beginStart( - String resourceGroupName, String containerAppName) { + public SyncPoller, ContainerAppInner> beginStart(String resourceGroupName, + String containerAppName) { return this.beginStartAsync(resourceGroupName, containerAppName).getSyncPoller(); } /** * Start a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -2123,14 +1779,14 @@ public SyncPoller, ContainerAppInner> beginStart( * @return the {@link SyncPoller} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContainerAppInner> beginStart( - String resourceGroupName, String containerAppName, Context context) { + public SyncPoller, ContainerAppInner> beginStart(String resourceGroupName, + String containerAppName, Context context) { return this.beginStartAsync(resourceGroupName, containerAppName, context).getSyncPoller(); } /** * Start a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2140,14 +1796,13 @@ public SyncPoller, ContainerAppInner> beginStart( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono startAsync(String resourceGroupName, String containerAppName) { - return beginStartAsync(resourceGroupName, containerAppName) - .last() + return beginStartAsync(resourceGroupName, containerAppName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Start a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -2158,14 +1813,13 @@ private Mono startAsync(String resourceGroupName, String cont */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono startAsync(String resourceGroupName, String containerAppName, Context context) { - return beginStartAsync(resourceGroupName, containerAppName, context) - .last() + return beginStartAsync(resourceGroupName, containerAppName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Start a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2180,7 +1834,7 @@ public ContainerAppInner start(String resourceGroupName, String containerAppName /** * Start a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -2196,7 +1850,7 @@ public ContainerAppInner start(String resourceGroupName, String containerAppName /** * Stop a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2207,16 +1861,12 @@ public ContainerAppInner start(String resourceGroupName, String containerAppName @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> stopWithResponseAsync(String resourceGroupName, String containerAppName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2228,23 +1878,14 @@ private Mono>> stopWithResponseAsync(String resourceGr } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .stop( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - containerAppName, - accept, - context)) + .withContext(context -> service.stop(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), containerAppName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Stop a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -2254,19 +1895,15 @@ private Mono>> stopWithResponseAsync(String resourceGr * @return container App along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopWithResponseAsync( - String resourceGroupName, String containerAppName, Context context) { + private Mono>> stopWithResponseAsync(String resourceGroupName, String containerAppName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2278,20 +1915,13 @@ private Mono>> stopWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .stop( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - containerAppName, - accept, - context); + return service.stop(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), containerAppName, accept, context); } /** * Stop a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2300,22 +1930,16 @@ private Mono>> stopWithResponseAsync( * @return the {@link PollerFlux} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContainerAppInner> beginStopAsync( - String resourceGroupName, String containerAppName) { + private PollerFlux, ContainerAppInner> beginStopAsync(String resourceGroupName, + String containerAppName) { Mono>> mono = stopWithResponseAsync(resourceGroupName, containerAppName); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ContainerAppInner.class, - ContainerAppInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ContainerAppInner.class, ContainerAppInner.class, this.client.getContext()); } /** * Stop a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -2325,19 +1949,17 @@ private PollerFlux, ContainerAppInner> beginStopAs * @return the {@link PollerFlux} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ContainerAppInner> beginStopAsync( - String resourceGroupName, String containerAppName, Context context) { + private PollerFlux, ContainerAppInner> beginStopAsync(String resourceGroupName, + String containerAppName, Context context) { context = this.client.mergeContext(context); Mono>> mono = stopWithResponseAsync(resourceGroupName, containerAppName, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), ContainerAppInner.class, ContainerAppInner.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + ContainerAppInner.class, ContainerAppInner.class, context); } /** * Stop a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2346,14 +1968,14 @@ private PollerFlux, ContainerAppInner> beginStopAs * @return the {@link SyncPoller} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContainerAppInner> beginStop( - String resourceGroupName, String containerAppName) { + public SyncPoller, ContainerAppInner> beginStop(String resourceGroupName, + String containerAppName) { return this.beginStopAsync(resourceGroupName, containerAppName).getSyncPoller(); } /** * Stop a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -2363,14 +1985,14 @@ public SyncPoller, ContainerAppInner> beginStop( * @return the {@link SyncPoller} for polling of container App. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ContainerAppInner> beginStop( - String resourceGroupName, String containerAppName, Context context) { + public SyncPoller, ContainerAppInner> beginStop(String resourceGroupName, + String containerAppName, Context context) { return this.beginStopAsync(resourceGroupName, containerAppName, context).getSyncPoller(); } /** * Stop a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2380,14 +2002,13 @@ public SyncPoller, ContainerAppInner> beginStop( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopAsync(String resourceGroupName, String containerAppName) { - return beginStopAsync(resourceGroupName, containerAppName) - .last() + return beginStopAsync(resourceGroupName, containerAppName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Stop a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -2398,14 +2019,13 @@ private Mono stopAsync(String resourceGroupName, String conta */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopAsync(String resourceGroupName, String containerAppName, Context context) { - return beginStopAsync(resourceGroupName, containerAppName, context) - .last() + return beginStopAsync(resourceGroupName, containerAppName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Stop a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2420,7 +2040,7 @@ public ContainerAppInner stop(String resourceGroupName, String containerAppName) /** * Stop a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -2436,14 +2056,15 @@ public ContainerAppInner stop(String resourceGroupName, String containerAppName, /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 collection ARM resource along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return container App collection ARM resource along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -2451,76 +2072,59 @@ private Mono> listBySubscriptionNextSinglePageA return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App collection ARM resource along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return container App collection ARM resource along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 collection ARM resource along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return container App collection ARM resource along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -2528,63 +2132,45 @@ private Mono> listByResourceGroupNextSinglePage return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App collection ARM resource along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return container App collection ARM resource along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsClientImpl.java index f56a404c5e7f..e2c922eaca47 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 @@ -34,23 +34,28 @@ import com.azure.resourcemanager.appcontainers.models.RevisionCollection; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ContainerAppsDiagnosticsClient. */ +/** + * An instance of this class provides access to all the operations defined in ContainerAppsDiagnosticsClient. + */ public final class ContainerAppsDiagnosticsClientImpl implements ContainerAppsDiagnosticsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ContainerAppsDiagnosticsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerAppsApiClientImpl client; /** * Initializes an instance of ContainerAppsDiagnosticsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ContainerAppsDiagnosticsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create(ContainerAppsDiagnosticsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ContainerAppsDiagnosticsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -61,128 +66,95 @@ public final class ContainerAppsDiagnosticsClientImpl implements ContainerAppsDi @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") public interface ContainerAppsDiagnosticsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectors") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectors") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listDetectors( - @HostParam("$host") String endpoint, + Mono> listDetectors(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("containerAppName") String containerAppName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectors/{detectorName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectors/{detectorName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getDetector( - @HostParam("$host") String endpoint, + Mono> getDetector(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("detectorName") String detectorName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("containerAppName") String containerAppName, @PathParam("detectorName") String detectorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectorProperties/revisionsApi/revisions/") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectorProperties/revisionsApi/revisions/") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listRevisions( - @HostParam("$host") String endpoint, + Mono> listRevisions(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("containerAppName") String containerAppName, @QueryParam("api-version") String apiVersion, + @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectorProperties/revisionsApi/revisions/{revisionName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectorProperties/revisionsApi/revisions/{revisionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getRevision( - @HostParam("$host") String endpoint, + Mono> getRevision(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("revisionName") String revisionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("containerAppName") String containerAppName, @PathParam("revisionName") String revisionName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectorProperties/rootApi/") - @ExpectedResponses({200}) - @UnexpectedResponseExceptionType( - value = ManagementException.class, - code = {404}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/detectorProperties/rootApi/") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(value = ManagementException.class, code = { 404 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getRoot( - @HostParam("$host") String endpoint, + Mono> getRoot(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("containerAppName") String containerAppName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listDetectorsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listRevisionsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Get the list of diagnostics for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which detector info is needed. * @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 list of diagnostics for a given Container App along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDetectorsSinglePageAsync( - String resourceGroupName, String containerAppName) { + private Mono> listDetectorsSinglePageAsync(String resourceGroupName, + String containerAppName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -194,32 +166,16 @@ private Mono> listDetectorsSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listDetectors( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listDetectors(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the list of diagnostics for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which detector info is needed. * @param context The context to associate with this operation. @@ -227,22 +183,18 @@ private Mono> listDetectorsSinglePageAsync( * @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 list of diagnostics for a given Container App along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDetectorsSinglePageAsync( - String resourceGroupName, String containerAppName, Context context) { + private Mono> listDetectorsSinglePageAsync(String resourceGroupName, + String containerAppName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -255,28 +207,15 @@ private Mono> listDetectorsSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listDetectors( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listDetectors(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the list of diagnostics for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which detector info is needed. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -286,14 +225,13 @@ private Mono> listDetectorsSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listDetectorsAsync(String resourceGroupName, String containerAppName) { - return new PagedFlux<>( - () -> listDetectorsSinglePageAsync(resourceGroupName, containerAppName), + return new PagedFlux<>(() -> listDetectorsSinglePageAsync(resourceGroupName, containerAppName), nextLink -> listDetectorsNextSinglePageAsync(nextLink)); } /** * Get the list of diagnostics for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which detector info is needed. * @param context The context to associate with this operation. @@ -303,16 +241,15 @@ private PagedFlux listDetectorsAsync(String resourceGroupName, * @return the list of diagnostics for a given Container App as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listDetectorsAsync( - String resourceGroupName, String containerAppName, Context context) { - return new PagedFlux<>( - () -> listDetectorsSinglePageAsync(resourceGroupName, containerAppName, context), + private PagedFlux listDetectorsAsync(String resourceGroupName, String containerAppName, + Context context) { + return new PagedFlux<>(() -> listDetectorsSinglePageAsync(resourceGroupName, containerAppName, context), nextLink -> listDetectorsNextSinglePageAsync(nextLink, context)); } /** * Get the list of diagnostics for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which detector info is needed. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -327,7 +264,7 @@ public PagedIterable listDetectors(String resourceGroupName, S /** * Get the list of diagnostics for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which detector info is needed. * @param context The context to associate with this operation. @@ -337,37 +274,33 @@ public PagedIterable listDetectors(String resourceGroupName, S * @return the list of diagnostics for a given Container App as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listDetectors( - String resourceGroupName, String containerAppName, Context context) { + public PagedIterable listDetectors(String resourceGroupName, String containerAppName, + Context context) { return new PagedIterable<>(listDetectorsAsync(resourceGroupName, containerAppName, context)); } /** * Get a diagnostics result of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param detectorName Name of the Container App Detector. * @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 diagnostics result of a Container App along with {@link Response} on successful completion of {@link - * Mono}. + * @return a diagnostics result of a Container App along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDetectorWithResponseAsync( - String resourceGroupName, String containerAppName, String detectorName) { + private Mono> getDetectorWithResponseAsync(String resourceGroupName, + String containerAppName, String detectorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -382,24 +315,14 @@ private Mono> getDetectorWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getDetector( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - detectorName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.getDetector(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, detectorName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a diagnostics result of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param detectorName Name of the Container App Detector. @@ -407,23 +330,19 @@ private Mono> getDetectorWithResponseAsync( * @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 diagnostics result of a Container App along with {@link Response} on successful completion of {@link - * Mono}. + * @return a diagnostics result of a Container App along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDetectorWithResponseAsync( - String resourceGroupName, String containerAppName, String detectorName, Context context) { + private Mono> getDetectorWithResponseAsync(String resourceGroupName, + String containerAppName, String detectorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -438,21 +357,13 @@ private Mono> getDetectorWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getDetector( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - detectorName, - this.client.getApiVersion(), - accept, - context); + return service.getDetector(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, detectorName, this.client.getApiVersion(), accept, context); } /** * Get a diagnostics result of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param detectorName Name of the Container App Detector. @@ -462,15 +373,15 @@ private Mono> getDetectorWithResponseAsync( * @return a diagnostics result of a Container App on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDetectorAsync( - String resourceGroupName, String containerAppName, String detectorName) { + private Mono getDetectorAsync(String resourceGroupName, String containerAppName, + String detectorName) { return getDetectorWithResponseAsync(resourceGroupName, containerAppName, detectorName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get a diagnostics result of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param detectorName Name of the Container App Detector. @@ -481,14 +392,14 @@ private Mono getDetectorAsync( * @return a diagnostics result of a Container App along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDetectorWithResponse( - String resourceGroupName, String containerAppName, String detectorName, Context context) { + public Response getDetectorWithResponse(String resourceGroupName, String containerAppName, + String detectorName, Context context) { return getDetectorWithResponseAsync(resourceGroupName, containerAppName, detectorName, context).block(); } /** * Get a diagnostics result of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param detectorName Name of the Container App Detector. @@ -504,7 +415,7 @@ public DiagnosticsInner getDetector(String resourceGroupName, String containerAp /** * Get the Revisions for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which Revisions are needed. * @param filter The filter to apply on the operation. @@ -512,22 +423,18 @@ public DiagnosticsInner getDetector(String resourceGroupName, String containerAp * @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 Revisions for a given Container App along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRevisionsSinglePageAsync( - String resourceGroupName, String containerAppName, String filter) { + private Mono> listRevisionsSinglePageAsync(String resourceGroupName, + String containerAppName, String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -539,33 +446,16 @@ private Mono> listRevisionsSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listRevisions( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - filter, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listRevisions(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, this.client.getApiVersion(), filter, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the Revisions for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which Revisions are needed. * @param filter The filter to apply on the operation. @@ -574,22 +464,18 @@ private Mono> listRevisionsSinglePageAsync( * @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 Revisions for a given Container App along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRevisionsSinglePageAsync( - String resourceGroupName, String containerAppName, String filter, Context context) { + private Mono> listRevisionsSinglePageAsync(String resourceGroupName, + String containerAppName, String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -602,29 +488,15 @@ private Mono> listRevisionsSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listRevisions( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - filter, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listRevisions(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, this.client.getApiVersion(), filter, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the Revisions for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which Revisions are needed. * @param filter The filter to apply on the operation. @@ -634,16 +506,15 @@ private Mono> listRevisionsSinglePageAsync( * @return the Revisions for a given Container App as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRevisionsAsync( - String resourceGroupName, String containerAppName, String filter) { - return new PagedFlux<>( - () -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter), + private PagedFlux listRevisionsAsync(String resourceGroupName, String containerAppName, + String filter) { + return new PagedFlux<>(() -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter), nextLink -> listRevisionsNextSinglePageAsync(nextLink)); } /** * Get the Revisions for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which Revisions are needed. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -654,14 +525,13 @@ private PagedFlux listRevisionsAsync( @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listRevisionsAsync(String resourceGroupName, String containerAppName) { final String filter = null; - return new PagedFlux<>( - () -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter), + return new PagedFlux<>(() -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter), nextLink -> listRevisionsNextSinglePageAsync(nextLink)); } /** * Get the Revisions for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which Revisions are needed. * @param filter The filter to apply on the operation. @@ -672,16 +542,15 @@ private PagedFlux listRevisionsAsync(String resourceGroupName, St * @return the Revisions for a given Container App as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRevisionsAsync( - String resourceGroupName, String containerAppName, String filter, Context context) { - return new PagedFlux<>( - () -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter, context), + private PagedFlux listRevisionsAsync(String resourceGroupName, String containerAppName, + String filter, Context context) { + return new PagedFlux<>(() -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter, context), nextLink -> listRevisionsNextSinglePageAsync(nextLink, context)); } /** * Get the Revisions for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which Revisions are needed. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -697,7 +566,7 @@ public PagedIterable listRevisions(String resourceGroupName, Stri /** * Get the Revisions for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which Revisions are needed. * @param filter The filter to apply on the operation. @@ -708,14 +577,14 @@ public PagedIterable listRevisions(String resourceGroupName, Stri * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRevisions( - String resourceGroupName, String containerAppName, String filter, Context context) { + public PagedIterable listRevisions(String resourceGroupName, String containerAppName, String filter, + Context context) { return new PagedIterable<>(listRevisionsAsync(resourceGroupName, containerAppName, filter, context)); } /** * Get a revision of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -725,19 +594,15 @@ public PagedIterable listRevisions( * @return a revision of a Container App along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRevisionWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName) { + private Mono> getRevisionWithResponseAsync(String resourceGroupName, + String containerAppName, String revisionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -752,24 +617,14 @@ private Mono> getRevisionWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getRevision( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.getRevision(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, revisionName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a revision of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -780,19 +635,15 @@ private Mono> getRevisionWithResponseAsync( * @return a revision of a Container App along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRevisionWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName, Context context) { + private Mono> getRevisionWithResponseAsync(String resourceGroupName, + String containerAppName, String revisionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -807,21 +658,13 @@ private Mono> getRevisionWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getRevision( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - this.client.getApiVersion(), - accept, - context); + return service.getRevision(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, revisionName, this.client.getApiVersion(), accept, context); } /** * Get a revision of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -831,15 +674,15 @@ private Mono> getRevisionWithResponseAsync( * @return a revision of a Container App on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getRevisionAsync( - String resourceGroupName, String containerAppName, String revisionName) { + private Mono getRevisionAsync(String resourceGroupName, String containerAppName, + String revisionName) { return getRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get a revision of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -850,14 +693,14 @@ private Mono getRevisionAsync( * @return a revision of a Container App along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { + public Response getRevisionWithResponse(String resourceGroupName, String containerAppName, + String revisionName, Context context) { return getRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); } /** * Get a revision of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -873,7 +716,7 @@ public RevisionInner getRevision(String resourceGroupName, String containerAppNa /** * Get the properties of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -883,19 +726,15 @@ public RevisionInner getRevision(String resourceGroupName, String containerAppNa * @return the properties of a Container App along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRootWithResponseAsync( - String resourceGroupName, String containerAppName) { + private Mono> getRootWithResponseAsync(String resourceGroupName, + String containerAppName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -907,23 +746,14 @@ private Mono> getRootWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getRoot( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.getRoot(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the properties of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -934,19 +764,15 @@ private Mono> getRootWithResponseAsync( * @return the properties of a Container App along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRootWithResponseAsync( - String resourceGroupName, String containerAppName, Context context) { + private Mono> getRootWithResponseAsync(String resourceGroupName, + String containerAppName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -958,20 +784,13 @@ private Mono> getRootWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getRoot( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - accept, - context); + return service.getRoot(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, this.client.getApiVersion(), accept, context); } /** * Get the properties of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -988,7 +807,7 @@ private Mono getRootAsync(String resourceGroupName, String co /** * Get the properties of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -999,14 +818,14 @@ private Mono getRootAsync(String resourceGroupName, String co * @return the properties of a Container App along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getRootWithResponse( - String resourceGroupName, String containerAppName, Context context) { + public Response getRootWithResponse(String resourceGroupName, String containerAppName, + Context context) { return getRootWithResponseAsync(resourceGroupName, containerAppName, context).block(); } /** * Get the properties of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1022,14 +841,15 @@ public ContainerAppInner getRoot(String resourceGroupName, String containerAppNa /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 diagnostics data collection for a resource along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDetectorsNextSinglePageAsync(String nextLink) { @@ -1037,37 +857,29 @@ private Mono> listDetectorsNextSinglePageAsync(S return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listDetectorsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return diagnostics data collection for a resource along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listDetectorsNextSinglePageAsync(String nextLink, Context context) { @@ -1075,36 +887,27 @@ private Mono> listDetectorsNextSinglePageAsync(S return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listDetectorsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listDetectorsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 Revisions collection ARM resource along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listRevisionsNextSinglePageAsync(String nextLink) { @@ -1112,37 +915,29 @@ private Mono> listRevisionsNextSinglePageAsync(Stri return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listRevisionsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App Revisions collection ARM resource along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listRevisionsNextSinglePageAsync(String nextLink, Context context) { @@ -1150,23 +945,13 @@ private Mono> listRevisionsNextSinglePageAsync(Stri return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listRevisionsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listRevisionsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsImpl.java index e640a600068b..32d1d19b0fe1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsImpl.java @@ -25,8 +25,7 @@ public final class ContainerAppsDiagnosticsImpl implements ContainerAppsDiagnost private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - public ContainerAppsDiagnosticsImpl( - ContainerAppsDiagnosticsClient innerClient, + public ContainerAppsDiagnosticsImpl(ContainerAppsDiagnosticsClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -34,25 +33,22 @@ public ContainerAppsDiagnosticsImpl( public PagedIterable listDetectors(String resourceGroupName, String containerAppName) { PagedIterable inner = this.serviceClient().listDetectors(resourceGroupName, containerAppName); - return Utils.mapPage(inner, inner1 -> new DiagnosticsImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DiagnosticsImpl(inner1, this.manager())); } - public PagedIterable listDetectors( - String resourceGroupName, String containerAppName, Context context) { - PagedIterable inner = - this.serviceClient().listDetectors(resourceGroupName, containerAppName, context); - return Utils.mapPage(inner, inner1 -> new DiagnosticsImpl(inner1, this.manager())); + public PagedIterable listDetectors(String resourceGroupName, String containerAppName, + Context context) { + PagedIterable inner + = this.serviceClient().listDetectors(resourceGroupName, containerAppName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DiagnosticsImpl(inner1, this.manager())); } - public Response getDetectorWithResponse( - String resourceGroupName, String containerAppName, String detectorName, Context context) { - Response inner = - this.serviceClient().getDetectorWithResponse(resourceGroupName, containerAppName, detectorName, context); + public Response getDetectorWithResponse(String resourceGroupName, String containerAppName, + String detectorName, Context context) { + Response inner + = this.serviceClient().getDetectorWithResponse(resourceGroupName, containerAppName, detectorName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DiagnosticsImpl(inner.getValue(), this.manager())); } else { return null; @@ -70,25 +66,22 @@ public Diagnostics getDetector(String resourceGroupName, String containerAppName public PagedIterable listRevisions(String resourceGroupName, String containerAppName) { PagedIterable inner = this.serviceClient().listRevisions(resourceGroupName, containerAppName); - return Utils.mapPage(inner, inner1 -> new RevisionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RevisionImpl(inner1, this.manager())); } - public PagedIterable listRevisions( - String resourceGroupName, String containerAppName, String filter, Context context) { - PagedIterable inner = - this.serviceClient().listRevisions(resourceGroupName, containerAppName, filter, context); - return Utils.mapPage(inner, inner1 -> new RevisionImpl(inner1, this.manager())); + public PagedIterable listRevisions(String resourceGroupName, String containerAppName, String filter, + Context context) { + PagedIterable inner + = this.serviceClient().listRevisions(resourceGroupName, containerAppName, filter, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RevisionImpl(inner1, this.manager())); } - public Response getRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { - Response inner = - this.serviceClient().getRevisionWithResponse(resourceGroupName, containerAppName, revisionName, context); + public Response getRevisionWithResponse(String resourceGroupName, String containerAppName, + String revisionName, Context context) { + Response inner + = this.serviceClient().getRevisionWithResponse(resourceGroupName, containerAppName, revisionName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new RevisionImpl(inner.getValue(), this.manager())); } else { return null; @@ -104,15 +97,12 @@ public Revision getRevision(String resourceGroupName, String containerAppName, S } } - public Response getRootWithResponse( - String resourceGroupName, String containerAppName, Context context) { - Response inner = - this.serviceClient().getRootWithResponse(resourceGroupName, containerAppName, context); + public Response getRootWithResponse(String resourceGroupName, String containerAppName, + Context context) { + Response inner + = this.serviceClient().getRootWithResponse(resourceGroupName, containerAppName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ContainerAppImpl(inner.getValue(), this.manager())); } else { return null; 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 19f3b1c80203..ca52900339af 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 @@ -27,8 +27,7 @@ public final class ContainerAppsImpl implements ContainerApps { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - public ContainerAppsImpl( - ContainerAppsClient innerClient, + public ContainerAppsImpl(ContainerAppsClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -36,33 +35,30 @@ public ContainerAppsImpl( public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ContainerAppImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ContainerAppImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new ContainerAppImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ContainerAppImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new ContainerAppImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ContainerAppImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new ContainerAppImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ContainerAppImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String containerAppName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, containerAppName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, String containerAppName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, containerAppName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ContainerAppImpl(inner.getValue(), this.manager())); } else { return null; @@ -86,17 +82,12 @@ public void delete(String resourceGroupName, String containerAppName, Context co this.serviceClient().delete(resourceGroupName, containerAppName, context); } - public Response listCustomHostnameAnalysisWithResponse( - String resourceGroupName, String containerAppName, String customHostname, Context context) { - Response inner = - this - .serviceClient() - .listCustomHostnameAnalysisWithResponse(resourceGroupName, containerAppName, customHostname, context); + public Response listCustomHostnameAnalysisWithResponse(String resourceGroupName, + String containerAppName, String customHostname, Context context) { + Response inner = this.serviceClient() + .listCustomHostnameAnalysisWithResponse(resourceGroupName, containerAppName, customHostname, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CustomHostnameAnalysisResultImpl(inner.getValue(), this.manager())); } else { return null; @@ -104,8 +95,8 @@ public Response listCustomHostnameAnalysisWithResp } public CustomHostnameAnalysisResult listCustomHostnameAnalysis(String resourceGroupName, String containerAppName) { - CustomHostnameAnalysisResultInner inner = - this.serviceClient().listCustomHostnameAnalysis(resourceGroupName, containerAppName); + CustomHostnameAnalysisResultInner inner + = this.serviceClient().listCustomHostnameAnalysis(resourceGroupName, containerAppName); if (inner != null) { return new CustomHostnameAnalysisResultImpl(inner, this.manager()); } else { @@ -113,15 +104,12 @@ public CustomHostnameAnalysisResult listCustomHostnameAnalysis(String resourceGr } } - public Response listSecretsWithResponse( - String resourceGroupName, String containerAppName, Context context) { - Response inner = - this.serviceClient().listSecretsWithResponse(resourceGroupName, containerAppName, context); + public Response listSecretsWithResponse(String resourceGroupName, String containerAppName, + Context context) { + Response inner + = this.serviceClient().listSecretsWithResponse(resourceGroupName, containerAppName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SecretsCollectionImpl(inner.getValue(), this.manager())); } else { return null; @@ -137,15 +125,12 @@ public SecretsCollection listSecrets(String resourceGroupName, String containerA } } - public Response getAuthTokenWithResponse( - String resourceGroupName, String containerAppName, Context context) { - Response inner = - this.serviceClient().getAuthTokenWithResponse(resourceGroupName, containerAppName, context); + public Response getAuthTokenWithResponse(String resourceGroupName, String containerAppName, + Context context) { + Response inner + = this.serviceClient().getAuthTokenWithResponse(resourceGroupName, containerAppName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ContainerAppAuthTokenImpl(inner.getValue(), this.manager())); } else { return null; @@ -198,77 +183,57 @@ public ContainerApp stop(String resourceGroupName, String containerAppName, Cont } public ContainerApp getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String containerAppName = Utils.getValueFromIdByName(id, "containerApps"); + String containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); if (containerAppName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, containerAppName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String containerAppName = Utils.getValueFromIdByName(id, "containerApps"); + String containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); if (containerAppName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, containerAppName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String containerAppName = Utils.getValueFromIdByName(id, "containerApps"); + String containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); if (containerAppName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); } this.delete(resourceGroupName, containerAppName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String containerAppName = Utils.getValueFromIdByName(id, "containerApps"); + String containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); if (containerAppName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); } this.delete(resourceGroupName, containerAppName, context); } 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 021d8be1c3e4..1e8b67b9cbfa 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 @@ -26,71 +26,63 @@ import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ContainerAppsRevisionReplicasClient. */ +/** + * An instance of this class provides access to all the operations defined in ContainerAppsRevisionReplicasClient. + */ public final class ContainerAppsRevisionReplicasClientImpl implements ContainerAppsRevisionReplicasClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ContainerAppsRevisionReplicasService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerAppsApiClientImpl client; /** * Initializes an instance of ContainerAppsRevisionReplicasClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ContainerAppsRevisionReplicasClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create( - ContainerAppsRevisionReplicasService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ContainerAppsRevisionReplicasService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ContainerAppsApiClientContainerAppsRevisionReplicas to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for ContainerAppsApiClientContainerAppsRevisionReplicas to be used by + * the proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") public interface ContainerAppsRevisionReplicasService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas/{replicaName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas/{replicaName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getReplica( - @HostParam("$host") String endpoint, + Mono> getReplica(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("revisionName") String revisionName, - @PathParam("replicaName") String replicaName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("containerAppName") String containerAppName, @PathParam("revisionName") String revisionName, + @PathParam("replicaName") String replicaName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/replicas") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listReplicas( - @HostParam("$host") String endpoint, + Mono> listReplicas(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("revisionName") String revisionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("containerAppName") String containerAppName, @PathParam("revisionName") String revisionName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); } /** * Get a replica for a Container App Revision. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -98,23 +90,19 @@ Mono> listReplicas( * @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 replica for a Container App Revision along with {@link Response} on successful completion of {@link - * Mono}. + * @return a replica for a Container App Revision along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getReplicaWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName, String replicaName) { + private Mono> getReplicaWithResponseAsync(String resourceGroupName, String containerAppName, + String revisionName, String replicaName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -132,25 +120,15 @@ private Mono> getReplicaWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getReplica( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - replicaName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.getReplica(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, revisionName, replicaName, this.client.getApiVersion(), accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a replica for a Container App Revision. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -159,23 +137,19 @@ private Mono> getReplicaWithResponseAsync( * @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 replica for a Container App Revision along with {@link Response} on successful completion of {@link - * Mono}. + * @return a replica for a Container App Revision along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getReplicaWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName, String replicaName, Context context) { + private Mono> getReplicaWithResponseAsync(String resourceGroupName, String containerAppName, + String revisionName, String replicaName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -193,22 +167,13 @@ private Mono> getReplicaWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getReplica( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - replicaName, - this.client.getApiVersion(), - accept, - context); + return service.getReplica(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, revisionName, replicaName, this.client.getApiVersion(), accept, context); } /** * Get a replica for a Container App Revision. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -219,15 +184,15 @@ private Mono> getReplicaWithResponseAsync( * @return a replica for a Container App Revision on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getReplicaAsync( - String resourceGroupName, String containerAppName, String revisionName, String replicaName) { + private Mono getReplicaAsync(String resourceGroupName, String containerAppName, String revisionName, + String replicaName) { return getReplicaWithResponseAsync(resourceGroupName, containerAppName, revisionName, replicaName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get a replica for a Container App Revision. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -239,15 +204,15 @@ private Mono getReplicaAsync( * @return a replica for a Container App Revision along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getReplicaWithResponse( - String resourceGroupName, String containerAppName, String revisionName, String replicaName, Context context) { + public Response getReplicaWithResponse(String resourceGroupName, String containerAppName, + String revisionName, String replicaName, Context context) { return getReplicaWithResponseAsync(resourceGroupName, containerAppName, revisionName, replicaName, context) .block(); } /** * Get a replica for a Container App Revision. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -258,15 +223,15 @@ public Response getReplicaWithResponse( * @return a replica for a Container App Revision. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicaInner getReplica( - String resourceGroupName, String containerAppName, String revisionName, String replicaName) { + public ReplicaInner getReplica(String resourceGroupName, String containerAppName, String revisionName, + String replicaName) { return getReplicaWithResponse(resourceGroupName, containerAppName, revisionName, replicaName, Context.NONE) .getValue(); } /** * List replicas for a Container App Revision. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -274,22 +239,18 @@ public ReplicaInner getReplica( * @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 Revision Replicas collection ARM resource along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listReplicasWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName) { + private Mono> listReplicasWithResponseAsync(String resourceGroupName, + String containerAppName, String revisionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -304,24 +265,14 @@ private Mono> listReplicasWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listReplicas( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listReplicas(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, revisionName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List replicas for a Container App Revision. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -330,22 +281,18 @@ private Mono> listReplicasWithResponseAsync( * @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 Revision Replicas collection ARM resource along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listReplicasWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName, Context context) { + private Mono> listReplicasWithResponseAsync(String resourceGroupName, + String containerAppName, String revisionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -360,21 +307,13 @@ private Mono> listReplicasWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listReplicas( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - this.client.getApiVersion(), - accept, - context); + return service.listReplicas(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, revisionName, this.client.getApiVersion(), accept, context); } /** * List replicas for a Container App Revision. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -384,15 +323,15 @@ private Mono> listReplicasWithResponseAsync( * @return container App Revision Replicas collection ARM resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listReplicasAsync( - String resourceGroupName, String containerAppName, String revisionName) { + private Mono listReplicasAsync(String resourceGroupName, String containerAppName, + String revisionName) { return listReplicasWithResponseAsync(resourceGroupName, containerAppName, revisionName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * List replicas for a Container App Revision. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -403,14 +342,14 @@ private Mono listReplicasAsync( * @return container App Revision Replicas collection ARM resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listReplicasWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { + public Response listReplicasWithResponse(String resourceGroupName, String containerAppName, + String revisionName, Context context) { return listReplicasWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); } /** * List replicas for a Container App Revision. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasImpl.java index 37db2d255db5..d4af3bac90f6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasImpl.java @@ -22,34 +22,28 @@ public final class ContainerAppsRevisionReplicasImpl implements ContainerAppsRev private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - public ContainerAppsRevisionReplicasImpl( - ContainerAppsRevisionReplicasClient innerClient, + public ContainerAppsRevisionReplicasImpl(ContainerAppsRevisionReplicasClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getReplicaWithResponse( - String resourceGroupName, String containerAppName, String revisionName, String replicaName, Context context) { - Response inner = - this - .serviceClient() - .getReplicaWithResponse(resourceGroupName, containerAppName, revisionName, replicaName, context); + public Response getReplicaWithResponse(String resourceGroupName, String containerAppName, + String revisionName, String replicaName, Context context) { + Response inner = this.serviceClient().getReplicaWithResponse(resourceGroupName, containerAppName, + revisionName, replicaName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ReplicaImpl(inner.getValue(), this.manager())); } else { return null; } } - public Replica getReplica( - String resourceGroupName, String containerAppName, String revisionName, String replicaName) { - ReplicaInner inner = - this.serviceClient().getReplica(resourceGroupName, containerAppName, revisionName, replicaName); + public Replica getReplica(String resourceGroupName, String containerAppName, String revisionName, + String replicaName) { + ReplicaInner inner + = this.serviceClient().getReplica(resourceGroupName, containerAppName, revisionName, replicaName); if (inner != null) { return new ReplicaImpl(inner, this.manager()); } else { @@ -57,15 +51,12 @@ public Replica getReplica( } } - public Response listReplicasWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { - Response inner = - this.serviceClient().listReplicasWithResponse(resourceGroupName, containerAppName, revisionName, context); + public Response listReplicasWithResponse(String resourceGroupName, String containerAppName, + String revisionName, Context context) { + Response inner + = this.serviceClient().listReplicasWithResponse(resourceGroupName, containerAppName, revisionName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ReplicaCollectionImpl(inner.getValue(), this.manager())); } else { return null; @@ -73,8 +64,8 @@ public Response listReplicasWithResponse( } public ReplicaCollection listReplicas(String resourceGroupName, String containerAppName, String revisionName) { - ReplicaCollectionInner inner = - this.serviceClient().listReplicas(resourceGroupName, containerAppName, revisionName); + ReplicaCollectionInner inner + = this.serviceClient().listReplicas(resourceGroupName, containerAppName, revisionName); if (inner != null) { return new ReplicaCollectionImpl(inner, this.manager()); } else { 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 b7b32bc2b31a..9603ed5f754c 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 @@ -31,23 +31,28 @@ import com.azure.resourcemanager.appcontainers.models.RevisionCollection; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ContainerAppsRevisionsClient. */ +/** + * An instance of this class provides access to all the operations defined in ContainerAppsRevisionsClient. + */ public final class ContainerAppsRevisionsClientImpl implements ContainerAppsRevisionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ContainerAppsRevisionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerAppsApiClientImpl client; /** * Initializes an instance of ContainerAppsRevisionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ContainerAppsRevisionsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create(ContainerAppsRevisionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ContainerAppsRevisionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -58,95 +63,68 @@ public final class ContainerAppsRevisionsClientImpl implements ContainerAppsRevi @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") public interface ContainerAppsRevisionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listRevisions( - @HostParam("$host") String endpoint, + Mono> listRevisions(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("containerAppName") String containerAppName, @QueryParam("api-version") String apiVersion, + @QueryParam("$filter") String filter, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getRevision( - @HostParam("$host") String endpoint, + Mono> getRevision(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("revisionName") String revisionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("containerAppName") String containerAppName, @PathParam("revisionName") String revisionName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/activate") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/activate") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> activateRevision( - @HostParam("$host") String endpoint, + Mono> activateRevision(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("revisionName") String revisionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("containerAppName") String containerAppName, @PathParam("revisionName") String revisionName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/deactivate") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/deactivate") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> deactivateRevision( - @HostParam("$host") String endpoint, + Mono> deactivateRevision(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("revisionName") String revisionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("containerAppName") String containerAppName, @PathParam("revisionName") String revisionName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/restart") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/restart") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> restartRevision( - @HostParam("$host") String endpoint, + Mono> restartRevision(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @PathParam("revisionName") String revisionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("containerAppName") String containerAppName, @PathParam("revisionName") String revisionName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listRevisionsNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Get the Revisions for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which Revisions are needed. * @param filter The filter to apply on the operation. @@ -154,22 +132,18 @@ Mono> listRevisionsNext( * @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 Revisions for a given Container App along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRevisionsSinglePageAsync( - String resourceGroupName, String containerAppName, String filter) { + private Mono> listRevisionsSinglePageAsync(String resourceGroupName, + String containerAppName, String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -181,33 +155,16 @@ private Mono> listRevisionsSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listRevisions( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - filter, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listRevisions(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, this.client.getApiVersion(), filter, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the Revisions for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which Revisions are needed. * @param filter The filter to apply on the operation. @@ -216,22 +173,18 @@ private Mono> listRevisionsSinglePageAsync( * @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 Revisions for a given Container App along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listRevisionsSinglePageAsync( - String resourceGroupName, String containerAppName, String filter, Context context) { + private Mono> listRevisionsSinglePageAsync(String resourceGroupName, + String containerAppName, String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -244,29 +197,15 @@ private Mono> listRevisionsSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listRevisions( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - filter, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listRevisions(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, this.client.getApiVersion(), filter, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the Revisions for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which Revisions are needed. * @param filter The filter to apply on the operation. @@ -276,16 +215,15 @@ private Mono> listRevisionsSinglePageAsync( * @return the Revisions for a given Container App as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRevisionsAsync( - String resourceGroupName, String containerAppName, String filter) { - return new PagedFlux<>( - () -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter), + private PagedFlux listRevisionsAsync(String resourceGroupName, String containerAppName, + String filter) { + return new PagedFlux<>(() -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter), nextLink -> listRevisionsNextSinglePageAsync(nextLink)); } /** * Get the Revisions for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which Revisions are needed. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -296,14 +234,13 @@ private PagedFlux listRevisionsAsync( @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listRevisionsAsync(String resourceGroupName, String containerAppName) { final String filter = null; - return new PagedFlux<>( - () -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter), + return new PagedFlux<>(() -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter), nextLink -> listRevisionsNextSinglePageAsync(nextLink)); } /** * Get the Revisions for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which Revisions are needed. * @param filter The filter to apply on the operation. @@ -314,16 +251,15 @@ private PagedFlux listRevisionsAsync(String resourceGroupName, St * @return the Revisions for a given Container App as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listRevisionsAsync( - String resourceGroupName, String containerAppName, String filter, Context context) { - return new PagedFlux<>( - () -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter, context), + private PagedFlux listRevisionsAsync(String resourceGroupName, String containerAppName, + String filter, Context context) { + return new PagedFlux<>(() -> listRevisionsSinglePageAsync(resourceGroupName, containerAppName, filter, context), nextLink -> listRevisionsNextSinglePageAsync(nextLink, context)); } /** * Get the Revisions for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which Revisions are needed. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -339,7 +275,7 @@ public PagedIterable listRevisions(String resourceGroupName, Stri /** * Get the Revisions for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which Revisions are needed. * @param filter The filter to apply on the operation. @@ -350,14 +286,14 @@ public PagedIterable listRevisions(String resourceGroupName, Stri * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listRevisions( - String resourceGroupName, String containerAppName, String filter, Context context) { + public PagedIterable listRevisions(String resourceGroupName, String containerAppName, String filter, + Context context) { return new PagedIterable<>(listRevisionsAsync(resourceGroupName, containerAppName, filter, context)); } /** * Get a revision of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -367,19 +303,15 @@ public PagedIterable listRevisions( * @return a revision of a Container App along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRevisionWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName) { + private Mono> getRevisionWithResponseAsync(String resourceGroupName, + String containerAppName, String revisionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -394,24 +326,14 @@ private Mono> getRevisionWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getRevision( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.getRevision(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, revisionName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a revision of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -422,19 +344,15 @@ private Mono> getRevisionWithResponseAsync( * @return a revision of a Container App along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRevisionWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName, Context context) { + private Mono> getRevisionWithResponseAsync(String resourceGroupName, + String containerAppName, String revisionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -449,21 +367,13 @@ private Mono> getRevisionWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getRevision( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - this.client.getApiVersion(), - accept, - context); + return service.getRevision(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, revisionName, this.client.getApiVersion(), accept, context); } /** * Get a revision of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -473,15 +383,15 @@ private Mono> getRevisionWithResponseAsync( * @return a revision of a Container App on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getRevisionAsync( - String resourceGroupName, String containerAppName, String revisionName) { + private Mono getRevisionAsync(String resourceGroupName, String containerAppName, + String revisionName) { return getRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get a revision of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -492,14 +402,14 @@ private Mono getRevisionAsync( * @return a revision of a Container App along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { + public Response getRevisionWithResponse(String resourceGroupName, String containerAppName, + String revisionName, Context context) { return getRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); } /** * Get a revision of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -515,7 +425,7 @@ public RevisionInner getRevision(String resourceGroupName, String containerAppNa /** * Activates a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -525,19 +435,15 @@ public RevisionInner getRevision(String resourceGroupName, String containerAppNa * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> activateRevisionWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName) { + private Mono> activateRevisionWithResponseAsync(String resourceGroupName, String containerAppName, + String revisionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -552,24 +458,14 @@ private Mono> activateRevisionWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .activateRevision( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.activateRevision(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, revisionName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Activates a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -580,19 +476,15 @@ private Mono> activateRevisionWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> activateRevisionWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName, Context context) { + private Mono> activateRevisionWithResponseAsync(String resourceGroupName, String containerAppName, + String revisionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -607,21 +499,13 @@ private Mono> activateRevisionWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .activateRevision( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - this.client.getApiVersion(), - accept, - context); + return service.activateRevision(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, revisionName, this.client.getApiVersion(), accept, context); } /** * Activates a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -638,7 +522,7 @@ private Mono activateRevisionAsync(String resourceGroupName, String contai /** * Activates a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -649,14 +533,14 @@ private Mono activateRevisionAsync(String resourceGroupName, String contai * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response activateRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { + public Response activateRevisionWithResponse(String resourceGroupName, String containerAppName, + String revisionName, Context context) { return activateRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); } /** * Activates a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -671,7 +555,7 @@ public void activateRevision(String resourceGroupName, String containerAppName, /** * Deactivates a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -681,19 +565,15 @@ public void activateRevision(String resourceGroupName, String containerAppName, * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deactivateRevisionWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName) { + private Mono> deactivateRevisionWithResponseAsync(String resourceGroupName, String containerAppName, + String revisionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -709,23 +589,14 @@ private Mono> deactivateRevisionWithResponseAsync( final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .deactivateRevision( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - this.client.getApiVersion(), - accept, - context)) + context -> service.deactivateRevision(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, revisionName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deactivates a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -736,19 +607,15 @@ private Mono> deactivateRevisionWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deactivateRevisionWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName, Context context) { + private Mono> deactivateRevisionWithResponseAsync(String resourceGroupName, String containerAppName, + String revisionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -763,21 +630,13 @@ private Mono> deactivateRevisionWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .deactivateRevision( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - this.client.getApiVersion(), - accept, - context); + return service.deactivateRevision(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, revisionName, this.client.getApiVersion(), accept, context); } /** * Deactivates a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -794,7 +653,7 @@ private Mono deactivateRevisionAsync(String resourceGroupName, String cont /** * Deactivates a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -805,14 +664,14 @@ private Mono deactivateRevisionAsync(String resourceGroupName, String cont * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deactivateRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { + public Response deactivateRevisionWithResponse(String resourceGroupName, String containerAppName, + String revisionName, Context context) { return deactivateRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); } /** * Deactivates a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -827,7 +686,7 @@ public void deactivateRevision(String resourceGroupName, String containerAppName /** * Restarts a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -837,19 +696,15 @@ public void deactivateRevision(String resourceGroupName, String containerAppName * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> restartRevisionWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName) { + private Mono> restartRevisionWithResponseAsync(String resourceGroupName, String containerAppName, + String revisionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -864,24 +719,14 @@ private Mono> restartRevisionWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .restartRevision( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.restartRevision(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, revisionName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Restarts a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -892,19 +737,15 @@ private Mono> restartRevisionWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> restartRevisionWithResponseAsync( - String resourceGroupName, String containerAppName, String revisionName, Context context) { + private Mono> restartRevisionWithResponseAsync(String resourceGroupName, String containerAppName, + String revisionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -919,21 +760,13 @@ private Mono> restartRevisionWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .restartRevision( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - revisionName, - this.client.getApiVersion(), - accept, - context); + return service.restartRevision(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, revisionName, this.client.getApiVersion(), accept, context); } /** * Restarts a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -950,7 +783,7 @@ private Mono restartRevisionAsync(String resourceGroupName, String contain /** * Restarts a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -961,14 +794,14 @@ private Mono restartRevisionAsync(String resourceGroupName, String contain * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response restartRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { + public Response restartRevisionWithResponse(String resourceGroupName, String containerAppName, + String revisionName, Context context) { return restartRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); } /** * Restarts a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -983,14 +816,15 @@ public void restartRevision(String resourceGroupName, String containerAppName, S /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 Revisions collection ARM resource along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listRevisionsNextSinglePageAsync(String nextLink) { @@ -998,37 +832,29 @@ private Mono> listRevisionsNextSinglePageAsync(Stri return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext(context -> service.listRevisionsNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App Revisions collection ARM resource along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listRevisionsNextSinglePageAsync(String nextLink, Context context) { @@ -1036,23 +862,13 @@ private Mono> listRevisionsNextSinglePageAsync(Stri return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listRevisionsNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listRevisionsNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsImpl.java index 8c4c17319b32..2f77c0175db5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsImpl.java @@ -21,8 +21,7 @@ public final class ContainerAppsRevisionsImpl implements ContainerAppsRevisions private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - public ContainerAppsRevisionsImpl( - ContainerAppsRevisionsClient innerClient, + public ContainerAppsRevisionsImpl(ContainerAppsRevisionsClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -30,25 +29,22 @@ public ContainerAppsRevisionsImpl( public PagedIterable listRevisions(String resourceGroupName, String containerAppName) { PagedIterable inner = this.serviceClient().listRevisions(resourceGroupName, containerAppName); - return Utils.mapPage(inner, inner1 -> new RevisionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RevisionImpl(inner1, this.manager())); } - public PagedIterable listRevisions( - String resourceGroupName, String containerAppName, String filter, Context context) { - PagedIterable inner = - this.serviceClient().listRevisions(resourceGroupName, containerAppName, filter, context); - return Utils.mapPage(inner, inner1 -> new RevisionImpl(inner1, this.manager())); + public PagedIterable listRevisions(String resourceGroupName, String containerAppName, String filter, + Context context) { + PagedIterable inner + = this.serviceClient().listRevisions(resourceGroupName, containerAppName, filter, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new RevisionImpl(inner1, this.manager())); } - public Response getRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { - Response inner = - this.serviceClient().getRevisionWithResponse(resourceGroupName, containerAppName, revisionName, context); + public Response getRevisionWithResponse(String resourceGroupName, String containerAppName, + String revisionName, Context context) { + Response inner + = this.serviceClient().getRevisionWithResponse(resourceGroupName, containerAppName, revisionName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new RevisionImpl(inner.getValue(), this.manager())); } else { return null; @@ -64,33 +60,30 @@ public Revision getRevision(String resourceGroupName, String containerAppName, S } } - public Response activateRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { - return this - .serviceClient() - .activateRevisionWithResponse(resourceGroupName, containerAppName, revisionName, context); + public Response activateRevisionWithResponse(String resourceGroupName, String containerAppName, + String revisionName, Context context) { + return this.serviceClient().activateRevisionWithResponse(resourceGroupName, containerAppName, revisionName, + context); } public void activateRevision(String resourceGroupName, String containerAppName, String revisionName) { this.serviceClient().activateRevision(resourceGroupName, containerAppName, revisionName); } - public Response deactivateRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { - return this - .serviceClient() - .deactivateRevisionWithResponse(resourceGroupName, containerAppName, revisionName, context); + public Response deactivateRevisionWithResponse(String resourceGroupName, String containerAppName, + String revisionName, Context context) { + return this.serviceClient().deactivateRevisionWithResponse(resourceGroupName, containerAppName, revisionName, + context); } public void deactivateRevision(String resourceGroupName, String containerAppName, String revisionName) { this.serviceClient().deactivateRevision(resourceGroupName, containerAppName, revisionName); } - public Response restartRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { - return this - .serviceClient() - .restartRevisionWithResponse(resourceGroupName, containerAppName, revisionName, context); + public Response restartRevisionWithResponse(String resourceGroupName, String containerAppName, + String revisionName, Context context) { + return this.serviceClient().restartRevisionWithResponse(resourceGroupName, containerAppName, revisionName, + context); } public void restartRevision(String resourceGroupName, String containerAppName, String revisionName) { 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 68605a00c556..f2afb95f6217 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 @@ -38,24 +38,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ContainerAppsSourceControlsClient. */ +/** + * An instance of this class provides access to all the operations defined in ContainerAppsSourceControlsClient. + */ public final class ContainerAppsSourceControlsClientImpl implements ContainerAppsSourceControlsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ContainerAppsSourceControlsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerAppsApiClientImpl client; /** * Initializes an instance of ContainerAppsSourceControlsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ContainerAppsSourceControlsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create( - ContainerAppsSourceControlsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ContainerAppsSourceControlsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -66,102 +70,80 @@ public final class ContainerAppsSourceControlsClientImpl implements ContainerApp @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") public interface ContainerAppsSourceControlsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listByContainerApp( - @HostParam("$host") String endpoint, + Mono> listByContainerApp(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("containerAppName") String containerAppName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("containerAppName") String containerAppName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{sourceControlName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{sourceControlName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("containerAppName") String containerAppName, - @PathParam("sourceControlName") String sourceControlName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("sourceControlName") String sourceControlName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{sourceControlName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{sourceControlName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("containerAppName") String containerAppName, - @PathParam("sourceControlName") String sourceControlName, - @QueryParam("api-version") String apiVersion, + @PathParam("sourceControlName") String sourceControlName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") SourceControlInner sourceControlEnvelope, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{sourceControlName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/sourcecontrols/{sourceControlName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("containerAppName") String containerAppName, - @PathParam("sourceControlName") String sourceControlName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("sourceControlName") String sourceControlName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listByContainerAppNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Get the Container App SourceControls in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Container App SourceControls in a given resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByContainerAppSinglePageAsync( - String resourceGroupName, String containerAppName) { + private Mono> listByContainerAppSinglePageAsync(String resourceGroupName, + String containerAppName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -174,31 +156,16 @@ private Mono> listByContainerAppSinglePageAsyn final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listByContainerApp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.listByContainerApp(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the Container App SourceControls in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -206,22 +173,18 @@ private Mono> listByContainerAppSinglePageAsyn * @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 Container App SourceControls in a given resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByContainerAppSinglePageAsync( - String resourceGroupName, String containerAppName, Context context) { + private Mono> listByContainerAppSinglePageAsync(String resourceGroupName, + String containerAppName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -234,28 +197,15 @@ private Mono> listByContainerAppSinglePageAsyn final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByContainerApp( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByContainerApp(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the Container App SourceControls in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -265,14 +215,13 @@ private Mono> listByContainerAppSinglePageAsyn */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByContainerAppAsync(String resourceGroupName, String containerAppName) { - return new PagedFlux<>( - () -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName), + return new PagedFlux<>(() -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName), nextLink -> listByContainerAppNextSinglePageAsync(nextLink)); } /** * Get the Container App SourceControls in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. @@ -282,23 +231,22 @@ private PagedFlux listByContainerAppAsync(String resourceGro * @return the Container App SourceControls in a given resource group as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listByContainerAppAsync( - String resourceGroupName, String containerAppName, Context context) { - return new PagedFlux<>( - () -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName, context), + private PagedFlux listByContainerAppAsync(String resourceGroupName, String containerAppName, + Context context) { + return new PagedFlux<>(() -> listByContainerAppSinglePageAsync(resourceGroupName, containerAppName, context), nextLink -> listByContainerAppNextSinglePageAsync(nextLink, context)); } /** * Get the Container App SourceControls in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App SourceControls in a given resource group as paginated response with {@link - * PagedIterable}. + * @return the Container App SourceControls in a given resource group as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable listByContainerApp(String resourceGroupName, String containerAppName) { @@ -307,25 +255,25 @@ public PagedIterable listByContainerApp(String resourceGroup /** * Get the Container App SourceControls in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App SourceControls in a given resource group as paginated response with {@link - * PagedIterable}. + * @return the Container App SourceControls in a given resource group as paginated response with + * {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listByContainerApp( - String resourceGroupName, String containerAppName, Context context) { + public PagedIterable listByContainerApp(String resourceGroupName, String containerAppName, + Context context) { return new PagedIterable<>(listByContainerAppAsync(resourceGroupName, containerAppName, context)); } /** * Get a SourceControl of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -335,19 +283,15 @@ public PagedIterable listByContainerApp( * @return a SourceControl of a Container App along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String containerAppName, String sourceControlName) { + private Mono> getWithResponseAsync(String resourceGroupName, String containerAppName, + String sourceControlName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -363,24 +307,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - sourceControlName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, sourceControlName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a SourceControl of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -391,19 +325,15 @@ private Mono> getWithResponseAsync( * @return a SourceControl of a Container App along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String containerAppName, String sourceControlName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String containerAppName, + String sourceControlName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -419,21 +349,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - sourceControlName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, sourceControlName, this.client.getApiVersion(), accept, context); } /** * Get a SourceControl of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -443,15 +365,15 @@ private Mono> getWithResponseAsync( * @return a SourceControl of a Container App on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String containerAppName, String sourceControlName) { + private Mono getAsync(String resourceGroupName, String containerAppName, + String sourceControlName) { return getWithResponseAsync(resourceGroupName, containerAppName, sourceControlName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get a SourceControl of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -462,14 +384,14 @@ private Mono getAsync( * @return a SourceControl of a Container App along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String containerAppName, String sourceControlName, Context context) { + public Response getWithResponse(String resourceGroupName, String containerAppName, + String sourceControlName, Context context) { return getWithResponseAsync(resourceGroupName, containerAppName, sourceControlName, context).block(); } /** * Get a SourceControl of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -485,7 +407,7 @@ public SourceControlInner get(String resourceGroupName, String containerAppName, /** * Create or update the SourceControl for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -496,22 +418,15 @@ public SourceControlInner get(String resourceGroupName, String containerAppName, * @return container App SourceControl along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -533,25 +448,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - sourceControlName, - this.client.getApiVersion(), - sourceControlEnvelope, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, sourceControlName, this.client.getApiVersion(), + sourceControlEnvelope, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create or update the SourceControl for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -563,23 +468,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return container App SourceControl along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -601,22 +498,13 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - sourceControlName, - this.client.getApiVersion(), - sourceControlEnvelope, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, sourceControlName, this.client.getApiVersion(), sourceControlEnvelope, accept, context); } /** * Create or update the SourceControl for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -628,26 +516,17 @@ private Mono>> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SourceControlInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String containerAppName, - String sourceControlName, + String resourceGroupName, String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope) { - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - SourceControlInner.class, - SourceControlInner.class, - this.client.getContext()); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, + sourceControlName, sourceControlEnvelope); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SourceControlInner.class, SourceControlInner.class, this.client.getContext()); } /** * Create or update the SourceControl for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -660,24 +539,18 @@ private PollerFlux, SourceControlInner> beginCrea */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, SourceControlInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope, - Context context) { + String resourceGroupName, String containerAppName, String sourceControlName, + SourceControlInner sourceControlEnvelope, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), SourceControlInner.class, SourceControlInner.class, context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, containerAppName, + sourceControlName, sourceControlEnvelope, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + SourceControlInner.class, SourceControlInner.class, context); } /** * Create or update the SourceControl for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -688,11 +561,8 @@ private PollerFlux, SourceControlInner> beginCrea * @return the {@link SyncPoller} for polling of container App SourceControl. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SourceControlInner> beginCreateOrUpdate( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope) { + public SyncPoller, SourceControlInner> beginCreateOrUpdate(String resourceGroupName, + String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope) { return this .beginCreateOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope) .getSyncPoller(); @@ -700,7 +570,7 @@ public SyncPoller, SourceControlInner> beginCreat /** * Create or update the SourceControl for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -712,21 +582,15 @@ public SyncPoller, SourceControlInner> beginCreat * @return the {@link SyncPoller} for polling of container App SourceControl. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, SourceControlInner> beginCreateOrUpdate( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope, - Context context) { - return this - .beginCreateOrUpdateAsync( - resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, context) - .getSyncPoller(); + public SyncPoller, SourceControlInner> beginCreateOrUpdate(String resourceGroupName, + String containerAppName, String sourceControlName, SourceControlInner sourceControlEnvelope, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, + sourceControlEnvelope, context).getSyncPoller(); } /** * Create or update the SourceControl for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -737,19 +601,15 @@ public SyncPoller, SourceControlInner> beginCreat * @return container App SourceControl on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope) { + private Mono createOrUpdateAsync(String resourceGroupName, String containerAppName, + String sourceControlName, SourceControlInner sourceControlEnvelope) { return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope) - .last() - .flatMap(this.client::getLroFinalResultOrError); + .last().flatMap(this.client::getLroFinalResultOrError); } /** * Create or update the SourceControl for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -761,21 +621,15 @@ private Mono createOrUpdateAsync( * @return container App SourceControl on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String containerAppName, + String sourceControlName, SourceControlInner sourceControlEnvelope, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, + context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Create or update the SourceControl for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -786,18 +640,15 @@ private Mono createOrUpdateAsync( * @return container App SourceControl. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SourceControlInner createOrUpdate( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope) { + public SourceControlInner createOrUpdate(String resourceGroupName, String containerAppName, + String sourceControlName, SourceControlInner sourceControlEnvelope) { return createOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope) .block(); } /** * Create or update the SourceControl for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -809,20 +660,15 @@ public SourceControlInner createOrUpdate( * @return container App SourceControl. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SourceControlInner createOrUpdate( - String resourceGroupName, - String containerAppName, - String sourceControlName, - SourceControlInner sourceControlEnvelope, - Context context) { - return createOrUpdateAsync( - resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, context) - .block(); + public SourceControlInner createOrUpdate(String resourceGroupName, String containerAppName, + String sourceControlName, SourceControlInner sourceControlEnvelope, Context context) { + return createOrUpdateAsync(resourceGroupName, containerAppName, sourceControlName, sourceControlEnvelope, + context).block(); } /** * Delete a Container App SourceControl. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -832,19 +678,15 @@ public SourceControlInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String containerAppName, String sourceControlName) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String containerAppName, + String sourceControlName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -860,24 +702,14 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - sourceControlName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, sourceControlName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a Container App SourceControl. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -888,19 +720,15 @@ private Mono>> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String containerAppName, String sourceControlName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String containerAppName, + String sourceControlName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -916,21 +744,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - containerAppName, - sourceControlName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + containerAppName, sourceControlName, this.client.getApiVersion(), accept, context); } /** * Delete a Container App SourceControl. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -940,19 +760,17 @@ private Mono>> deleteWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String containerAppName, String sourceControlName) { - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, containerAppName, sourceControlName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String containerAppName, + String sourceControlName) { + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, containerAppName, sourceControlName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a Container App SourceControl. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -963,19 +781,18 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String containerAppName, String sourceControlName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String containerAppName, + String sourceControlName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - deleteWithResponseAsync(resourceGroupName, containerAppName, sourceControlName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, containerAppName, sourceControlName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete a Container App SourceControl. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -985,14 +802,14 @@ private PollerFlux, Void> beginDeleteAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String containerAppName, String sourceControlName) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String containerAppName, + String sourceControlName) { return this.beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName).getSyncPoller(); } /** * Delete a Container App SourceControl. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -1003,14 +820,14 @@ public SyncPoller, Void> beginDelete( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String containerAppName, String sourceControlName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String containerAppName, + String sourceControlName, Context context) { return this.beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName, context).getSyncPoller(); } /** * Delete a Container App SourceControl. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -1021,14 +838,13 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String containerAppName, String sourceControlName) { - return beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName) - .last() + return beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a Container App SourceControl. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -1039,16 +855,15 @@ private Mono deleteAsync(String resourceGroupName, String containerAppName * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono deleteAsync( - String resourceGroupName, String containerAppName, String sourceControlName, Context context) { - return beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName, context) - .last() + private Mono deleteAsync(String resourceGroupName, String containerAppName, String sourceControlName, + Context context) { + return beginDeleteAsync(resourceGroupName, containerAppName, sourceControlName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a Container App SourceControl. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -1063,7 +878,7 @@ public void delete(String resourceGroupName, String containerAppName, String sou /** * Delete a Container App SourceControl. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. @@ -1079,14 +894,15 @@ public void delete(String resourceGroupName, String containerAppName, String sou /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 sourceControl collection ARM resource along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return sourceControl collection ARM resource along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByContainerAppNextSinglePageAsync(String nextLink) { @@ -1094,63 +910,45 @@ private Mono> listByContainerAppNextSinglePage return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByContainerAppNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return sourceControl collection ARM resource along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return sourceControl collection ARM resource along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByContainerAppNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByContainerAppNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByContainerAppNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByContainerAppNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsImpl.java index c4b25c702c74..4f33cd3ab477 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsImpl.java @@ -21,35 +21,31 @@ public final class ContainerAppsSourceControlsImpl implements ContainerAppsSourc private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - public ContainerAppsSourceControlsImpl( - ContainerAppsSourceControlsClient innerClient, + public ContainerAppsSourceControlsImpl(ContainerAppsSourceControlsClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable listByContainerApp(String resourceGroupName, String containerAppName) { - PagedIterable inner = - this.serviceClient().listByContainerApp(resourceGroupName, containerAppName); - return Utils.mapPage(inner, inner1 -> new SourceControlImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByContainerApp(resourceGroupName, containerAppName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SourceControlImpl(inner1, this.manager())); } - public PagedIterable listByContainerApp( - String resourceGroupName, String containerAppName, Context context) { - PagedIterable inner = - this.serviceClient().listByContainerApp(resourceGroupName, containerAppName, context); - return Utils.mapPage(inner, inner1 -> new SourceControlImpl(inner1, this.manager())); + public PagedIterable listByContainerApp(String resourceGroupName, String containerAppName, + Context context) { + PagedIterable inner + = this.serviceClient().listByContainerApp(resourceGroupName, containerAppName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new SourceControlImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String containerAppName, String sourceControlName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, containerAppName, sourceControlName, context); + public Response getWithResponse(String resourceGroupName, String containerAppName, + String sourceControlName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, containerAppName, sourceControlName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new SourceControlImpl(inner.getValue(), this.manager())); } else { return null; @@ -74,109 +70,77 @@ public void delete(String resourceGroupName, String containerAppName, String sou } public SourceControl getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String containerAppName = Utils.getValueFromIdByName(id, "containerApps"); + String containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); if (containerAppName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); } - String sourceControlName = Utils.getValueFromIdByName(id, "sourcecontrols"); + String sourceControlName = ResourceManagerUtils.getValueFromIdByName(id, "sourcecontrols"); if (sourceControlName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); } return this.getWithResponse(resourceGroupName, containerAppName, sourceControlName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String containerAppName = Utils.getValueFromIdByName(id, "containerApps"); + String containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); if (containerAppName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); } - String sourceControlName = Utils.getValueFromIdByName(id, "sourcecontrols"); + String sourceControlName = ResourceManagerUtils.getValueFromIdByName(id, "sourcecontrols"); if (sourceControlName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); } return this.getWithResponse(resourceGroupName, containerAppName, sourceControlName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String containerAppName = Utils.getValueFromIdByName(id, "containerApps"); + String containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); if (containerAppName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); } - String sourceControlName = Utils.getValueFromIdByName(id, "sourcecontrols"); + String sourceControlName = ResourceManagerUtils.getValueFromIdByName(id, "sourcecontrols"); if (sourceControlName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); } this.delete(resourceGroupName, containerAppName, sourceControlName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String containerAppName = Utils.getValueFromIdByName(id, "containerApps"); + String containerAppName = ResourceManagerUtils.getValueFromIdByName(id, "containerApps"); if (containerAppName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'containerApps'.", id))); } - String sourceControlName = Utils.getValueFromIdByName(id, "sourcecontrols"); + String sourceControlName = ResourceManagerUtils.getValueFromIdByName(id, "sourcecontrols"); if (sourceControlName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'sourcecontrols'.", id))); } this.delete(resourceGroupName, containerAppName, sourceControlName, context); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CustomHostnameAnalysisResultImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CustomHostnameAnalysisResultImpl.java index 294b901837f9..189b97144b22 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CustomHostnameAnalysisResultImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CustomHostnameAnalysisResultImpl.java @@ -16,8 +16,7 @@ public final class CustomHostnameAnalysisResultImpl implements CustomHostnameAna private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - CustomHostnameAnalysisResultImpl( - CustomHostnameAnalysisResultInner innerObject, + CustomHostnameAnalysisResultImpl(CustomHostnameAnalysisResultInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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 9afafdafa4c7..d460f9e1331a 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 @@ -5,9 +5,11 @@ package com.azure.resourcemanager.appcontainers.implementation; import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; import com.azure.resourcemanager.appcontainers.models.DaprComponent; +import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; import com.azure.resourcemanager.appcontainers.models.DaprMetadata; import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; import com.azure.resourcemanager.appcontainers.models.Secret; @@ -31,6 +33,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String componentType() { return this.innerModel().componentType(); } @@ -78,6 +84,15 @@ public List scopes() { } } + public List serviceComponentBind() { + List inner = this.innerModel().serviceComponentBind(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public String resourceGroupName() { return resourceGroupName; } @@ -96,32 +111,24 @@ private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager( private String componentName; - public DaprComponentImpl withExistingConnectedEnvironment( - String resourceGroupName, String connectedEnvironmentName) { + public DaprComponentImpl withExistingConnectedEnvironment(String resourceGroupName, + String connectedEnvironmentName) { this.resourceGroupName = resourceGroupName; this.connectedEnvironmentName = connectedEnvironmentName; return this; } public DaprComponent create() { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironmentsDaprComponents() - .createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject + = serviceManager.serviceClient().getConnectedEnvironmentsDaprComponents().createOrUpdateWithResponse( + resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), Context.NONE).getValue(); return this; } public DaprComponent create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironmentsDaprComponents() - .createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), context) - .getValue(); + this.innerObject + = serviceManager.serviceClient().getConnectedEnvironmentsDaprComponents().createOrUpdateWithResponse( + resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), context).getValue(); return this; } @@ -136,67 +143,49 @@ public DaprComponentImpl update() { } public DaprComponent apply() { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironmentsDaprComponents() - .createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject + = serviceManager.serviceClient().getConnectedEnvironmentsDaprComponents().createOrUpdateWithResponse( + resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), Context.NONE).getValue(); return this; } public DaprComponent apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironmentsDaprComponents() - .createOrUpdateWithResponse( - resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), context) - .getValue(); + this.innerObject + = serviceManager.serviceClient().getConnectedEnvironmentsDaprComponents().createOrUpdateWithResponse( + resourceGroupName, connectedEnvironmentName, componentName, this.innerModel(), context).getValue(); return this; } - DaprComponentImpl( - DaprComponentInner innerObject, + DaprComponentImpl(DaprComponentInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.connectedEnvironmentName = Utils.getValueFromIdByName(innerObject.id(), "connectedEnvironments"); - this.componentName = Utils.getValueFromIdByName(innerObject.id(), "daprComponents"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.connectedEnvironmentName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "connectedEnvironments"); + this.componentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "daprComponents"); } public DaprComponent refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironmentsDaprComponents() - .getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsDaprComponents() + .getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE).getValue(); return this; } public DaprComponent refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getConnectedEnvironmentsDaprComponents() - .getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getConnectedEnvironmentsDaprComponents() + .getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context).getValue(); return this; } public Response listSecretsWithResponse(Context context) { - return serviceManager - .connectedEnvironmentsDaprComponents() - .listSecretsWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); + return serviceManager.connectedEnvironmentsDaprComponents().listSecretsWithResponse(resourceGroupName, + connectedEnvironmentName, componentName, context); } public DaprSecretsCollection listSecrets() { - return serviceManager - .connectedEnvironmentsDaprComponents() - .listSecrets(resourceGroupName, connectedEnvironmentName, componentName); + return serviceManager.connectedEnvironmentsDaprComponents().listSecrets(resourceGroupName, + connectedEnvironmentName, componentName); } public DaprComponentImpl withComponentType(String componentType) { @@ -238,4 +227,9 @@ public DaprComponentImpl withScopes(List scopes) { this.innerModel().withScopes(scopes); return this; } + + public DaprComponentImpl withServiceComponentBind(List serviceComponentBind) { + this.innerModel().withServiceComponentBind(serviceComponentBind); + return this; + } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPoliciesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPoliciesClientImpl.java new file mode 100644 index 000000000000..fbda276a308c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPoliciesClientImpl.java @@ -0,0 +1,812 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.appcontainers.fluent.DaprComponentResiliencyPoliciesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyInner; +import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPoliciesCollection; +import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DaprComponentResiliencyPoliciesClient. + */ +public final class DaprComponentResiliencyPoliciesClientImpl implements DaprComponentResiliencyPoliciesClient { + /** + * The proxy service used to perform REST calls. + */ + private final DaprComponentResiliencyPoliciesService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of DaprComponentResiliencyPoliciesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DaprComponentResiliencyPoliciesClientImpl(ContainerAppsApiClientImpl client) { + this.service = RestProxy.create(DaprComponentResiliencyPoliciesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientDaprComponentResiliencyPolicies to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface DaprComponentResiliencyPoliciesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, @PathParam("componentName") String componentName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, @PathParam("componentName") String componentName, + @PathParam("name") String name, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, @PathParam("componentName") String componentName, + @PathParam("name") String name, @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DaprComponentResiliencyPolicyInner daprComponentResiliencyPolicyEnvelope, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/resiliencyPolicies/{name}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, @PathParam("componentName") String componentName, + @PathParam("name") String name, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the resiliency policies for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the resiliency policies for a Dapr component along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String environmentName, String componentName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, componentName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the resiliency policies for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the resiliency policies for a Dapr component along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String environmentName, String componentName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, environmentName, + componentName, this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the resiliency policies for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the resiliency policies for a Dapr component as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String environmentName, + String componentName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName, componentName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Get the resiliency policies for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the resiliency policies for a Dapr component as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String environmentName, + String componentName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName, componentName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Get the resiliency policies for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the resiliency policies for a Dapr component as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String environmentName, + String componentName) { + return new PagedIterable<>(listAsync(resourceGroupName, environmentName, componentName)); + } + + /** + * Get the resiliency policies for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the resiliency policies for a Dapr component as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String environmentName, + String componentName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, environmentName, componentName, context)); + } + + /** + * Get a Dapr component resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Dapr component resiliency policy along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String environmentName, String componentName, String name) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, componentName, name, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a Dapr component resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Dapr component resiliency policy along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, + String environmentName, String componentName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, componentName, name, this.client.getApiVersion(), accept, context); + } + + /** + * Get a Dapr component resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Dapr component resiliency policy on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String environmentName, + String componentName, String name) { + return getWithResponseAsync(resourceGroupName, environmentName, componentName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a Dapr component resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Dapr component resiliency policy along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, + String environmentName, String componentName, String name, Context context) { + return getWithResponseAsync(resourceGroupName, environmentName, componentName, name, context).block(); + } + + /** + * Get a Dapr component resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Dapr component resiliency policy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DaprComponentResiliencyPolicyInner get(String resourceGroupName, String environmentName, + String componentName, String name) { + return getWithResponse(resourceGroupName, environmentName, componentName, name, Context.NONE).getValue(); + } + + /** + * Creates or updates a Dapr component resiliency policy. + * + * Creates or updates a resiliency policy for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @param daprComponentResiliencyPolicyEnvelope Configuration details of the Dapr Component Resiliency Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr Component Resiliency Policy along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String environmentName, String componentName, String name, + DaprComponentResiliencyPolicyInner daprComponentResiliencyPolicyEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (daprComponentResiliencyPolicyEnvelope == null) { + return Mono.error(new IllegalArgumentException( + "Parameter daprComponentResiliencyPolicyEnvelope is required and cannot be null.")); + } else { + daprComponentResiliencyPolicyEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, componentName, name, this.client.getApiVersion(), + daprComponentResiliencyPolicyEnvelope, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a Dapr component resiliency policy. + * + * Creates or updates a resiliency policy for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @param daprComponentResiliencyPolicyEnvelope Configuration details of the Dapr Component Resiliency Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr Component Resiliency Policy along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String environmentName, String componentName, String name, + DaprComponentResiliencyPolicyInner daprComponentResiliencyPolicyEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (daprComponentResiliencyPolicyEnvelope == null) { + return Mono.error(new IllegalArgumentException( + "Parameter daprComponentResiliencyPolicyEnvelope is required and cannot be null.")); + } else { + daprComponentResiliencyPolicyEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, componentName, name, this.client.getApiVersion(), daprComponentResiliencyPolicyEnvelope, + accept, context); + } + + /** + * Creates or updates a Dapr component resiliency policy. + * + * Creates or updates a resiliency policy for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @param daprComponentResiliencyPolicyEnvelope Configuration details of the Dapr Component Resiliency Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr Component Resiliency Policy on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, + String environmentName, String componentName, String name, + DaprComponentResiliencyPolicyInner daprComponentResiliencyPolicyEnvelope) { + return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, componentName, name, + daprComponentResiliencyPolicyEnvelope).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Creates or updates a Dapr component resiliency policy. + * + * Creates or updates a resiliency policy for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @param daprComponentResiliencyPolicyEnvelope Configuration details of the Dapr Component Resiliency Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr Component Resiliency Policy along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, + String environmentName, String componentName, String name, + DaprComponentResiliencyPolicyInner daprComponentResiliencyPolicyEnvelope, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, componentName, name, + daprComponentResiliencyPolicyEnvelope, context).block(); + } + + /** + * Creates or updates a Dapr component resiliency policy. + * + * Creates or updates a resiliency policy for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @param daprComponentResiliencyPolicyEnvelope Configuration details of the Dapr Component Resiliency Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr Component Resiliency Policy. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DaprComponentResiliencyPolicyInner createOrUpdate(String resourceGroupName, String environmentName, + String componentName, String name, DaprComponentResiliencyPolicyInner daprComponentResiliencyPolicyEnvelope) { + return createOrUpdateWithResponse(resourceGroupName, environmentName, componentName, name, + daprComponentResiliencyPolicyEnvelope, Context.NONE).getValue(); + } + + /** + * Delete a Dapr component resiliency policy. + * + * Delete a resiliency policy for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String environmentName, + String componentName, String name) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, componentName, name, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a Dapr component resiliency policy. + * + * Delete a resiliency policy for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String environmentName, + String componentName, String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (componentName == null) { + return Mono.error(new IllegalArgumentException("Parameter componentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, componentName, name, this.client.getApiVersion(), accept, context); + } + + /** + * Delete a Dapr component resiliency policy. + * + * Delete a resiliency policy for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String environmentName, String componentName, + String name) { + return deleteWithResponseAsync(resourceGroupName, environmentName, componentName, name) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Delete a Dapr component resiliency policy. + * + * Delete a resiliency policy for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String environmentName, String componentName, + String name, Context context) { + return deleteWithResponseAsync(resourceGroupName, environmentName, componentName, name, context).block(); + } + + /** + * Delete a Dapr component resiliency policy. + * + * Delete a resiliency policy for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String environmentName, String componentName, String name) { + deleteWithResponse(resourceGroupName, environmentName, componentName, name, Context.NONE); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr Component Resiliency Policies ARM resource along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr Component Resiliency Policies ARM resource along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, + Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPoliciesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPoliciesImpl.java new file mode 100644 index 000000000000..03620b7c4656 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPoliciesImpl.java @@ -0,0 +1,186 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.DaprComponentResiliencyPoliciesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyInner; +import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicies; +import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicy; + +public final class DaprComponentResiliencyPoliciesImpl implements DaprComponentResiliencyPolicies { + private static final ClientLogger LOGGER = new ClientLogger(DaprComponentResiliencyPoliciesImpl.class); + + private final DaprComponentResiliencyPoliciesClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public DaprComponentResiliencyPoliciesImpl(DaprComponentResiliencyPoliciesClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String environmentName, + String componentName) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, environmentName, componentName); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new DaprComponentResiliencyPolicyImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String environmentName, + String componentName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, environmentName, componentName, context); + return ResourceManagerUtils.mapPage(inner, + inner1 -> new DaprComponentResiliencyPolicyImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String environmentName, + String componentName, String name, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, environmentName, componentName, name, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DaprComponentResiliencyPolicyImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DaprComponentResiliencyPolicy get(String resourceGroupName, String environmentName, String componentName, + String name) { + DaprComponentResiliencyPolicyInner inner + = this.serviceClient().get(resourceGroupName, environmentName, componentName, name); + if (inner != null) { + return new DaprComponentResiliencyPolicyImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse(String resourceGroupName, String environmentName, String componentName, + String name, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, componentName, name, + context); + } + + public void delete(String resourceGroupName, String environmentName, String componentName, String name) { + this.serviceClient().delete(resourceGroupName, environmentName, componentName, name); + } + + public DaprComponentResiliencyPolicy getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String componentName = ResourceManagerUtils.getValueFromIdByName(id, "daprComponents"); + if (componentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); + } + String name = ResourceManagerUtils.getValueFromIdByName(id, "resiliencyPolicies"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resiliencyPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, environmentName, componentName, name, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String componentName = ResourceManagerUtils.getValueFromIdByName(id, "daprComponents"); + if (componentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); + } + String name = ResourceManagerUtils.getValueFromIdByName(id, "resiliencyPolicies"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resiliencyPolicies'.", id))); + } + return this.getWithResponse(resourceGroupName, environmentName, componentName, name, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String componentName = ResourceManagerUtils.getValueFromIdByName(id, "daprComponents"); + if (componentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); + } + String name = ResourceManagerUtils.getValueFromIdByName(id, "resiliencyPolicies"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resiliencyPolicies'.", id))); + } + this.deleteWithResponse(resourceGroupName, environmentName, componentName, name, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String componentName = ResourceManagerUtils.getValueFromIdByName(id, "daprComponents"); + if (componentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'daprComponents'.", id))); + } + String name = ResourceManagerUtils.getValueFromIdByName(id, "resiliencyPolicies"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resiliencyPolicies'.", id))); + } + return this.deleteWithResponse(resourceGroupName, environmentName, componentName, name, context); + } + + private DaprComponentResiliencyPoliciesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + public DaprComponentResiliencyPolicyImpl define(String name) { + return new DaprComponentResiliencyPolicyImpl(name, this.manager()); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPolicyImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPolicyImpl.java new file mode 100644 index 000000000000..cbf400cbf242 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentResiliencyPolicyImpl.java @@ -0,0 +1,143 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyInner; +import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicy; +import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; + +public final class DaprComponentResiliencyPolicyImpl implements DaprComponentResiliencyPolicy, + DaprComponentResiliencyPolicy.Definition, DaprComponentResiliencyPolicy.Update { + private DaprComponentResiliencyPolicyInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public DaprComponentResiliencyPolicyConfiguration inboundPolicy() { + return this.innerModel().inboundPolicy(); + } + + public DaprComponentResiliencyPolicyConfiguration outboundPolicy() { + return this.innerModel().outboundPolicy(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public DaprComponentResiliencyPolicyInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String environmentName; + + private String componentName; + + private String name; + + public DaprComponentResiliencyPolicyImpl withExistingDaprComponent(String resourceGroupName, String environmentName, + String componentName) { + this.resourceGroupName = resourceGroupName; + this.environmentName = environmentName; + this.componentName = componentName; + return this; + } + + public DaprComponentResiliencyPolicy create() { + this.innerObject + = serviceManager.serviceClient().getDaprComponentResiliencyPolicies().createOrUpdateWithResponse( + resourceGroupName, environmentName, componentName, name, this.innerModel(), Context.NONE).getValue(); + return this; + } + + public DaprComponentResiliencyPolicy create(Context context) { + this.innerObject + = serviceManager.serviceClient().getDaprComponentResiliencyPolicies().createOrUpdateWithResponse( + resourceGroupName, environmentName, componentName, name, this.innerModel(), context).getValue(); + return this; + } + + DaprComponentResiliencyPolicyImpl(String name, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = new DaprComponentResiliencyPolicyInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public DaprComponentResiliencyPolicyImpl update() { + return this; + } + + public DaprComponentResiliencyPolicy apply() { + this.innerObject + = serviceManager.serviceClient().getDaprComponentResiliencyPolicies().createOrUpdateWithResponse( + resourceGroupName, environmentName, componentName, name, this.innerModel(), Context.NONE).getValue(); + return this; + } + + public DaprComponentResiliencyPolicy apply(Context context) { + this.innerObject + = serviceManager.serviceClient().getDaprComponentResiliencyPolicies().createOrUpdateWithResponse( + resourceGroupName, environmentName, componentName, name, this.innerModel(), context).getValue(); + return this; + } + + DaprComponentResiliencyPolicyImpl(DaprComponentResiliencyPolicyInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.environmentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); + this.componentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "daprComponents"); + this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resiliencyPolicies"); + } + + public DaprComponentResiliencyPolicy refresh() { + this.innerObject = serviceManager.serviceClient().getDaprComponentResiliencyPolicies() + .getWithResponse(resourceGroupName, environmentName, componentName, name, Context.NONE).getValue(); + return this; + } + + public DaprComponentResiliencyPolicy refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getDaprComponentResiliencyPolicies() + .getWithResponse(resourceGroupName, environmentName, componentName, name, context).getValue(); + return this; + } + + public DaprComponentResiliencyPolicyImpl + withInboundPolicy(DaprComponentResiliencyPolicyConfiguration inboundPolicy) { + this.innerModel().withInboundPolicy(inboundPolicy); + return this; + } + + public DaprComponentResiliencyPolicyImpl + withOutboundPolicy(DaprComponentResiliencyPolicyConfiguration outboundPolicy) { + this.innerModel().withOutboundPolicy(outboundPolicy); + return this; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsClientImpl.java index fde054b8f7f2..0a9d6b7f9547 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 @@ -35,22 +35,28 @@ import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in DaprComponentsClient. */ +/** + * An instance of this class provides access to all the operations defined in DaprComponentsClient. + */ public final class DaprComponentsClientImpl implements DaprComponentsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final DaprComponentsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerAppsApiClientImpl client; /** * Initializes an instance of DaprComponentsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ DaprComponentsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy.create(DaprComponentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(DaprComponentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -61,117 +67,88 @@ public final class DaprComponentsClientImpl implements DaprComponentsClient { @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") public interface DaprComponentsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("componentName") String componentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("environmentName") String environmentName, @PathParam("componentName") String componentName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("componentName") String componentName, + @PathParam("environmentName") String environmentName, @PathParam("componentName") String componentName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") DaprComponentInner daprComponentEnvelope, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete( - @HostParam("$host") String endpoint, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("componentName") String componentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("environmentName") String environmentName, @PathParam("componentName") String componentName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/listSecrets") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprComponents/{componentName}/listSecrets") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listSecrets( - @HostParam("$host") String endpoint, + Mono> listSecrets(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("componentName") String componentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("environmentName") String environmentName, @PathParam("componentName") String componentName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Get the Dapr Components for a managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Dapr Components for a managed environment along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String environmentName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String environmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -183,32 +160,16 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the Dapr Components for a managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param context The context to associate with this operation. @@ -216,22 +177,18 @@ private Mono> listSinglePageAsync( * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Dapr Components for a managed environment along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String environmentName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String environmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -244,28 +201,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, environmentName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the Dapr Components for a managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -275,14 +219,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String environmentName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, environmentName), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Get the Dapr Components for a managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param context The context to associate with this operation. @@ -293,14 +236,13 @@ private PagedFlux listAsync(String resourceGroupName, String */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String environmentName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, environmentName, context), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Get the Dapr Components for a managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -315,7 +257,7 @@ public PagedIterable list(String resourceGroupName, String e /** * Get the Dapr Components for a managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param context The context to associate with this operation. @@ -331,7 +273,7 @@ public PagedIterable list(String resourceGroupName, String e /** * Get a dapr component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. @@ -341,19 +283,15 @@ public PagedIterable list(String resourceGroupName, String e * @return a dapr component along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String environmentName, String componentName) { + private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, + String componentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -368,24 +306,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - componentName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, componentName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a dapr component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. @@ -396,19 +324,15 @@ private Mono> getWithResponseAsync( * @return a dapr component along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String environmentName, String componentName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, + String componentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -423,21 +347,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - componentName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, componentName, this.client.getApiVersion(), accept, context); } /** * Get a dapr component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. @@ -454,7 +370,7 @@ private Mono getAsync(String resourceGroupName, String envir /** * Get a dapr component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. @@ -465,14 +381,14 @@ private Mono getAsync(String resourceGroupName, String envir * @return a dapr component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context) { + public Response getWithResponse(String resourceGroupName, String environmentName, + String componentName, Context context) { return getWithResponseAsync(resourceGroupName, environmentName, componentName, context).block(); } /** * Get a dapr component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. @@ -488,9 +404,9 @@ public DaprComponentInner get(String resourceGroupName, String environmentName, /** * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in 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. @@ -501,22 +417,15 @@ public DaprComponentInner get(String resourceGroupName, String environmentName, * @return dapr Component along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String environmentName, - String componentName, - DaprComponentInner daprComponentEnvelope) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String environmentName, String componentName, DaprComponentInner daprComponentEnvelope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -537,27 +446,17 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - componentName, - this.client.getApiVersion(), - daprComponentEnvelope, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, componentName, this.client.getApiVersion(), daprComponentEnvelope, + accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in 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. @@ -569,23 +468,15 @@ private Mono> createOrUpdateWithResponseAsync( * @return dapr Component along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String environmentName, - String componentName, - DaprComponentInner daprComponentEnvelope, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String environmentName, String componentName, DaprComponentInner daprComponentEnvelope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -606,24 +497,15 @@ private Mono> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - componentName, - this.client.getApiVersion(), - daprComponentEnvelope, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, componentName, this.client.getApiVersion(), daprComponentEnvelope, accept, context); } /** * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in 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. @@ -634,20 +516,17 @@ private Mono> createOrUpdateWithResponseAsync( * @return dapr Component on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String environmentName, - String componentName, - DaprComponentInner daprComponentEnvelope) { + private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, + String componentName, DaprComponentInner daprComponentEnvelope) { return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, componentName, daprComponentEnvelope) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in 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. @@ -659,22 +538,17 @@ private Mono createOrUpdateAsync( * @return dapr Component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String environmentName, - String componentName, - DaprComponentInner daprComponentEnvelope, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, environmentName, componentName, daprComponentEnvelope, context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, String environmentName, + String componentName, DaprComponentInner daprComponentEnvelope, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, componentName, daprComponentEnvelope, + context).block(); } /** * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in 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. @@ -685,21 +559,17 @@ public Response createOrUpdateWithResponse( * @return dapr Component. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DaprComponentInner createOrUpdate( - String resourceGroupName, - String environmentName, - String componentName, + public DaprComponentInner createOrUpdate(String resourceGroupName, String environmentName, String componentName, DaprComponentInner daprComponentEnvelope) { - return createOrUpdateWithResponse( - resourceGroupName, environmentName, componentName, daprComponentEnvelope, Context.NONE) - .getValue(); + return createOrUpdateWithResponse(resourceGroupName, environmentName, componentName, daprComponentEnvelope, + Context.NONE).getValue(); } /** * Delete a Dapr Component. - * - *

Delete a Dapr Component from a Managed Environment. - * + * + * 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. * @param componentName Name of the Dapr Component. @@ -709,19 +579,15 @@ public DaprComponentInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String environmentName, String componentName) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String environmentName, + String componentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -736,26 +602,16 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - componentName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, componentName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a Dapr Component. - * - *

Delete a Dapr Component from a Managed Environment. - * + * + * 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. * @param componentName Name of the Dapr Component. @@ -766,19 +622,15 @@ private Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String environmentName, String componentName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String environmentName, + String componentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -793,23 +645,15 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - componentName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, componentName, this.client.getApiVersion(), accept, context); } /** * Delete a Dapr Component. - * - *

Delete a Dapr Component from a Managed Environment. - * + * + * 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. * @param componentName Name of the Dapr Component. @@ -826,9 +670,9 @@ private Mono deleteAsync(String resourceGroupName, String environmentName, /** * Delete a Dapr Component. - * - *

Delete a Dapr Component from a Managed Environment. - * + * + * 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. * @param componentName Name of the Dapr Component. @@ -839,16 +683,16 @@ private Mono deleteAsync(String resourceGroupName, String environmentName, * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String environmentName, String componentName, + Context context) { return deleteWithResponseAsync(resourceGroupName, environmentName, componentName, context).block(); } /** * Delete a Dapr Component. - * - *

Delete a Dapr Component from a Managed Environment. - * + * + * 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. * @param componentName Name of the Dapr Component. @@ -863,7 +707,7 @@ public void delete(String resourceGroupName, String environmentName, String comp /** * List secrets for a dapr component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. @@ -871,22 +715,18 @@ public void delete(String resourceGroupName, String environmentName, String comp * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync( - String resourceGroupName, String environmentName, String componentName) { + private Mono> listSecretsWithResponseAsync(String resourceGroupName, + String environmentName, String componentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -901,24 +741,14 @@ private Mono> listSecretsWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listSecrets( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - componentName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, componentName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List secrets for a dapr component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. @@ -927,22 +757,18 @@ private Mono> listSecretsWithResponseAsync( * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync( - String resourceGroupName, String environmentName, String componentName, Context context) { + private Mono> listSecretsWithResponseAsync(String resourceGroupName, + String environmentName, String componentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -957,21 +783,13 @@ private Mono> listSecretsWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listSecrets( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - componentName, - this.client.getApiVersion(), - accept, - context); + return service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, componentName, this.client.getApiVersion(), accept, context); } /** * List secrets for a dapr component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. @@ -981,15 +799,15 @@ private Mono> listSecretsWithResponseAsync( * @return dapr component Secrets Collection for ListSecrets Action on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listSecretsAsync( - String resourceGroupName, String environmentName, String componentName) { + private Mono listSecretsAsync(String resourceGroupName, String environmentName, + String componentName) { return listSecretsWithResponseAsync(resourceGroupName, environmentName, componentName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * List secrets for a dapr component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. @@ -1000,14 +818,14 @@ private Mono listSecretsAsync( * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listSecretsWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context) { + public Response listSecretsWithResponse(String resourceGroupName, + String environmentName, String componentName, Context context) { return listSecretsWithResponseAsync(resourceGroupName, environmentName, componentName, context).block(); } /** * List secrets for a dapr component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. @@ -1017,16 +835,17 @@ public Response listSecretsWithResponse( * @return dapr component Secrets Collection for ListSecrets Action. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DaprSecretsCollectionInner listSecrets( - String resourceGroupName, String environmentName, String componentName) { + public DaprSecretsCollectionInner listSecrets(String resourceGroupName, String environmentName, + String componentName) { return listSecretsWithResponse(resourceGroupName, environmentName, componentName, Context.NONE).getValue(); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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. @@ -1038,31 +857,22 @@ private Mono> listNextSinglePageAsync(String n return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1075,23 +885,13 @@ private Mono> listNextSinglePageAsync(String n return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsImpl.java index 516bc044c8fe..1e94a6c8e32f 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 @@ -23,8 +23,7 @@ public final class DaprComponentsImpl implements DaprComponents { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - public DaprComponentsImpl( - DaprComponentsClient innerClient, + public DaprComponentsImpl(DaprComponentsClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -32,24 +31,21 @@ public DaprComponentsImpl( public PagedIterable list(String resourceGroupName, String environmentName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName); - return Utils.mapPage(inner, inner1 -> new DaprComponentImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DaprComponentImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String environmentName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, environmentName, context); - return Utils.mapPage(inner, inner1 -> new DaprComponentImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, environmentName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DaprComponentImpl(inner1, this.manager())); } - public Response getWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, environmentName, componentName, context); + public Response getWithResponse(String resourceGroupName, String environmentName, + String componentName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, environmentName, componentName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DaprComponentImpl(inner.getValue(), this.manager())); } else { return null; @@ -65,37 +61,22 @@ 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); + 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(), + 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, + public DaprComponent createOrUpdate(String resourceGroupName, String environmentName, String componentName, DaprComponentInner daprComponentEnvelope) { - DaprComponentInner inner = - this - .serviceClient() - .createOrUpdate(resourceGroupName, environmentName, componentName, daprComponentEnvelope); + DaprComponentInner inner = this.serviceClient().createOrUpdate(resourceGroupName, environmentName, + componentName, daprComponentEnvelope); if (inner != null) { return new DaprComponentImpl(inner, this.manager()); } else { @@ -103,8 +84,8 @@ public DaprComponent createOrUpdate( } } - public Response deleteWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String environmentName, String componentName, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, componentName, context); } @@ -112,15 +93,12 @@ public void delete(String resourceGroupName, String environmentName, String comp this.serviceClient().delete(resourceGroupName, environmentName, componentName); } - public Response listSecretsWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context) { - Response inner = - this.serviceClient().listSecretsWithResponse(resourceGroupName, environmentName, componentName, context); + public Response listSecretsWithResponse(String resourceGroupName, String environmentName, + String componentName, Context context) { + Response inner + = this.serviceClient().listSecretsWithResponse(resourceGroupName, environmentName, componentName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DaprSecretsCollectionImpl(inner.getValue(), this.manager())); } else { return null; @@ -128,8 +106,8 @@ public Response listSecretsWithResponse( } public DaprSecretsCollection listSecrets(String resourceGroupName, String environmentName, String componentName) { - DaprSecretsCollectionInner inner = - this.serviceClient().listSecrets(resourceGroupName, environmentName, componentName); + DaprSecretsCollectionInner inner + = this.serviceClient().listSecrets(resourceGroupName, environmentName, componentName); if (inner != null) { return new DaprSecretsCollectionImpl(inner, this.manager()); } else { 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 444784c197fe..2aa4eff3aa20 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 @@ -15,8 +15,7 @@ public final class DaprSecretsCollectionImpl implements DaprSecretsCollection { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - DaprSecretsCollectionImpl( - DaprSecretsCollectionInner innerObject, + DaprSecretsCollectionImpl(DaprSecretsCollectionInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionImpl.java new file mode 100644 index 000000000000..b503f52d86b1 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionImpl.java @@ -0,0 +1,194 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner; +import com.azure.resourcemanager.appcontainers.models.DaprSubscription; +import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; +import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; +import java.util.Collections; +import java.util.List; +import java.util.Map; + +public final class DaprSubscriptionImpl + implements DaprSubscription, DaprSubscription.Definition, DaprSubscription.Update { + private DaprSubscriptionInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String pubsubName() { + return this.innerModel().pubsubName(); + } + + public String topic() { + return this.innerModel().topic(); + } + + public String deadLetterTopic() { + return this.innerModel().deadLetterTopic(); + } + + public DaprSubscriptionRoutes routes() { + return this.innerModel().routes(); + } + + public List scopes() { + List inner = this.innerModel().scopes(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public Map metadata() { + Map inner = this.innerModel().metadata(); + if (inner != null) { + return Collections.unmodifiableMap(inner); + } else { + return Collections.emptyMap(); + } + } + + public DaprSubscriptionBulkSubscribeOptions bulkSubscribe() { + return this.innerModel().bulkSubscribe(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public DaprSubscriptionInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String environmentName; + + private String name; + + public DaprSubscriptionImpl withExistingManagedEnvironment(String resourceGroupName, String environmentName) { + this.resourceGroupName = resourceGroupName; + this.environmentName = environmentName; + return this; + } + + public DaprSubscription create() { + this.innerObject = serviceManager.serviceClient().getDaprSubscriptions() + .createOrUpdateWithResponse(resourceGroupName, environmentName, name, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public DaprSubscription create(Context context) { + this.innerObject = serviceManager.serviceClient().getDaprSubscriptions() + .createOrUpdateWithResponse(resourceGroupName, environmentName, name, this.innerModel(), context) + .getValue(); + return this; + } + + DaprSubscriptionImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = new DaprSubscriptionInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public DaprSubscriptionImpl update() { + return this; + } + + public DaprSubscription apply() { + this.innerObject = serviceManager.serviceClient().getDaprSubscriptions() + .createOrUpdateWithResponse(resourceGroupName, environmentName, name, this.innerModel(), Context.NONE) + .getValue(); + return this; + } + + public DaprSubscription apply(Context context) { + this.innerObject = serviceManager.serviceClient().getDaprSubscriptions() + .createOrUpdateWithResponse(resourceGroupName, environmentName, name, this.innerModel(), context) + .getValue(); + return this; + } + + DaprSubscriptionImpl(DaprSubscriptionInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.environmentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); + this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "daprSubscriptions"); + } + + public DaprSubscription refresh() { + this.innerObject = serviceManager.serviceClient().getDaprSubscriptions() + .getWithResponse(resourceGroupName, environmentName, name, Context.NONE).getValue(); + return this; + } + + public DaprSubscription refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getDaprSubscriptions() + .getWithResponse(resourceGroupName, environmentName, name, context).getValue(); + return this; + } + + public DaprSubscriptionImpl withPubsubName(String pubsubName) { + this.innerModel().withPubsubName(pubsubName); + return this; + } + + public DaprSubscriptionImpl withTopic(String topic) { + this.innerModel().withTopic(topic); + return this; + } + + public DaprSubscriptionImpl withDeadLetterTopic(String deadLetterTopic) { + this.innerModel().withDeadLetterTopic(deadLetterTopic); + return this; + } + + public DaprSubscriptionImpl withRoutes(DaprSubscriptionRoutes routes) { + this.innerModel().withRoutes(routes); + return this; + } + + public DaprSubscriptionImpl withScopes(List scopes) { + this.innerModel().withScopes(scopes); + return this; + } + + public DaprSubscriptionImpl withMetadata(Map metadata) { + this.innerModel().withMetadata(metadata); + return this; + } + + public DaprSubscriptionImpl withBulkSubscribe(DaprSubscriptionBulkSubscribeOptions bulkSubscribe) { + this.innerModel().withBulkSubscribe(bulkSubscribe); + return this; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionsClientImpl.java new file mode 100644 index 000000000000..d56c8586a2b9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionsClientImpl.java @@ -0,0 +1,753 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.appcontainers.fluent.DaprSubscriptionsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner; +import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionsCollection; +import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DaprSubscriptionsClient. + */ +public final class DaprSubscriptionsClientImpl implements DaprSubscriptionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final DaprSubscriptionsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of DaprSubscriptionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DaprSubscriptionsClientImpl(ContainerAppsApiClientImpl client) { + this.service + = RestProxy.create(DaprSubscriptionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientDaprSubscriptions to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface DaprSubscriptionsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DaprSubscriptionInner daprSubscriptionEnvelope, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/daprSubscriptions/{name}") + @ExpectedResponses({ 200, 204 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the Dapr subscriptions for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Dapr subscriptions for a managed environment along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String environmentName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the Dapr subscriptions for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Dapr subscriptions for a managed environment along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String environmentName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, environmentName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the Dapr subscriptions for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Dapr subscriptions for a managed environment as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String environmentName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Get the Dapr subscriptions for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Dapr subscriptions for a managed environment as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String environmentName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Get the Dapr subscriptions for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Dapr subscriptions for a managed environment as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String environmentName) { + return new PagedIterable<>(listAsync(resourceGroupName, environmentName)); + } + + /** + * Get the Dapr subscriptions for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Dapr subscriptions for a managed environment as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String environmentName, + Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, environmentName, context)); + } + + /** + * Get a dapr subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a dapr subscription along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, + String name) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, name, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a dapr subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a dapr subscription along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, + String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, name, this.client.getApiVersion(), accept, context); + } + + /** + * Get a dapr subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a dapr subscription on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String environmentName, String name) { + return getWithResponseAsync(resourceGroupName, environmentName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a dapr subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a dapr subscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String environmentName, + String name, Context context) { + return getWithResponseAsync(resourceGroupName, environmentName, name, context).block(); + } + + /** + * Get a dapr subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a dapr subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DaprSubscriptionInner get(String resourceGroupName, String environmentName, String name) { + return getWithResponse(resourceGroupName, environmentName, name, Context.NONE).getValue(); + } + + /** + * Creates or updates a Dapr subscription. + * + * Creates or updates a Dapr subscription in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @param daprSubscriptionEnvelope Configuration details of the Dapr subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr PubSub Event Subscription along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String environmentName, String name, DaprSubscriptionInner daprSubscriptionEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (daprSubscriptionEnvelope == null) { + return Mono.error( + new IllegalArgumentException("Parameter daprSubscriptionEnvelope is required and cannot be null.")); + } else { + daprSubscriptionEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, name, this.client.getApiVersion(), daprSubscriptionEnvelope, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a Dapr subscription. + * + * Creates or updates a Dapr subscription in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @param daprSubscriptionEnvelope Configuration details of the Dapr subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr PubSub Event Subscription along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String environmentName, String name, DaprSubscriptionInner daprSubscriptionEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (daprSubscriptionEnvelope == null) { + return Mono.error( + new IllegalArgumentException("Parameter daprSubscriptionEnvelope is required and cannot be null.")); + } else { + daprSubscriptionEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, name, this.client.getApiVersion(), daprSubscriptionEnvelope, accept, context); + } + + /** + * Creates or updates a Dapr subscription. + * + * Creates or updates a Dapr subscription in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @param daprSubscriptionEnvelope Configuration details of the Dapr subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr PubSub Event Subscription on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, + String name, DaprSubscriptionInner daprSubscriptionEnvelope) { + return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, name, daprSubscriptionEnvelope) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Creates or updates a Dapr subscription. + * + * Creates or updates a Dapr subscription in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @param daprSubscriptionEnvelope Configuration details of the Dapr subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr PubSub Event Subscription along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse(String resourceGroupName, String environmentName, + String name, DaprSubscriptionInner daprSubscriptionEnvelope, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, name, daprSubscriptionEnvelope, + context).block(); + } + + /** + * Creates or updates a Dapr subscription. + * + * Creates or updates a Dapr subscription in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @param daprSubscriptionEnvelope Configuration details of the Dapr subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr PubSub Event Subscription. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DaprSubscriptionInner createOrUpdate(String resourceGroupName, String environmentName, String name, + DaprSubscriptionInner daprSubscriptionEnvelope) { + return createOrUpdateWithResponse(resourceGroupName, environmentName, name, daprSubscriptionEnvelope, + Context.NONE).getValue(); + } + + /** + * Delete a Dapr subscription. + * + * Delete a Dapr subscription from a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String environmentName, + String name) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, name, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a Dapr subscription. + * + * Delete a Dapr subscription from a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> deleteWithResponseAsync(String resourceGroupName, String environmentName, String name, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, name, this.client.getApiVersion(), accept, context); + } + + /** + * Delete a Dapr subscription. + * + * Delete a Dapr subscription from a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String environmentName, String name) { + return deleteWithResponseAsync(resourceGroupName, environmentName, name).flatMap(ignored -> Mono.empty()); + } + + /** + * Delete a Dapr subscription. + * + * Delete a Dapr subscription from a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response deleteWithResponse(String resourceGroupName, String environmentName, String name, + Context context) { + return deleteWithResponseAsync(resourceGroupName, environmentName, name, context).block(); + } + + /** + * Delete a Dapr subscription. + * + * Delete a Dapr subscription from a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String environmentName, String name) { + deleteWithResponse(resourceGroupName, environmentName, name, Context.NONE); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr Subscriptions ARM resource along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr Subscriptions ARM resource along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionsImpl.java new file mode 100644 index 000000000000..168ba34fb53d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprSubscriptionsImpl.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.DaprSubscriptionsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner; +import com.azure.resourcemanager.appcontainers.models.DaprSubscription; +import com.azure.resourcemanager.appcontainers.models.DaprSubscriptions; + +public final class DaprSubscriptionsImpl implements DaprSubscriptions { + private static final ClientLogger LOGGER = new ClientLogger(DaprSubscriptionsImpl.class); + + private final DaprSubscriptionsClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public DaprSubscriptionsImpl(DaprSubscriptionsClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String environmentName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DaprSubscriptionImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String environmentName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, environmentName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DaprSubscriptionImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String environmentName, String name, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, environmentName, name, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DaprSubscriptionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DaprSubscription get(String resourceGroupName, String environmentName, String name) { + DaprSubscriptionInner inner = this.serviceClient().get(resourceGroupName, environmentName, name); + if (inner != null) { + return new DaprSubscriptionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse(String resourceGroupName, String environmentName, String name, + Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, name, context); + } + + public void delete(String resourceGroupName, String environmentName, String name) { + this.serviceClient().delete(resourceGroupName, environmentName, name); + } + + public DaprSubscription getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String name = ResourceManagerUtils.getValueFromIdByName(id, "daprSubscriptions"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'daprSubscriptions'.", id))); + } + return this.getWithResponse(resourceGroupName, environmentName, name, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String name = ResourceManagerUtils.getValueFromIdByName(id, "daprSubscriptions"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'daprSubscriptions'.", id))); + } + return this.getWithResponse(resourceGroupName, environmentName, name, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String name = ResourceManagerUtils.getValueFromIdByName(id, "daprSubscriptions"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'daprSubscriptions'.", id))); + } + this.deleteWithResponse(resourceGroupName, environmentName, name, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String name = ResourceManagerUtils.getValueFromIdByName(id, "daprSubscriptions"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'daprSubscriptions'.", id))); + } + return this.deleteWithResponse(resourceGroupName, environmentName, name, context); + } + + private DaprSubscriptionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + public DaprSubscriptionImpl define(String name) { + return new DaprSubscriptionImpl(name, this.manager()); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsCollectionImpl.java index 89edd269aaad..b9602fa4b966 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsCollectionImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsCollectionImpl.java @@ -17,8 +17,7 @@ public final class DiagnosticsCollectionImpl implements DiagnosticsCollection { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - DiagnosticsCollectionImpl( - DiagnosticsCollectionInner innerObject, + DiagnosticsCollectionImpl(DiagnosticsCollectionInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -27,12 +26,8 @@ public final class DiagnosticsCollectionImpl implements DiagnosticsCollection { public List value() { List inner = this.innerModel().value(); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new DiagnosticsImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList( + inner.stream().map(inner1 -> new DiagnosticsImpl(inner1, this.manager())).collect(Collectors.toList())); } else { return Collections.emptyList(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsImpl.java index 40453e7de947..30dee7a892ec 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; import com.azure.resourcemanager.appcontainers.models.Diagnostics; import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; @@ -13,8 +14,8 @@ public final class DiagnosticsImpl implements Diagnostics { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - DiagnosticsImpl( - DiagnosticsInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + DiagnosticsImpl(DiagnosticsInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -35,6 +36,10 @@ public DiagnosticsProperties properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public DiagnosticsInner innerModel() { return this.innerObject; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentImpl.java new file mode 100644 index 000000000000..c575a5b205e3 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentImpl.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner; +import com.azure.resourcemanager.appcontainers.models.DotNetComponent; +import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; +import com.azure.resourcemanager.appcontainers.models.DotNetComponentProvisioningState; +import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; +import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; +import java.util.Collections; +import java.util.List; + +public final class DotNetComponentImpl implements DotNetComponent, DotNetComponent.Definition, DotNetComponent.Update { + private DotNetComponentInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public DotNetComponentType componentType() { + return this.innerModel().componentType(); + } + + public DotNetComponentProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public List configurations() { + List inner = this.innerModel().configurations(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List serviceBinds() { + List inner = this.innerModel().serviceBinds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public DotNetComponentInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String environmentName; + + private String name; + + public DotNetComponentImpl withExistingManagedEnvironment(String resourceGroupName, String environmentName) { + this.resourceGroupName = resourceGroupName; + this.environmentName = environmentName; + return this; + } + + public DotNetComponent create() { + this.innerObject = serviceManager.serviceClient().getDotNetComponents().createOrUpdate(resourceGroupName, + environmentName, name, this.innerModel(), Context.NONE); + return this; + } + + public DotNetComponent create(Context context) { + this.innerObject = serviceManager.serviceClient().getDotNetComponents().createOrUpdate(resourceGroupName, + environmentName, name, this.innerModel(), context); + return this; + } + + DotNetComponentImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = new DotNetComponentInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public DotNetComponentImpl update() { + return this; + } + + public DotNetComponent apply() { + this.innerObject = serviceManager.serviceClient().getDotNetComponents().update(resourceGroupName, + environmentName, name, this.innerModel(), Context.NONE); + return this; + } + + public DotNetComponent apply(Context context) { + this.innerObject = serviceManager.serviceClient().getDotNetComponents().update(resourceGroupName, + environmentName, name, this.innerModel(), context); + return this; + } + + DotNetComponentImpl(DotNetComponentInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.environmentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); + this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "dotNetComponents"); + } + + public DotNetComponent refresh() { + this.innerObject = serviceManager.serviceClient().getDotNetComponents() + .getWithResponse(resourceGroupName, environmentName, name, Context.NONE).getValue(); + return this; + } + + public DotNetComponent refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getDotNetComponents() + .getWithResponse(resourceGroupName, environmentName, name, context).getValue(); + return this; + } + + public DotNetComponentImpl withComponentType(DotNetComponentType componentType) { + this.innerModel().withComponentType(componentType); + return this; + } + + public DotNetComponentImpl withConfigurations(List configurations) { + this.innerModel().withConfigurations(configurations); + return this; + } + + public DotNetComponentImpl withServiceBinds(List serviceBinds) { + this.innerModel().withServiceBinds(serviceBinds); + return this; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentsClientImpl.java new file mode 100644 index 000000000000..33b02f2c79cf --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentsClientImpl.java @@ -0,0 +1,1238 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appcontainers.fluent.DotNetComponentsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner; +import com.azure.resourcemanager.appcontainers.models.DotNetComponentsCollection; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in DotNetComponentsClient. + */ +public final class DotNetComponentsClientImpl implements DotNetComponentsClient { + /** + * The proxy service used to perform REST calls. + */ + private final DotNetComponentsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of DotNetComponentsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + DotNetComponentsClientImpl(ContainerAppsApiClientImpl client) { + this.service + = RestProxy.create(DotNetComponentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientDotNetComponents to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface DotNetComponentsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DotNetComponentInner dotNetComponentEnvelope, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DotNetComponentInner dotNetComponentEnvelope, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/dotNetComponents/{name}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the .NET Components for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the .NET Components for a managed environment along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String environmentName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the .NET Components for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the .NET Components for a managed environment along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String environmentName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, environmentName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the .NET Components for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the .NET Components for a managed environment as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String environmentName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Get the .NET Components for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the .NET Components for a managed environment as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String environmentName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Get the .NET Components for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the .NET Components for a managed environment as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String environmentName) { + return new PagedIterable<>(listAsync(resourceGroupName, environmentName)); + } + + /** + * Get the .NET Components for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the .NET Components for a managed environment as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String environmentName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, environmentName, context)); + } + + /** + * Get a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a .NET Component along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, + String name) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, name, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a .NET Component along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, + String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, name, this.client.getApiVersion(), accept, context); + } + + /** + * Get a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a .NET Component on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String environmentName, String name) { + return getWithResponseAsync(resourceGroupName, environmentName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a .NET Component along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String environmentName, String name, + Context context) { + return getWithResponseAsync(resourceGroupName, environmentName, name, context).block(); + } + + /** + * Get a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a .NET Component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DotNetComponentInner get(String resourceGroupName, String environmentName, String name) { + return getWithResponse(resourceGroupName, environmentName, name, Context.NONE).getValue(); + } + + /** + * Creates or updates a .NET Component. + * + * Creates or updates a .NET Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return .NET Component along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (dotNetComponentEnvelope == null) { + return Mono.error( + new IllegalArgumentException("Parameter dotNetComponentEnvelope is required and cannot be null.")); + } else { + dotNetComponentEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, name, this.client.getApiVersion(), dotNetComponentEnvelope, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a .NET Component. + * + * Creates or updates a .NET Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return .NET Component along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (dotNetComponentEnvelope == null) { + return Mono.error( + new IllegalArgumentException("Parameter dotNetComponentEnvelope is required and cannot be null.")); + } else { + dotNetComponentEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, name, this.client.getApiVersion(), dotNetComponentEnvelope, accept, context); + } + + /** + * Creates or updates a .NET Component. + * + * Creates or updates a .NET Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of .NET Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DotNetComponentInner> beginCreateOrUpdateAsync( + String resourceGroupName, String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DotNetComponentInner.class, DotNetComponentInner.class, this.client.getContext()); + } + + /** + * Creates or updates a .NET Component. + * + * Creates or updates a .NET Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of .NET Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DotNetComponentInner> beginCreateOrUpdateAsync( + String resourceGroupName, String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, environmentName, + name, dotNetComponentEnvelope, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DotNetComponentInner.class, DotNetComponentInner.class, context); + } + + /** + * Creates or updates a .NET Component. + * + * Creates or updates a .NET Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of .NET Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DotNetComponentInner> beginCreateOrUpdate( + String resourceGroupName, String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope) { + return this.beginCreateOrUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope) + .getSyncPoller(); + } + + /** + * Creates or updates a .NET Component. + * + * Creates or updates a .NET Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of .NET Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DotNetComponentInner> beginCreateOrUpdate( + String resourceGroupName, String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope, + Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope, context) + .getSyncPoller(); + } + + /** + * Creates or updates a .NET Component. + * + * Creates or updates a .NET Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return .NET Component on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, + String name, DotNetComponentInner dotNetComponentEnvelope) { + return beginCreateOrUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a .NET Component. + * + * Creates or updates a .NET Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return .NET Component on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, + String name, DotNetComponentInner dotNetComponentEnvelope, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope, context) + .last().flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a .NET Component. + * + * Creates or updates a .NET Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return .NET Component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DotNetComponentInner createOrUpdate(String resourceGroupName, String environmentName, String name, + DotNetComponentInner dotNetComponentEnvelope) { + return createOrUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope).block(); + } + + /** + * Creates or updates a .NET Component. + * + * Creates or updates a .NET Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return .NET Component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DotNetComponentInner createOrUpdate(String resourceGroupName, String environmentName, String name, + DotNetComponentInner dotNetComponentEnvelope, Context context) { + return createOrUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope, context).block(); + } + + /** + * Update properties of a .NET Component + * + * Patches a .NET Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return .NET Component along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String environmentName, + String name, DotNetComponentInner dotNetComponentEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (dotNetComponentEnvelope == null) { + return Mono.error( + new IllegalArgumentException("Parameter dotNetComponentEnvelope is required and cannot be null.")); + } else { + dotNetComponentEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, name, this.client.getApiVersion(), dotNetComponentEnvelope, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update properties of a .NET Component + * + * Patches a .NET Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return .NET Component along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String environmentName, + String name, DotNetComponentInner dotNetComponentEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (dotNetComponentEnvelope == null) { + return Mono.error( + new IllegalArgumentException("Parameter dotNetComponentEnvelope is required and cannot be null.")); + } else { + dotNetComponentEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, name, this.client.getApiVersion(), dotNetComponentEnvelope, accept, context); + } + + /** + * Update properties of a .NET Component + * + * Patches a .NET Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of .NET Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DotNetComponentInner> beginUpdateAsync( + String resourceGroupName, String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DotNetComponentInner.class, DotNetComponentInner.class, this.client.getContext()); + } + + /** + * Update properties of a .NET Component + * + * Patches a .NET Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of .NET Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, DotNetComponentInner> beginUpdateAsync( + String resourceGroupName, String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + DotNetComponentInner.class, DotNetComponentInner.class, context); + } + + /** + * Update properties of a .NET Component + * + * Patches a .NET Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of .NET Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DotNetComponentInner> beginUpdate(String resourceGroupName, + String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope) { + return this.beginUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope).getSyncPoller(); + } + + /** + * Update properties of a .NET Component + * + * Patches a .NET Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of .NET Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, DotNetComponentInner> beginUpdate(String resourceGroupName, + String environmentName, String name, DotNetComponentInner dotNetComponentEnvelope, Context context) { + return this.beginUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope, context) + .getSyncPoller(); + } + + /** + * Update properties of a .NET Component + * + * Patches a .NET Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return .NET Component on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String environmentName, String name, + DotNetComponentInner dotNetComponentEnvelope) { + return beginUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update properties of a .NET Component + * + * Patches a .NET Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return .NET Component on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String environmentName, String name, + DotNetComponentInner dotNetComponentEnvelope, Context context) { + return beginUpdateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update properties of a .NET Component + * + * Patches a .NET Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return .NET Component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DotNetComponentInner update(String resourceGroupName, String environmentName, String name, + DotNetComponentInner dotNetComponentEnvelope) { + return updateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope).block(); + } + + /** + * Update properties of a .NET Component + * + * Patches a .NET Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param dotNetComponentEnvelope Configuration details of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return .NET Component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DotNetComponentInner update(String resourceGroupName, String environmentName, String name, + DotNetComponentInner dotNetComponentEnvelope, Context context) { + return updateAsync(resourceGroupName, environmentName, name, dotNetComponentEnvelope, context).block(); + } + + /** + * Delete a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String environmentName, + String name) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, name, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String environmentName, + String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, name, this.client.getApiVersion(), accept, context); + } + + /** + * Delete a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String environmentName, + String name) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, environmentName, name); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String environmentName, + String name, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, environmentName, name, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName, + String name) { + return this.beginDeleteAsync(resourceGroupName, environmentName, name).getSyncPoller(); + } + + /** + * Delete a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName, String name, + Context context) { + return this.beginDeleteAsync(resourceGroupName, environmentName, name, context).getSyncPoller(); + } + + /** + * Delete a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String environmentName, String name) { + return beginDeleteAsync(resourceGroupName, environmentName, name).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String environmentName, String name, Context context) { + return beginDeleteAsync(resourceGroupName, environmentName, name, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String environmentName, String name) { + deleteAsync(resourceGroupName, environmentName, name).block(); + } + + /** + * Delete a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String environmentName, String name, Context context) { + deleteAsync(resourceGroupName, environmentName, name, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return .NET Components ARM resource along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return .NET Components ARM resource along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentsImpl.java new file mode 100644 index 000000000000..82351e9b232f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DotNetComponentsImpl.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.DotNetComponentsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner; +import com.azure.resourcemanager.appcontainers.models.DotNetComponent; +import com.azure.resourcemanager.appcontainers.models.DotNetComponents; + +public final class DotNetComponentsImpl implements DotNetComponents { + private static final ClientLogger LOGGER = new ClientLogger(DotNetComponentsImpl.class); + + private final DotNetComponentsClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public DotNetComponentsImpl(DotNetComponentsClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String environmentName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DotNetComponentImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String environmentName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, environmentName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new DotNetComponentImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String environmentName, String name, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, environmentName, name, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DotNetComponentImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DotNetComponent get(String resourceGroupName, String environmentName, String name) { + DotNetComponentInner inner = this.serviceClient().get(resourceGroupName, environmentName, name); + if (inner != null) { + return new DotNetComponentImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String environmentName, String name) { + this.serviceClient().delete(resourceGroupName, environmentName, name); + } + + public void delete(String resourceGroupName, String environmentName, String name, Context context) { + this.serviceClient().delete(resourceGroupName, environmentName, name, context); + } + + public DotNetComponent getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String name = ResourceManagerUtils.getValueFromIdByName(id, "dotNetComponents"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dotNetComponents'.", id))); + } + return this.getWithResponse(resourceGroupName, environmentName, name, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String name = ResourceManagerUtils.getValueFromIdByName(id, "dotNetComponents"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dotNetComponents'.", id))); + } + return this.getWithResponse(resourceGroupName, environmentName, name, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String name = ResourceManagerUtils.getValueFromIdByName(id, "dotNetComponents"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dotNetComponents'.", id))); + } + this.delete(resourceGroupName, environmentName, name, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String name = ResourceManagerUtils.getValueFromIdByName(id, "dotNetComponents"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'dotNetComponents'.", id))); + } + this.delete(resourceGroupName, environmentName, name, context); + } + + private DotNetComponentsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + public DotNetComponentImpl define(String name) { + return new DotNetComponentImpl(name, this.manager()); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/EnvironmentAuthTokenImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/EnvironmentAuthTokenImpl.java index c2a56e6d8305..3e719b07d22a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/EnvironmentAuthTokenImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/EnvironmentAuthTokenImpl.java @@ -16,8 +16,7 @@ public final class EnvironmentAuthTokenImpl implements EnvironmentAuthToken { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - EnvironmentAuthTokenImpl( - EnvironmentAuthTokenInner innerObject, + EnvironmentAuthTokenImpl(EnvironmentAuthTokenInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsClientImpl.java new file mode 100644 index 000000000000..5843c01b5c77 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsClientImpl.java @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.appcontainers.fluent.FunctionsExtensionsClient; +import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in FunctionsExtensionsClient. + */ +public final class FunctionsExtensionsClientImpl implements FunctionsExtensionsClient { + /** + * The proxy service used to perform REST calls. + */ + private final FunctionsExtensionsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of FunctionsExtensionsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + FunctionsExtensionsClientImpl(ContainerAppsApiClientImpl client) { + this.service = RestProxy.create(FunctionsExtensionsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientFunctionsExtensions to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface FunctionsExtensionsService { + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps/{containerAppName}/revisions/{revisionName}/providers/Microsoft.App/functions/{functionAppName}/invoke") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> invokeFunctionsHost(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("containerAppName") String containerAppName, @PathParam("revisionName") String revisionName, + @PathParam("functionAppName") String functionAppName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> invokeFunctionsHostWithResponseAsync(String resourceGroupName, + String containerAppName, String revisionName, String functionAppName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + if (revisionName == null) { + return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null.")); + } + if (functionAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter functionAppName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.invokeFunctionsHost(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, containerAppName, revisionName, functionAppName, + this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> invokeFunctionsHostWithResponseAsync(String resourceGroupName, + String containerAppName, String revisionName, String functionAppName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + if (revisionName == null) { + return Mono.error(new IllegalArgumentException("Parameter revisionName is required and cannot be null.")); + } + if (functionAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter functionAppName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.invokeFunctionsHost(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, containerAppName, revisionName, functionAppName, this.client.getApiVersion(), accept, + context); + } + + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono invokeFunctionsHostAsync(String resourceGroupName, String containerAppName, + String revisionName, String functionAppName) { + return invokeFunctionsHostWithResponseAsync(resourceGroupName, containerAppName, revisionName, functionAppName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response invokeFunctionsHostWithResponse(String resourceGroupName, String containerAppName, + String revisionName, String functionAppName, Context context) { + return invokeFunctionsHostWithResponseAsync(resourceGroupName, containerAppName, revisionName, functionAppName, + context).block(); + } + + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public String invokeFunctionsHost(String resourceGroupName, String containerAppName, String revisionName, + String functionAppName) { + return invokeFunctionsHostWithResponse(resourceGroupName, containerAppName, revisionName, functionAppName, + Context.NONE).getValue(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsImpl.java new file mode 100644 index 000000000000..005636921513 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/FunctionsExtensionsImpl.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.FunctionsExtensionsClient; +import com.azure.resourcemanager.appcontainers.models.FunctionsExtensions; + +public final class FunctionsExtensionsImpl implements FunctionsExtensions { + private static final ClientLogger LOGGER = new ClientLogger(FunctionsExtensionsImpl.class); + + private final FunctionsExtensionsClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public FunctionsExtensionsImpl(FunctionsExtensionsClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response invokeFunctionsHostWithResponse(String resourceGroupName, String containerAppName, + String revisionName, String functionAppName, Context context) { + return this.serviceClient().invokeFunctionsHostWithResponse(resourceGroupName, containerAppName, revisionName, + functionAppName, context); + } + + public String invokeFunctionsHost(String resourceGroupName, String containerAppName, String revisionName, + String functionAppName) { + return this.serviceClient().invokeFunctionsHost(resourceGroupName, containerAppName, revisionName, + functionAppName); + } + + private FunctionsExtensionsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentImpl.java new file mode 100644 index 000000000000..66398fe94215 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentImpl.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner; +import com.azure.resourcemanager.appcontainers.models.JavaComponent; +import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; +import com.azure.resourcemanager.appcontainers.models.JavaComponentProvisioningState; +import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; +import com.azure.resourcemanager.appcontainers.models.JavaComponentType; +import java.util.Collections; +import java.util.List; + +public final class JavaComponentImpl implements JavaComponent, JavaComponent.Definition, JavaComponent.Update { + private JavaComponentInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public JavaComponentType componentType() { + return this.innerModel().componentType(); + } + + public JavaComponentProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public List configurations() { + List inner = this.innerModel().configurations(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public List serviceBinds() { + List inner = this.innerModel().serviceBinds(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public JavaComponentInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String environmentName; + + private String name; + + public JavaComponentImpl withExistingManagedEnvironment(String resourceGroupName, String environmentName) { + this.resourceGroupName = resourceGroupName; + this.environmentName = environmentName; + return this; + } + + public JavaComponent create() { + this.innerObject = serviceManager.serviceClient().getJavaComponents().createOrUpdate(resourceGroupName, + environmentName, name, this.innerModel(), Context.NONE); + return this; + } + + public JavaComponent create(Context context) { + this.innerObject = serviceManager.serviceClient().getJavaComponents().createOrUpdate(resourceGroupName, + environmentName, name, this.innerModel(), context); + return this; + } + + JavaComponentImpl(String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = new JavaComponentInner(); + this.serviceManager = serviceManager; + this.name = name; + } + + public JavaComponentImpl update() { + return this; + } + + public JavaComponent apply() { + this.innerObject = serviceManager.serviceClient().getJavaComponents().update(resourceGroupName, environmentName, + name, this.innerModel(), Context.NONE); + return this; + } + + public JavaComponent apply(Context context) { + this.innerObject = serviceManager.serviceClient().getJavaComponents().update(resourceGroupName, environmentName, + name, this.innerModel(), context); + return this; + } + + JavaComponentImpl(JavaComponentInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.environmentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); + this.name = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "javaComponents"); + } + + public JavaComponent refresh() { + this.innerObject = serviceManager.serviceClient().getJavaComponents() + .getWithResponse(resourceGroupName, environmentName, name, Context.NONE).getValue(); + return this; + } + + public JavaComponent refresh(Context context) { + this.innerObject = serviceManager.serviceClient().getJavaComponents() + .getWithResponse(resourceGroupName, environmentName, name, context).getValue(); + return this; + } + + public JavaComponentImpl withComponentType(JavaComponentType componentType) { + this.innerModel().withComponentType(componentType); + return this; + } + + public JavaComponentImpl withConfigurations(List configurations) { + this.innerModel().withConfigurations(configurations); + return this; + } + + public JavaComponentImpl withServiceBinds(List serviceBinds) { + this.innerModel().withServiceBinds(serviceBinds); + return this; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentsClientImpl.java new file mode 100644 index 000000000000..60ad7023f66a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentsClientImpl.java @@ -0,0 +1,1235 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.Patch; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.management.exception.ManagementException; +import com.azure.core.management.polling.PollResult; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.core.util.polling.PollerFlux; +import com.azure.core.util.polling.SyncPoller; +import com.azure.resourcemanager.appcontainers.fluent.JavaComponentsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner; +import com.azure.resourcemanager.appcontainers.models.JavaComponentsCollection; +import java.nio.ByteBuffer; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in JavaComponentsClient. + */ +public final class JavaComponentsClientImpl implements JavaComponentsClient { + /** + * The proxy service used to perform REST calls. + */ + private final JavaComponentsService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of JavaComponentsClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + JavaComponentsClientImpl(ContainerAppsApiClientImpl client) { + this.service + = RestProxy.create(JavaComponentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientJavaComponents to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface JavaComponentsService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/javaComponents") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/javaComponents/{name}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/javaComponents/{name}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> createOrUpdate(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") JavaComponentInner javaComponentEnvelope, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/javaComponents/{name}") + @ExpectedResponses({ 200, 202 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> update(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") JavaComponentInner javaComponentEnvelope, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/javaComponents/{name}") + @ExpectedResponses({ 202, 204 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono>> delete(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, @PathParam("name") String name, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> listNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the Java Components for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Java Components for a managed environment along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String environmentName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the Java Components for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Java Components for a managed environment along with {@link PagedResponse} on successful completion + * of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, + String environmentName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, environmentName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Get the Java Components for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Java Components for a managed environment as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String environmentName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Get the Java Components for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Java Components for a managed environment as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String environmentName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Get the Java Components for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Java Components for a managed environment as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String environmentName) { + return new PagedIterable<>(listAsync(resourceGroupName, environmentName)); + } + + /** + * Get the Java Components for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Java Components for a managed environment as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String environmentName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, environmentName, context)); + } + + /** + * Get a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Java Component along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, + String name) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, name, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Java Component along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getWithResponseAsync(String resourceGroupName, String environmentName, + String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, name, this.client.getApiVersion(), accept, context); + } + + /** + * Get a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Java Component on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String resourceGroupName, String environmentName, String name) { + return getWithResponseAsync(resourceGroupName, environmentName, name) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Java Component along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String resourceGroupName, String environmentName, String name, + Context context) { + return getWithResponseAsync(resourceGroupName, environmentName, name, context).block(); + } + + /** + * Get a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Java Component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public JavaComponentInner get(String resourceGroupName, String environmentName, String name) { + return getWithResponse(resourceGroupName, environmentName, name, Context.NONE).getValue(); + } + + /** + * Creates or updates a Java Component. + * + * Creates or updates a Java Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return java Component along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String environmentName, String name, JavaComponentInner javaComponentEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (javaComponentEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter javaComponentEnvelope is required and cannot be null.")); + } else { + javaComponentEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, name, this.client.getApiVersion(), javaComponentEnvelope, accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Creates or updates a Java Component. + * + * Creates or updates a Java Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return java Component along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String environmentName, String name, JavaComponentInner javaComponentEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (javaComponentEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter javaComponentEnvelope is required and cannot be null.")); + } else { + javaComponentEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, name, this.client.getApiVersion(), javaComponentEnvelope, accept, context); + } + + /** + * Creates or updates a Java Component. + * + * Creates or updates a Java Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of java Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, JavaComponentInner> beginCreateOrUpdateAsync( + String resourceGroupName, String environmentName, String name, JavaComponentInner javaComponentEnvelope) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, environmentName, name, javaComponentEnvelope); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + JavaComponentInner.class, JavaComponentInner.class, this.client.getContext()); + } + + /** + * Creates or updates a Java Component. + * + * Creates or updates a Java Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of java Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, JavaComponentInner> beginCreateOrUpdateAsync( + String resourceGroupName, String environmentName, String name, JavaComponentInner javaComponentEnvelope, + Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, environmentName, name, javaComponentEnvelope, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + JavaComponentInner.class, JavaComponentInner.class, context); + } + + /** + * Creates or updates a Java Component. + * + * Creates or updates a Java Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of java Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, JavaComponentInner> beginCreateOrUpdate(String resourceGroupName, + String environmentName, String name, JavaComponentInner javaComponentEnvelope) { + return this.beginCreateOrUpdateAsync(resourceGroupName, environmentName, name, javaComponentEnvelope) + .getSyncPoller(); + } + + /** + * Creates or updates a Java Component. + * + * Creates or updates a Java Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of java Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, JavaComponentInner> beginCreateOrUpdate(String resourceGroupName, + String environmentName, String name, JavaComponentInner javaComponentEnvelope, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, environmentName, name, javaComponentEnvelope, context) + .getSyncPoller(); + } + + /** + * Creates or updates a Java Component. + * + * Creates or updates a Java Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return java Component on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, String name, + JavaComponentInner javaComponentEnvelope) { + return beginCreateOrUpdateAsync(resourceGroupName, environmentName, name, javaComponentEnvelope).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a Java Component. + * + * Creates or updates a Java Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return java Component on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, String name, + JavaComponentInner javaComponentEnvelope, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, environmentName, name, javaComponentEnvelope, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Creates or updates a Java Component. + * + * Creates or updates a Java Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return java Component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public JavaComponentInner createOrUpdate(String resourceGroupName, String environmentName, String name, + JavaComponentInner javaComponentEnvelope) { + return createOrUpdateAsync(resourceGroupName, environmentName, name, javaComponentEnvelope).block(); + } + + /** + * Creates or updates a Java Component. + * + * Creates or updates a Java Component in a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return java Component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public JavaComponentInner createOrUpdate(String resourceGroupName, String environmentName, String name, + JavaComponentInner javaComponentEnvelope, Context context) { + return createOrUpdateAsync(resourceGroupName, environmentName, name, javaComponentEnvelope, context).block(); + } + + /** + * Update properties of a Java Component + * + * Patches a Java Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return java Component along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String environmentName, + String name, JavaComponentInner javaComponentEnvelope) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (javaComponentEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter javaComponentEnvelope is required and cannot be null.")); + } else { + javaComponentEnvelope.validate(); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, name, this.client.getApiVersion(), javaComponentEnvelope, accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Update properties of a Java Component + * + * Patches a Java Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return java Component along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> updateWithResponseAsync(String resourceGroupName, String environmentName, + String name, JavaComponentInner javaComponentEnvelope, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + if (javaComponentEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter javaComponentEnvelope is required and cannot be null.")); + } else { + javaComponentEnvelope.validate(); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, name, this.client.getApiVersion(), javaComponentEnvelope, accept, context); + } + + /** + * Update properties of a Java Component + * + * Patches a Java Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of java Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, JavaComponentInner> beginUpdateAsync(String resourceGroupName, + String environmentName, String name, JavaComponentInner javaComponentEnvelope) { + Mono>> mono + = updateWithResponseAsync(resourceGroupName, environmentName, name, javaComponentEnvelope); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + JavaComponentInner.class, JavaComponentInner.class, this.client.getContext()); + } + + /** + * Update properties of a Java Component + * + * Patches a Java Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of java Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, JavaComponentInner> beginUpdateAsync(String resourceGroupName, + String environmentName, String name, JavaComponentInner javaComponentEnvelope, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, environmentName, name, javaComponentEnvelope, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), + JavaComponentInner.class, JavaComponentInner.class, context); + } + + /** + * Update properties of a Java Component + * + * Patches a Java Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of java Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, JavaComponentInner> beginUpdate(String resourceGroupName, + String environmentName, String name, JavaComponentInner javaComponentEnvelope) { + return this.beginUpdateAsync(resourceGroupName, environmentName, name, javaComponentEnvelope).getSyncPoller(); + } + + /** + * Update properties of a Java Component + * + * Patches a Java Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of java Component. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, JavaComponentInner> beginUpdate(String resourceGroupName, + String environmentName, String name, JavaComponentInner javaComponentEnvelope, Context context) { + return this.beginUpdateAsync(resourceGroupName, environmentName, name, javaComponentEnvelope, context) + .getSyncPoller(); + } + + /** + * Update properties of a Java Component + * + * Patches a Java Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return java Component on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String environmentName, String name, + JavaComponentInner javaComponentEnvelope) { + return beginUpdateAsync(resourceGroupName, environmentName, name, javaComponentEnvelope).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update properties of a Java Component + * + * Patches a Java Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return java Component on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String environmentName, String name, + JavaComponentInner javaComponentEnvelope, Context context) { + return beginUpdateAsync(resourceGroupName, environmentName, name, javaComponentEnvelope, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Update properties of a Java Component + * + * Patches a Java Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return java Component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public JavaComponentInner update(String resourceGroupName, String environmentName, String name, + JavaComponentInner javaComponentEnvelope) { + return updateAsync(resourceGroupName, environmentName, name, javaComponentEnvelope).block(); + } + + /** + * Update properties of a Java Component + * + * Patches a Java Component using JSON Merge Patch. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param javaComponentEnvelope Configuration details of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return java Component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public JavaComponentInner update(String resourceGroupName, String environmentName, String name, + JavaComponentInner javaComponentEnvelope, Context context) { + return updateAsync(resourceGroupName, environmentName, name, javaComponentEnvelope, context).block(); + } + + /** + * Delete a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String environmentName, + String name) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, name, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Delete a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono>> deleteWithResponseAsync(String resourceGroupName, String environmentName, + String name, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + if (name == null) { + return Mono.error(new IllegalArgumentException("Parameter name is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, name, this.client.getApiVersion(), accept, context); + } + + /** + * Delete a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String environmentName, + String name) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, environmentName, name); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); + } + + /** + * Delete a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link PollerFlux} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String environmentName, + String name, Context context) { + context = this.client.mergeContext(context); + Mono>> mono + = deleteWithResponseAsync(resourceGroupName, environmentName, name, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); + } + + /** + * Delete a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName, + String name) { + return this.beginDeleteAsync(resourceGroupName, environmentName, name).getSyncPoller(); + } + + /** + * Delete a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of long-running operation. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName, String name, + Context context) { + return this.beginDeleteAsync(resourceGroupName, environmentName, name, context).getSyncPoller(); + } + + /** + * Delete a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String environmentName, String name) { + return beginDeleteAsync(resourceGroupName, environmentName, name).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return A {@link Mono} that completes when a successful response is received. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono deleteAsync(String resourceGroupName, String environmentName, String name, Context context) { + return beginDeleteAsync(resourceGroupName, environmentName, name, context).last() + .flatMap(this.client::getLroFinalResultOrError); + } + + /** + * Delete a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String environmentName, String name) { + deleteAsync(resourceGroupName, environmentName, name).block(); + } + + /** + * Delete a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public void delete(String resourceGroupName, String environmentName, String name, Context context) { + deleteAsync(resourceGroupName, environmentName, name, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return java Components ARM resource along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return java Components ARM resource along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentsImpl.java new file mode 100644 index 000000000000..1c820fa61d33 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JavaComponentsImpl.java @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.JavaComponentsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner; +import com.azure.resourcemanager.appcontainers.models.JavaComponent; +import com.azure.resourcemanager.appcontainers.models.JavaComponents; + +public final class JavaComponentsImpl implements JavaComponents { + private static final ClientLogger LOGGER = new ClientLogger(JavaComponentsImpl.class); + + private final JavaComponentsClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public JavaComponentsImpl(JavaComponentsClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String environmentName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new JavaComponentImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String environmentName, Context context) { + PagedIterable inner + = this.serviceClient().list(resourceGroupName, environmentName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new JavaComponentImpl(inner1, this.manager())); + } + + public Response getWithResponse(String resourceGroupName, String environmentName, String name, + Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, environmentName, name, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new JavaComponentImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public JavaComponent get(String resourceGroupName, String environmentName, String name) { + JavaComponentInner inner = this.serviceClient().get(resourceGroupName, environmentName, name); + if (inner != null) { + return new JavaComponentImpl(inner, this.manager()); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String environmentName, String name) { + this.serviceClient().delete(resourceGroupName, environmentName, name); + } + + public void delete(String resourceGroupName, String environmentName, String name, Context context) { + this.serviceClient().delete(resourceGroupName, environmentName, name, context); + } + + public JavaComponent getById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String name = ResourceManagerUtils.getValueFromIdByName(id, "javaComponents"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'javaComponents'.", id))); + } + return this.getWithResponse(resourceGroupName, environmentName, name, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String name = ResourceManagerUtils.getValueFromIdByName(id, "javaComponents"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'javaComponents'.", id))); + } + return this.getWithResponse(resourceGroupName, environmentName, name, context); + } + + public void deleteById(String id) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String name = ResourceManagerUtils.getValueFromIdByName(id, "javaComponents"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'javaComponents'.", id))); + } + this.delete(resourceGroupName, environmentName, name, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); + if (environmentName == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String name = ResourceManagerUtils.getValueFromIdByName(id, "javaComponents"); + if (name == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'javaComponents'.", id))); + } + this.delete(resourceGroupName, environmentName, name, context); + } + + private JavaComponentsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + public JavaComponentImpl define(String name) { + return new JavaComponentImpl(name, this.manager()); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionBaseImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionBaseImpl.java index 78e2d345844d..6f069589b1a4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionBaseImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionBaseImpl.java @@ -12,8 +12,7 @@ public final class JobExecutionBaseImpl implements JobExecutionBase { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - JobExecutionBaseImpl( - JobExecutionBaseInner innerObject, + JobExecutionBaseImpl(JobExecutionBaseInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionImpl.java index 16c34c6f7556..a763cde3740e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobExecutionImpl.java @@ -15,8 +15,8 @@ public final class JobExecutionImpl implements JobExecution { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - JobExecutionImpl( - JobExecutionInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + JobExecutionImpl(JobExecutionInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobImpl.java index 0ff3f79f0cdf..73af308a860d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobImpl.java @@ -10,6 +10,7 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.JobInner; import com.azure.resourcemanager.appcontainers.models.ContainerAppJobExecutions; +import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; import com.azure.resourcemanager.appcontainers.models.Job; import com.azure.resourcemanager.appcontainers.models.JobConfiguration; import com.azure.resourcemanager.appcontainers.models.JobExecutionBase; @@ -54,6 +55,10 @@ public Map tags() { } } + public ExtendedLocation extendedLocation() { + return this.innerModel().extendedLocation(); + } + public ManagedServiceIdentity identity() { return this.innerModel().identity(); } @@ -127,20 +132,14 @@ public JobImpl withExistingResourceGroup(String resourceGroupName) { } public Job create() { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .createOrUpdate(resourceGroupName, jobName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getJobs().createOrUpdate(resourceGroupName, jobName, + this.innerModel(), Context.NONE); return this; } public Job create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .createOrUpdate(resourceGroupName, jobName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getJobs().createOrUpdate(resourceGroupName, jobName, + this.innerModel(), context); return this; } @@ -156,44 +155,33 @@ public JobImpl update() { } public Job apply() { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .update(resourceGroupName, jobName, updateJobEnvelope, Context.NONE); + this.innerObject = serviceManager.serviceClient().getJobs().update(resourceGroupName, jobName, + updateJobEnvelope, Context.NONE); return this; } public Job apply(Context context) { - this.innerObject = - serviceManager.serviceClient().getJobs().update(resourceGroupName, jobName, updateJobEnvelope, context); + this.innerObject + = serviceManager.serviceClient().getJobs().update(resourceGroupName, jobName, updateJobEnvelope, context); return this; } JobImpl(JobInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.jobName = Utils.getValueFromIdByName(innerObject.id(), "jobs"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.jobName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "jobs"); } public Job refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .getByResourceGroupWithResponse(resourceGroupName, jobName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getJobs() + .getByResourceGroupWithResponse(resourceGroupName, jobName, Context.NONE).getValue(); return this; } public Job refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getJobs() - .getByResourceGroupWithResponse(resourceGroupName, jobName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getJobs() + .getByResourceGroupWithResponse(resourceGroupName, jobName, context).getValue(); return this; } @@ -241,6 +229,16 @@ public JobImpl withTags(Map tags) { } } + public JobImpl withExtendedLocation(ExtendedLocation extendedLocation) { + if (isInCreateMode()) { + this.innerModel().withExtendedLocation(extendedLocation); + return this; + } else { + this.updateJobEnvelope.withExtendedLocation(extendedLocation); + return this; + } + } + public JobImpl withIdentity(ManagedServiceIdentity identity) { if (isInCreateMode()) { this.innerModel().withIdentity(identity); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobSecretsCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobSecretsCollectionImpl.java index 552293d405e1..ebec3ac60e34 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobSecretsCollectionImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobSecretsCollectionImpl.java @@ -15,8 +15,7 @@ public final class JobSecretsCollectionImpl implements JobSecretsCollection { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - JobSecretsCollectionImpl( - JobSecretsCollectionInner innerObject, + JobSecretsCollectionImpl(JobSecretsCollectionInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsClientImpl.java index e39425f9ec65..e8a3e69f1368 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsClientImpl.java @@ -34,6 +34,8 @@ import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.appcontainers.fluent.JobsClient; import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppJobExecutionsInner; +import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; +import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionBaseInner; import com.azure.resourcemanager.appcontainers.fluent.models.JobInner; import com.azure.resourcemanager.appcontainers.fluent.models.JobSecretsCollectionInner; @@ -45,17 +47,23 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in JobsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobsClient. + */ public final class JobsClientImpl implements JobsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final JobsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerAppsApiClientImpl client; /** * Initializes an instance of JobsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ JobsClientImpl(ContainerAppsApiClientImpl client) { @@ -64,277 +72,623 @@ public final class JobsClientImpl implements JobsClient { } /** - * The interface defining all the services for ContainerAppsApiClientJobs to be used by the proxy service to perform - * REST calls. + * The interface defining all the services for ContainerAppsApiClientJobs to be used by the proxy service to + * perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") public interface JobsService { - @Headers({"Content-Type: application/json"}) - @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/jobs") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/detectors") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listDetectors(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/detectors/{detectorName}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getDetector(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, + @PathParam("detectorName") String detectorName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/detectorProperties/{apiName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> proxyGet(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, + @PathParam("apiName") String apiName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/jobs") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}") - @ExpectedResponses({200}) + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}") - @ExpectedResponses({200, 201}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") JobInner jobEnvelope, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}") - @ExpectedResponses({200, 202, 204}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") JobInner jobEnvelope, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}") - @ExpectedResponses({200, 202}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> update( - @HostParam("$host") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") JobPatchProperties jobEnvelope, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/start") - @ExpectedResponses({200, 202}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") JobPatchProperties jobEnvelope, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/start") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> start( - @HostParam("$host") String endpoint, + Mono>> start(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, - @BodyParam("application/json") JobExecutionTemplate template, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName}/stop") - @ExpectedResponses({200, 202}) + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, + @QueryParam("api-version") String apiVersion, @BodyParam("application/json") JobExecutionTemplate template, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName}/stop") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> stopExecution( - @HostParam("$host") String endpoint, + Mono>> stopExecution(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("jobName") String jobName, - @PathParam("jobExecutionName") String jobExecutionName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/stop") - @ExpectedResponses({200, 202}) + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("jobName") String jobName, @PathParam("jobExecutionName") String jobExecutionName, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/stop") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> stopMultipleExecutions( - @HostParam("$host") String endpoint, + Mono>> stopMultipleExecutions(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("jobName") String jobName, - @HeaderParam("Accept") String accept, - Context context); - - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/listSecrets") - @ExpectedResponses({200}) + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("jobName") String jobName, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/listSecrets") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listSecrets( - @HostParam("$host") String endpoint, + Mono> listSecrets(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("jobName") String jobName, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("jobName") String jobName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); + } + + /** + * Get the list of diagnostics for a given Container App Job. + * + * Get the list of diagnostics for a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of diagnostics for a Container App Job along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDetectorsWithResponseAsync(String resourceGroupName, + String jobName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (jobName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.listDetectors(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, jobName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the list of diagnostics for a given Container App Job. + * + * Get the list of diagnostics for a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of diagnostics for a Container App Job along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDetectorsWithResponseAsync(String resourceGroupName, + String jobName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (jobName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listDetectors(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + jobName, this.client.getApiVersion(), accept, context); + } + + /** + * Get the list of diagnostics for a given Container App Job. + * + * Get the list of diagnostics for a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of diagnostics for a Container App Job on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listDetectorsAsync(String resourceGroupName, String jobName) { + return listDetectorsWithResponseAsync(resourceGroupName, jobName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the list of diagnostics for a given Container App Job. + * + * Get the list of diagnostics for a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of diagnostics for a Container App Job along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listDetectorsWithResponse(String resourceGroupName, String jobName, + Context context) { + return listDetectorsWithResponseAsync(resourceGroupName, jobName, context).block(); + } + + /** + * Get the list of diagnostics for a given Container App Job. + * + * Get the list of diagnostics for a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of diagnostics for a Container App Job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiagnosticsCollectionInner listDetectors(String resourceGroupName, String jobName) { + return listDetectorsWithResponse(resourceGroupName, jobName, Context.NONE).getValue(); + } + + /** + * Get the diagnostics data for a given Container App Job. + * + * Get the diagnostics data for a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param detectorName Name of the Container App Job detector. + * @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 diagnostics data for a Container App Job along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDetectorWithResponseAsync(String resourceGroupName, String jobName, + String detectorName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (jobName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); + } + if (detectorName == null) { + return Mono.error(new IllegalArgumentException("Parameter detectorName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getDetector(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, jobName, detectorName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the diagnostics data for a given Container App Job. + * + * Get the diagnostics data for a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param detectorName Name of the Container App Job detector. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostics data for a Container App Job along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getDetectorWithResponseAsync(String resourceGroupName, String jobName, + String detectorName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (jobName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); + } + if (detectorName == null) { + return Mono.error(new IllegalArgumentException("Parameter detectorName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getDetector(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + jobName, detectorName, this.client.getApiVersion(), accept, context); + } + + /** + * Get the diagnostics data for a given Container App Job. + * + * Get the diagnostics data for a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param detectorName Name of the Container App Job detector. + * @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 diagnostics data for a Container App Job on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getDetectorAsync(String resourceGroupName, String jobName, String detectorName) { + return getDetectorWithResponseAsync(resourceGroupName, jobName, detectorName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the diagnostics data for a given Container App Job. + * + * Get the diagnostics data for a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param detectorName Name of the Container App Job detector. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the diagnostics data for a Container App Job along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDetectorWithResponse(String resourceGroupName, String jobName, + String detectorName, Context context) { + return getDetectorWithResponseAsync(resourceGroupName, jobName, detectorName, context).block(); + } + + /** + * Get the diagnostics data for a given Container App Job. + * + * Get the diagnostics data for a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param detectorName Name of the Container App Job detector. + * @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 diagnostics data for a Container App Job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiagnosticsInner getDetector(String resourceGroupName, String jobName, String detectorName) { + return getDetectorWithResponse(resourceGroupName, jobName, detectorName, Context.NONE).getValue(); + } + + /** + * Get the properties for a given Container App Job. + * + * Get the properties of a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a Container App Job along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> proxyGetWithResponseAsync(String resourceGroupName, String jobName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (jobName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); + } + final String apiName = "rootApi"; + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.proxyGet(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, jobName, apiName, this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the properties for a given Container App Job. + * + * Get the properties of a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a Container App Job along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> proxyGetWithResponseAsync(String resourceGroupName, String jobName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (jobName == null) { + return Mono.error(new IllegalArgumentException("Parameter jobName is required and cannot be null.")); + } + final String apiName = "rootApi"; + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.proxyGet(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, jobName, + apiName, this.client.getApiVersion(), accept, context); + } + + /** + * Get the properties for a given Container App Job. + * + * Get the properties of a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a Container App Job on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono proxyGetAsync(String resourceGroupName, String jobName) { + return proxyGetWithResponseAsync(resourceGroupName, jobName).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the properties for a given Container App Job. + * + * Get the properties of a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a Container App Job along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response proxyGetWithResponse(String resourceGroupName, String jobName, Context context) { + return proxyGetWithResponseAsync(resourceGroupName, jobName, context).block(); + } + + /** + * Get the properties for a given Container App Job. + * + * Get the properties of a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a Container App Job. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public JobInner proxyGet(String resourceGroupName, String jobName) { + return proxyGetWithResponse(resourceGroupName, jobName, Context.NONE).getValue(); } /** * Get the Container Apps Jobs in a given subscription. - * + * * @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 Container Apps Jobs in a given subscription along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the Container Apps Jobs in a given subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Container Apps Jobs in a given subscription along with {@link PagedResponse} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the Container Apps Jobs in a given subscription. - * + * * @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 Container Apps Jobs in a given subscription as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** * Get the Container Apps Jobs in a given subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -343,13 +697,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** * Get the Container Apps Jobs in a given subscription. - * + * * @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 Container Apps Jobs in a given subscription as paginated response with {@link PagedIterable}. @@ -361,7 +715,7 @@ public PagedIterable list() { /** * Get the Container Apps Jobs in a given subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -375,27 +729,23 @@ public PagedIterable list(Context context) { /** * Get the Container Apps Jobs in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 Container Apps Jobs in a given resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -403,53 +753,34 @@ private Mono> listByResourceGroupSinglePageAsync(String } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the Container Apps Jobs in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Container Apps Jobs in a given resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -458,27 +789,15 @@ private Mono> listByResourceGroupSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the Container Apps Jobs in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -487,14 +806,13 @@ private Mono> listByResourceGroupSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Get the Container Apps Jobs in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -504,14 +822,13 @@ private PagedFlux listByResourceGroupAsync(String resourceGroupName) { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * Get the Container Apps Jobs in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -525,7 +842,7 @@ public PagedIterable listByResourceGroup(String resourceGroupName) { /** * Get the Container Apps Jobs in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -540,28 +857,24 @@ public PagedIterable listByResourceGroup(String resourceGroupName, Con /** * Get the properties of a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Container Apps Job along with {@link Response} on successful completion of {@link - * Mono}. + * @return the properties of a Container Apps Job along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String jobName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -573,45 +886,33 @@ private Mono> getByResourceGroupWithResponseAsync(String reso final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - jobName, - this.client.getApiVersion(), - accept, - context)) + context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, jobName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the properties of a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Container Apps Job along with {@link Response} on successful completion of {@link - * Mono}. + * @return the properties of a Container Apps Job along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String jobName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, String jobName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -622,20 +923,13 @@ private Mono> getByResourceGroupWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - jobName, - this.client.getApiVersion(), - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + jobName, this.client.getApiVersion(), accept, context); } /** * Get the properties of a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -651,7 +945,7 @@ private Mono getByResourceGroupAsync(String resourceGroupName, String /** * Get the properties of a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param context The context to associate with this operation. @@ -661,14 +955,14 @@ private Mono getByResourceGroupAsync(String resourceGroupName, String * @return the properties of a Container Apps Job along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String jobName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, String jobName, + Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, jobName, context).block(); } /** * Get the properties of a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -683,7 +977,7 @@ public JobInner getByResourceGroup(String resourceGroupName, String jobName) { /** * Create or Update a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. @@ -693,19 +987,15 @@ public JobInner getByResourceGroup(String resourceGroupName, String jobName) { * @return container App Job along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String jobName, JobInner jobEnvelope) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String jobName, + JobInner jobEnvelope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -721,24 +1011,14 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - jobName, - this.client.getApiVersion(), - jobEnvelope, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, jobName, this.client.getApiVersion(), jobEnvelope, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create or Update a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. @@ -749,19 +1029,15 @@ private Mono>> createOrUpdateWithResponseAsync( * @return container App Job along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, String jobName, JobInner jobEnvelope, Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, String jobName, + JobInner jobEnvelope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -777,21 +1053,13 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - jobName, - this.client.getApiVersion(), - jobEnvelope, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + jobName, this.client.getApiVersion(), jobEnvelope, accept, context); } /** * Create or Update a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. @@ -801,19 +1069,17 @@ private Mono>> createOrUpdateWithResponseAsync( * @return the {@link PollerFlux} for polling of container App Job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobInner> beginCreateOrUpdateAsync( - String resourceGroupName, String jobName, JobInner jobEnvelope) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, jobName, jobEnvelope); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), JobInner.class, JobInner.class, this.client.getContext()); + private PollerFlux, JobInner> beginCreateOrUpdateAsync(String resourceGroupName, + String jobName, JobInner jobEnvelope) { + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, jobName, jobEnvelope); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, + JobInner.class, this.client.getContext()); } /** * Create or Update a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. @@ -824,20 +1090,18 @@ private PollerFlux, JobInner> beginCreateOrUpdateAsync( * @return the {@link PollerFlux} for polling of container App Job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobInner> beginCreateOrUpdateAsync( - String resourceGroupName, String jobName, JobInner jobEnvelope, Context context) { + private PollerFlux, JobInner> beginCreateOrUpdateAsync(String resourceGroupName, + String jobName, JobInner jobEnvelope, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, jobName, jobEnvelope, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), JobInner.class, JobInner.class, context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, jobName, jobEnvelope, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, + JobInner.class, context); } /** * Create or Update a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. @@ -847,14 +1111,14 @@ private PollerFlux, JobInner> beginCreateOrUpdateAsync( * @return the {@link SyncPoller} for polling of container App Job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobInner> beginCreateOrUpdate( - String resourceGroupName, String jobName, JobInner jobEnvelope) { + public SyncPoller, JobInner> beginCreateOrUpdate(String resourceGroupName, String jobName, + JobInner jobEnvelope) { return this.beginCreateOrUpdateAsync(resourceGroupName, jobName, jobEnvelope).getSyncPoller(); } /** * Create or Update a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. @@ -865,14 +1129,14 @@ public SyncPoller, JobInner> beginCreateOrUpdate( * @return the {@link SyncPoller} for polling of container App Job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobInner> beginCreateOrUpdate( - String resourceGroupName, String jobName, JobInner jobEnvelope, Context context) { + public SyncPoller, JobInner> beginCreateOrUpdate(String resourceGroupName, String jobName, + JobInner jobEnvelope, Context context) { return this.beginCreateOrUpdateAsync(resourceGroupName, jobName, jobEnvelope, context).getSyncPoller(); } /** * Create or Update a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. @@ -883,14 +1147,13 @@ public SyncPoller, JobInner> beginCreateOrUpdate( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync(String resourceGroupName, String jobName, JobInner jobEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, jobName, jobEnvelope) - .last() + return beginCreateOrUpdateAsync(resourceGroupName, jobName, jobEnvelope).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create or Update a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. @@ -901,16 +1164,15 @@ private Mono createOrUpdateAsync(String resourceGroupName, String jobN * @return container App Job on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String jobName, JobInner jobEnvelope, Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, jobName, jobEnvelope, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String jobName, JobInner jobEnvelope, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, jobName, jobEnvelope, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Create or Update a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. @@ -926,7 +1188,7 @@ public JobInner createOrUpdate(String resourceGroupName, String jobName, JobInne /** * Create or Update a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. @@ -943,7 +1205,7 @@ public JobInner createOrUpdate(String resourceGroupName, String jobName, JobInne /** * Delete a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -954,16 +1216,12 @@ public JobInner createOrUpdate(String resourceGroupName, String jobName, JobInne @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String jobName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -974,23 +1232,14 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - jobName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, jobName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param context The context to associate with this operation. @@ -1000,19 +1249,15 @@ private Mono>> deleteWithResponseAsync(String resource * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String jobName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String jobName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1023,20 +1268,13 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - jobName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, jobName, + this.client.getApiVersion(), accept, context); } /** * Delete a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1047,15 +1285,13 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String jobName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, jobName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param context The context to associate with this operation. @@ -1065,18 +1301,17 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String jobName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String jobName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceGroupName, jobName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1091,7 +1326,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Delete a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param context The context to associate with this operation. @@ -1107,7 +1342,7 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Delete a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1122,7 +1357,7 @@ private Mono deleteAsync(String resourceGroupName, String jobName) { /** * Delete a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param context The context to associate with this operation. @@ -1133,14 +1368,13 @@ private Mono deleteAsync(String resourceGroupName, String jobName) { */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String jobName, Context context) { - return beginDeleteAsync(resourceGroupName, jobName, context) - .last() + return beginDeleteAsync(resourceGroupName, jobName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1154,7 +1388,7 @@ public void delete(String resourceGroupName, String jobName) { /** * Delete a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param context The context to associate with this operation. @@ -1169,9 +1403,9 @@ public void delete(String resourceGroupName, String jobName, Context context) { /** * Update properties of a Container Apps Job - * - *

Patches a Container Apps Job using JSON Merge Patch. - * + * + * Patches a Container Apps Job using JSON Merge Patch. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. @@ -1181,19 +1415,15 @@ public void delete(String resourceGroupName, String jobName, Context context) { * @return container App Job along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String jobName, JobPatchProperties jobEnvelope) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String jobName, + JobPatchProperties jobEnvelope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1209,26 +1439,16 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - jobName, - this.client.getApiVersion(), - jobEnvelope, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, jobName, this.client.getApiVersion(), jobEnvelope, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update properties of a Container Apps Job - * - *

Patches a Container Apps Job using JSON Merge Patch. - * + * + * Patches a Container Apps Job using JSON Merge Patch. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. @@ -1239,19 +1459,15 @@ private Mono>> updateWithResponseAsync( * @return container App Job along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> updateWithResponseAsync( - String resourceGroupName, String jobName, JobPatchProperties jobEnvelope, Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String jobName, + JobPatchProperties jobEnvelope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1267,23 +1483,15 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - jobName, - this.client.getApiVersion(), - jobEnvelope, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, jobName, + this.client.getApiVersion(), jobEnvelope, accept, context); } /** * Update properties of a Container Apps Job - * - *

Patches a Container Apps Job using JSON Merge Patch. - * + * + * Patches a Container Apps Job using JSON Merge Patch. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. @@ -1293,20 +1501,18 @@ private Mono>> updateWithResponseAsync( * @return the {@link PollerFlux} for polling of container App Job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobInner> beginUpdateAsync( - String resourceGroupName, String jobName, JobPatchProperties jobEnvelope) { + private PollerFlux, JobInner> beginUpdateAsync(String resourceGroupName, String jobName, + JobPatchProperties jobEnvelope) { Mono>> mono = updateWithResponseAsync(resourceGroupName, jobName, jobEnvelope); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), JobInner.class, JobInner.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, + JobInner.class, this.client.getContext()); } /** * Update properties of a Container Apps Job - * - *

Patches a Container Apps Job using JSON Merge Patch. - * + * + * Patches a Container Apps Job using JSON Merge Patch. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. @@ -1317,22 +1523,20 @@ private PollerFlux, JobInner> beginUpdateAsync( * @return the {@link PollerFlux} for polling of container App Job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobInner> beginUpdateAsync( - String resourceGroupName, String jobName, JobPatchProperties jobEnvelope, Context context) { + private PollerFlux, JobInner> beginUpdateAsync(String resourceGroupName, String jobName, + JobPatchProperties jobEnvelope, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, jobName, jobEnvelope, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), JobInner.class, JobInner.class, context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, jobName, jobEnvelope, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), JobInner.class, + JobInner.class, context); } /** * Update properties of a Container Apps Job - * - *

Patches a Container Apps Job using JSON Merge Patch. - * + * + * Patches a Container Apps Job using JSON Merge Patch. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. @@ -1342,16 +1546,16 @@ private PollerFlux, JobInner> beginUpdateAsync( * @return the {@link SyncPoller} for polling of container App Job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobInner> beginUpdate( - String resourceGroupName, String jobName, JobPatchProperties jobEnvelope) { + public SyncPoller, JobInner> beginUpdate(String resourceGroupName, String jobName, + JobPatchProperties jobEnvelope) { return this.beginUpdateAsync(resourceGroupName, jobName, jobEnvelope).getSyncPoller(); } /** * Update properties of a Container Apps Job - * - *

Patches a Container Apps Job using JSON Merge Patch. - * + * + * Patches a Container Apps Job using JSON Merge Patch. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. @@ -1362,16 +1566,16 @@ public SyncPoller, JobInner> beginUpdate( * @return the {@link SyncPoller} for polling of container App Job. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobInner> beginUpdate( - String resourceGroupName, String jobName, JobPatchProperties jobEnvelope, Context context) { + public SyncPoller, JobInner> beginUpdate(String resourceGroupName, String jobName, + JobPatchProperties jobEnvelope, Context context) { return this.beginUpdateAsync(resourceGroupName, jobName, jobEnvelope, context).getSyncPoller(); } /** * Update properties of a Container Apps Job - * - *

Patches a Container Apps Job using JSON Merge Patch. - * + * + * Patches a Container Apps Job using JSON Merge Patch. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. @@ -1382,16 +1586,15 @@ public SyncPoller, JobInner> beginUpdate( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono updateAsync(String resourceGroupName, String jobName, JobPatchProperties jobEnvelope) { - return beginUpdateAsync(resourceGroupName, jobName, jobEnvelope) - .last() + return beginUpdateAsync(resourceGroupName, jobName, jobEnvelope).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Update properties of a Container Apps Job - * - *

Patches a Container Apps Job using JSON Merge Patch. - * + * + * Patches a Container Apps Job using JSON Merge Patch. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. @@ -1402,18 +1605,17 @@ private Mono updateAsync(String resourceGroupName, String jobName, Job * @return container App Job on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String jobName, JobPatchProperties jobEnvelope, Context context) { - return beginUpdateAsync(resourceGroupName, jobName, jobEnvelope, context) - .last() + private Mono updateAsync(String resourceGroupName, String jobName, JobPatchProperties jobEnvelope, + Context context) { + return beginUpdateAsync(resourceGroupName, jobName, jobEnvelope, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Update properties of a Container Apps Job - * - *

Patches a Container Apps Job using JSON Merge Patch. - * + * + * Patches a Container Apps Job using JSON Merge Patch. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. @@ -1429,9 +1631,9 @@ public JobInner update(String resourceGroupName, String jobName, JobPatchPropert /** * Update properties of a Container Apps Job - * - *

Patches a Container Apps Job using JSON Merge Patch. - * + * + * Patches a Container Apps Job using JSON Merge Patch. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobEnvelope Properties used to create a container apps job. @@ -1448,7 +1650,7 @@ public JobInner update(String resourceGroupName, String jobName, JobPatchPropert /** * Start a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param template Properties used to start a job execution. @@ -1458,19 +1660,15 @@ public JobInner update(String resourceGroupName, String jobName, JobPatchPropert * @return container App's Job execution name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync( - String resourceGroupName, String jobName, JobExecutionTemplate template) { + private Mono>> startWithResponseAsync(String resourceGroupName, String jobName, + JobExecutionTemplate template) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1484,24 +1682,14 @@ private Mono>> startWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .start( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - jobName, - this.client.getApiVersion(), - template, - accept, - context)) + .withContext(context -> service.start(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, jobName, this.client.getApiVersion(), template, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Start a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param template Properties used to start a job execution. @@ -1512,19 +1700,15 @@ private Mono>> startWithResponseAsync( * @return container App's Job execution name along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> startWithResponseAsync( - String resourceGroupName, String jobName, JobExecutionTemplate template, Context context) { + private Mono>> startWithResponseAsync(String resourceGroupName, String jobName, + JobExecutionTemplate template, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1538,21 +1722,13 @@ private Mono>> startWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .start( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - jobName, - this.client.getApiVersion(), - template, - accept, - context); + return service.start(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, jobName, + this.client.getApiVersion(), template, accept, context); } /** * Start a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param template Properties used to start a job execution. @@ -1562,22 +1738,17 @@ private Mono>> startWithResponseAsync( * @return the {@link PollerFlux} for polling of container App's Job execution name. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobExecutionBaseInner> beginStartAsync( - String resourceGroupName, String jobName, JobExecutionTemplate template) { + private PollerFlux, JobExecutionBaseInner> + beginStartAsync(String resourceGroupName, String jobName, JobExecutionTemplate template) { Mono>> mono = startWithResponseAsync(resourceGroupName, jobName, template); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - JobExecutionBaseInner.class, - JobExecutionBaseInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), JobExecutionBaseInner.class, JobExecutionBaseInner.class, + this.client.getContext()); } /** * Start a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1586,23 +1757,18 @@ private PollerFlux, JobExecutionBaseInner> beg * @return the {@link PollerFlux} for polling of container App's Job execution name. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobExecutionBaseInner> beginStartAsync( - String resourceGroupName, String jobName) { + private PollerFlux, JobExecutionBaseInner> + beginStartAsync(String resourceGroupName, String jobName) { final JobExecutionTemplate template = null; Mono>> mono = startWithResponseAsync(resourceGroupName, jobName, template); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - JobExecutionBaseInner.class, - JobExecutionBaseInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), JobExecutionBaseInner.class, JobExecutionBaseInner.class, + this.client.getContext()); } /** * Start a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param template Properties used to start a job execution. @@ -1613,19 +1779,17 @@ private PollerFlux, JobExecutionBaseInner> beg * @return the {@link PollerFlux} for polling of container App's Job execution name. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, JobExecutionBaseInner> beginStartAsync( - String resourceGroupName, String jobName, JobExecutionTemplate template, Context context) { + private PollerFlux, JobExecutionBaseInner> + beginStartAsync(String resourceGroupName, String jobName, JobExecutionTemplate template, Context context) { context = this.client.mergeContext(context); Mono>> mono = startWithResponseAsync(resourceGroupName, jobName, template, context); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), JobExecutionBaseInner.class, JobExecutionBaseInner.class, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), JobExecutionBaseInner.class, JobExecutionBaseInner.class, context); } /** * Start a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1634,15 +1798,15 @@ private PollerFlux, JobExecutionBaseInner> beg * @return the {@link SyncPoller} for polling of container App's Job execution name. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobExecutionBaseInner> beginStart( - String resourceGroupName, String jobName) { + public SyncPoller, JobExecutionBaseInner> beginStart(String resourceGroupName, + String jobName) { final JobExecutionTemplate template = null; return this.beginStartAsync(resourceGroupName, jobName, template).getSyncPoller(); } /** * Start a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param template Properties used to start a job execution. @@ -1653,14 +1817,14 @@ public SyncPoller, JobExecutionBaseInner> begi * @return the {@link SyncPoller} for polling of container App's Job execution name. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, JobExecutionBaseInner> beginStart( - String resourceGroupName, String jobName, JobExecutionTemplate template, Context context) { + public SyncPoller, JobExecutionBaseInner> beginStart(String resourceGroupName, + String jobName, JobExecutionTemplate template, Context context) { return this.beginStartAsync(resourceGroupName, jobName, template, context).getSyncPoller(); } /** * Start a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param template Properties used to start a job execution. @@ -1670,16 +1834,15 @@ public SyncPoller, JobExecutionBaseInner> begi * @return container App's Job execution name on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync( - String resourceGroupName, String jobName, JobExecutionTemplate template) { - return beginStartAsync(resourceGroupName, jobName, template) - .last() + private Mono startAsync(String resourceGroupName, String jobName, + JobExecutionTemplate template) { + return beginStartAsync(resourceGroupName, jobName, template).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Start a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1690,14 +1853,13 @@ private Mono startAsync( @ServiceMethod(returns = ReturnType.SINGLE) private Mono startAsync(String resourceGroupName, String jobName) { final JobExecutionTemplate template = null; - return beginStartAsync(resourceGroupName, jobName, template) - .last() + return beginStartAsync(resourceGroupName, jobName, template).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Start a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param template Properties used to start a job execution. @@ -1708,16 +1870,15 @@ private Mono startAsync(String resourceGroupName, String * @return container App's Job execution name on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono startAsync( - String resourceGroupName, String jobName, JobExecutionTemplate template, Context context) { - return beginStartAsync(resourceGroupName, jobName, template, context) - .last() + private Mono startAsync(String resourceGroupName, String jobName, + JobExecutionTemplate template, Context context) { + return beginStartAsync(resourceGroupName, jobName, template, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Start a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1733,7 +1894,7 @@ public JobExecutionBaseInner start(String resourceGroupName, String jobName) { /** * Start a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param template Properties used to start a job execution. @@ -1744,14 +1905,14 @@ public JobExecutionBaseInner start(String resourceGroupName, String jobName) { * @return container App's Job execution name. */ @ServiceMethod(returns = ReturnType.SINGLE) - public JobExecutionBaseInner start( - String resourceGroupName, String jobName, JobExecutionTemplate template, Context context) { + public JobExecutionBaseInner start(String resourceGroupName, String jobName, JobExecutionTemplate template, + Context context) { return startAsync(resourceGroupName, jobName, template, context).block(); } /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. @@ -1761,19 +1922,15 @@ public JobExecutionBaseInner start( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopExecutionWithResponseAsync( - String resourceGroupName, String jobName, String jobExecutionName) { + private Mono>> stopExecutionWithResponseAsync(String resourceGroupName, String jobName, + String jobExecutionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1788,24 +1945,14 @@ private Mono>> stopExecutionWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .stopExecution( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - jobName, - jobExecutionName, - accept, - context)) + .withContext(context -> service.stopExecution(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), jobName, jobExecutionName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. @@ -1816,19 +1963,15 @@ private Mono>> stopExecutionWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopExecutionWithResponseAsync( - String resourceGroupName, String jobName, String jobExecutionName, Context context) { + private Mono>> stopExecutionWithResponseAsync(String resourceGroupName, String jobName, + String jobExecutionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1843,21 +1986,13 @@ private Mono>> stopExecutionWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .stopExecution( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - jobName, - jobExecutionName, - accept, - context); + return service.stopExecution(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), jobName, jobExecutionName, accept, context); } /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. @@ -1867,19 +2002,17 @@ private Mono>> stopExecutionWithResponseAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStopExecutionAsync( - String resourceGroupName, String jobName, String jobExecutionName) { - Mono>> mono = - stopExecutionWithResponseAsync(resourceGroupName, jobName, jobExecutionName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + private PollerFlux, Void> beginStopExecutionAsync(String resourceGroupName, String jobName, + String jobExecutionName) { + Mono>> mono + = stopExecutionWithResponseAsync(resourceGroupName, jobName, jobExecutionName); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. @@ -1890,19 +2023,18 @@ private PollerFlux, Void> beginStopExecutionAsync( * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginStopExecutionAsync( - String resourceGroupName, String jobName, String jobExecutionName, Context context) { + private PollerFlux, Void> beginStopExecutionAsync(String resourceGroupName, String jobName, + String jobExecutionName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - stopExecutionWithResponseAsync(resourceGroupName, jobName, jobExecutionName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + Mono>> mono + = stopExecutionWithResponseAsync(resourceGroupName, jobName, jobExecutionName, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. @@ -1912,14 +2044,14 @@ private PollerFlux, Void> beginStopExecutionAsync( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStopExecution( - String resourceGroupName, String jobName, String jobExecutionName) { + public SyncPoller, Void> beginStopExecution(String resourceGroupName, String jobName, + String jobExecutionName) { return this.beginStopExecutionAsync(resourceGroupName, jobName, jobExecutionName).getSyncPoller(); } /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. @@ -1930,14 +2062,14 @@ public SyncPoller, Void> beginStopExecution( * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginStopExecution( - String resourceGroupName, String jobName, String jobExecutionName, Context context) { + public SyncPoller, Void> beginStopExecution(String resourceGroupName, String jobName, + String jobExecutionName, Context context) { return this.beginStopExecutionAsync(resourceGroupName, jobName, jobExecutionName, context).getSyncPoller(); } /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. @@ -1948,14 +2080,13 @@ public SyncPoller, Void> beginStopExecution( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopExecutionAsync(String resourceGroupName, String jobName, String jobExecutionName) { - return beginStopExecutionAsync(resourceGroupName, jobName, jobExecutionName) - .last() + return beginStopExecutionAsync(resourceGroupName, jobName, jobExecutionName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. @@ -1966,16 +2097,15 @@ private Mono stopExecutionAsync(String resourceGroupName, String jobName, * @return A {@link Mono} that completes when a successful response is received. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopExecutionAsync( - String resourceGroupName, String jobName, String jobExecutionName, Context context) { - return beginStopExecutionAsync(resourceGroupName, jobName, jobExecutionName, context) - .last() + private Mono stopExecutionAsync(String resourceGroupName, String jobName, String jobExecutionName, + Context context) { + return beginStopExecutionAsync(resourceGroupName, jobName, jobExecutionName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. @@ -1990,7 +2120,7 @@ public void stopExecution(String resourceGroupName, String jobName, String jobEx /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. @@ -2006,29 +2136,25 @@ public void stopExecution(String resourceGroupName, String jobName, String jobEx /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App executions collection ARM resource along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopMultipleExecutionsWithResponseAsync( - String resourceGroupName, String jobName) { + private Mono>> stopMultipleExecutionsWithResponseAsync(String resourceGroupName, + String jobName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2040,22 +2166,14 @@ private Mono>> stopMultipleExecutionsWithResponseAsync final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .stopMultipleExecutions( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - jobName, - accept, - context)) + context -> service.stopMultipleExecutions(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), jobName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param context The context to associate with this operation. @@ -2063,22 +2181,18 @@ private Mono>> stopMultipleExecutionsWithResponseAsync * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App executions collection ARM resource along with {@link Response} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> stopMultipleExecutionsWithResponseAsync( - String resourceGroupName, String jobName, Context context) { + private Mono>> stopMultipleExecutionsWithResponseAsync(String resourceGroupName, + String jobName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2089,20 +2203,13 @@ private Mono>> stopMultipleExecutionsWithResponseAsync } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .stopMultipleExecutions( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - jobName, - accept, - context); + return service.stopMultipleExecutions(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), jobName, accept, context); } /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2114,19 +2221,14 @@ private Mono>> stopMultipleExecutionsWithResponseAsync private PollerFlux, ContainerAppJobExecutionsInner> beginStopMultipleExecutionsAsync(String resourceGroupName, String jobName) { Mono>> mono = stopMultipleExecutionsWithResponseAsync(resourceGroupName, jobName); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ContainerAppJobExecutionsInner.class, - ContainerAppJobExecutionsInner.class, - this.client.getContext()); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ContainerAppJobExecutionsInner.class, ContainerAppJobExecutionsInner.class, + this.client.getContext()); } /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param context The context to associate with this operation. @@ -2139,21 +2241,16 @@ private Mono>> stopMultipleExecutionsWithResponseAsync private PollerFlux, ContainerAppJobExecutionsInner> beginStopMultipleExecutionsAsync(String resourceGroupName, String jobName, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - stopMultipleExecutionsWithResponseAsync(resourceGroupName, jobName, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ContainerAppJobExecutionsInner.class, - ContainerAppJobExecutionsInner.class, - context); + Mono>> mono + = stopMultipleExecutionsWithResponseAsync(resourceGroupName, jobName, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ContainerAppJobExecutionsInner.class, ContainerAppJobExecutionsInner.class, + context); } /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2169,7 +2266,7 @@ private Mono>> stopMultipleExecutionsWithResponseAsync /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param context The context to associate with this operation. @@ -2186,7 +2283,7 @@ private Mono>> stopMultipleExecutionsWithResponseAsync /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2196,14 +2293,13 @@ private Mono>> stopMultipleExecutionsWithResponseAsync */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono stopMultipleExecutionsAsync(String resourceGroupName, String jobName) { - return beginStopMultipleExecutionsAsync(resourceGroupName, jobName) - .last() + return beginStopMultipleExecutionsAsync(resourceGroupName, jobName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param context The context to associate with this operation. @@ -2213,16 +2309,15 @@ private Mono stopMultipleExecutionsAsync(String * @return container App executions collection ARM resource on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono stopMultipleExecutionsAsync( - String resourceGroupName, String jobName, Context context) { - return beginStopMultipleExecutionsAsync(resourceGroupName, jobName, context) - .last() + private Mono stopMultipleExecutionsAsync(String resourceGroupName, String jobName, + Context context) { + return beginStopMultipleExecutionsAsync(resourceGroupName, jobName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2237,7 +2332,7 @@ public ContainerAppJobExecutionsInner stopMultipleExecutions(String resourceGrou /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param context The context to associate with this operation. @@ -2247,36 +2342,32 @@ public ContainerAppJobExecutionsInner stopMultipleExecutions(String resourceGrou * @return container App executions collection ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppJobExecutionsInner stopMultipleExecutions( - String resourceGroupName, String jobName, Context context) { + public ContainerAppJobExecutionsInner stopMultipleExecutions(String resourceGroupName, String jobName, + Context context) { return stopMultipleExecutionsAsync(resourceGroupName, jobName, context).block(); } /** * List secrets for a container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container Apps Job Secrets Collection ARM resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync( - String resourceGroupName, String jobName) { + private Mono> listSecretsWithResponseAsync(String resourceGroupName, + String jobName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2287,23 +2378,14 @@ private Mono> listSecretsWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listSecrets( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - jobName, - accept, - context)) + .withContext(context -> service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), jobName, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * List secrets for a container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param context The context to associate with this operation. @@ -2311,22 +2393,18 @@ private Mono> listSecretsWithResponseAsync( * @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 Apps Job Secrets Collection ARM resource along with {@link Response} on successful completion - * of {@link Mono}. + * of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSecretsWithResponseAsync( - String resourceGroupName, String jobName, Context context) { + private Mono> listSecretsWithResponseAsync(String resourceGroupName, + String jobName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -2337,20 +2415,13 @@ private Mono> listSecretsWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listSecrets( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - jobName, - accept, - context); + return service.listSecrets(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), jobName, accept, context); } /** * List secrets for a container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2366,7 +2437,7 @@ private Mono listSecretsAsync(String resourceGroupNam /** * List secrets for a container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param context The context to associate with this operation. @@ -2376,14 +2447,14 @@ private Mono listSecretsAsync(String resourceGroupNam * @return container Apps Job Secrets Collection ARM resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listSecretsWithResponse( - String resourceGroupName, String jobName, Context context) { + public Response listSecretsWithResponse(String resourceGroupName, String jobName, + Context context) { return listSecretsWithResponseAsync(resourceGroupName, jobName, context).block(); } /** * List secrets for a container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -2398,14 +2469,15 @@ public JobSecretsCollectionInner listSecrets(String resourceGroupName, String jo /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 Apps Jobs collection ARM resource along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink) { @@ -2413,38 +2485,30 @@ private Mono> listBySubscriptionNextSinglePageAsync(Stri return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container Apps Jobs collection ARM resource along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, Context context) { @@ -2452,36 +2516,27 @@ private Mono> listBySubscriptionNextSinglePageAsync(Stri return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 Apps Jobs collection ARM resource along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink) { @@ -2489,38 +2544,30 @@ private Mono> listByResourceGroupNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container Apps Jobs collection ARM resource along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, Context context) { @@ -2528,23 +2575,13 @@ private Mono> listByResourceGroupNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsExecutionsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsExecutionsClientImpl.java index 6bf912ce7b4b..4712b36b0514 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsExecutionsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsExecutionsClientImpl.java @@ -30,22 +30,28 @@ import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in JobsExecutionsClient. */ +/** + * An instance of this class provides access to all the operations defined in JobsExecutionsClient. + */ public final class JobsExecutionsClientImpl implements JobsExecutionsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final JobsExecutionsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerAppsApiClientImpl client; /** * Initializes an instance of JobsExecutionsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ JobsExecutionsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy.create(JobsExecutionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(JobsExecutionsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,58 +62,47 @@ public final class JobsExecutionsClientImpl implements JobsExecutionsClient { @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") public interface JobsExecutionsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("jobName") String jobName, - @QueryParam("api-version") String apiVersion, - @QueryParam("$filter") String filter, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, + @QueryParam("api-version") String apiVersion, @QueryParam("$filter") String filter, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Get a Container Apps Job's executions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param filter The filter to apply on the operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a Container Apps Job's executions along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a Container Apps Job's executions along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String jobName, String filter) { + private Mono> listSinglePageAsync(String resourceGroupName, String jobName, + String filter) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -118,33 +113,16 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - jobName, - this.client.getApiVersion(), - filter, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, jobName, this.client.getApiVersion(), filter, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get a Container Apps Job's executions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param filter The filter to apply on the operation. @@ -152,23 +130,19 @@ private Mono> listSinglePageAsync( * @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 Container Apps Job's executions along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return a Container Apps Job's executions along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String jobName, String filter, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, String jobName, + String filter, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -180,29 +154,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - jobName, - this.client.getApiVersion(), - filter, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, jobName, + this.client.getApiVersion(), filter, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get a Container Apps Job's executions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param filter The filter to apply on the operation. @@ -213,14 +173,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String jobName, String filter) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, jobName, filter), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, jobName, filter), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Get a Container Apps Job's executions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -231,14 +190,13 @@ private PagedFlux listAsync(String resourceGroupName, String @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String jobName) { final String filter = null; - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, jobName, filter), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, jobName, filter), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Get a Container Apps Job's executions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param filter The filter to apply on the operation. @@ -249,16 +207,15 @@ private PagedFlux listAsync(String resourceGroupName, String * @return a Container Apps Job's executions as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String jobName, String filter, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, jobName, filter, context), + private PagedFlux listAsync(String resourceGroupName, String jobName, String filter, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, jobName, filter, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Get a Container Apps Job's executions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -274,7 +231,7 @@ public PagedIterable list(String resourceGroupName, String jo /** * Get a Container Apps Job's executions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param filter The filter to apply on the operation. @@ -285,21 +242,22 @@ public PagedIterable list(String resourceGroupName, String jo * @return a Container Apps Job's executions as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String jobName, String filter, Context context) { + public PagedIterable list(String resourceGroupName, String jobName, String filter, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, jobName, filter, context)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App executions collection ARM resource along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -307,37 +265,28 @@ private Mono> listNextSinglePageAsync(String ne return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App executions collection ARM resource along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -345,23 +294,13 @@ private Mono> listNextSinglePageAsync(String ne return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsExecutionsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsExecutionsImpl.java index ec5d43fa745b..eb3cb8fe223a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsExecutionsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsExecutionsImpl.java @@ -19,8 +19,7 @@ public final class JobsExecutionsImpl implements JobsExecutions { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - public JobsExecutionsImpl( - JobsExecutionsClient innerClient, + public JobsExecutionsImpl(JobsExecutionsClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -28,12 +27,12 @@ public JobsExecutionsImpl( public PagedIterable list(String resourceGroupName, String jobName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, jobName); - return Utils.mapPage(inner, inner1 -> new JobExecutionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new JobExecutionImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String jobName, String filter, Context context) { PagedIterable inner = this.serviceClient().list(resourceGroupName, jobName, filter, context); - return Utils.mapPage(inner, inner1 -> new JobExecutionImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new JobExecutionImpl(inner1, this.manager())); } private JobsExecutionsClient serviceClient() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsImpl.java index f141ae9a6fa6..2ec3b5f9e57f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/JobsImpl.java @@ -11,10 +11,14 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.appcontainers.fluent.JobsClient; import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppJobExecutionsInner; +import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; +import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionBaseInner; import com.azure.resourcemanager.appcontainers.fluent.models.JobInner; import com.azure.resourcemanager.appcontainers.fluent.models.JobSecretsCollectionInner; import com.azure.resourcemanager.appcontainers.models.ContainerAppJobExecutions; +import com.azure.resourcemanager.appcontainers.models.Diagnostics; +import com.azure.resourcemanager.appcontainers.models.DiagnosticsCollection; import com.azure.resourcemanager.appcontainers.models.Job; import com.azure.resourcemanager.appcontainers.models.JobExecutionBase; import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; @@ -28,40 +32,98 @@ public final class JobsImpl implements Jobs { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - public JobsImpl( - JobsClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + public JobsImpl(JobsClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } + public Response listDetectorsWithResponse(String resourceGroupName, String jobName, + Context context) { + Response inner + = this.serviceClient().listDetectorsWithResponse(resourceGroupName, jobName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DiagnosticsCollectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DiagnosticsCollection listDetectors(String resourceGroupName, String jobName) { + DiagnosticsCollectionInner inner = this.serviceClient().listDetectors(resourceGroupName, jobName); + if (inner != null) { + return new DiagnosticsCollectionImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response getDetectorWithResponse(String resourceGroupName, String jobName, String detectorName, + Context context) { + Response inner + = this.serviceClient().getDetectorWithResponse(resourceGroupName, jobName, detectorName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new DiagnosticsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Diagnostics getDetector(String resourceGroupName, String jobName, String detectorName) { + DiagnosticsInner inner = this.serviceClient().getDetector(resourceGroupName, jobName, detectorName); + if (inner != null) { + return new DiagnosticsImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response proxyGetWithResponse(String resourceGroupName, String jobName, Context context) { + Response inner = this.serviceClient().proxyGetWithResponse(resourceGroupName, jobName, context); + if (inner != null) { + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), + new JobImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Job proxyGet(String resourceGroupName, String jobName) { + JobInner inner = this.serviceClient().proxyGet(resourceGroupName, jobName); + if (inner != null) { + return new JobImpl(inner, this.manager()); + } else { + return null; + } + } + public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new JobImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new JobImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new JobImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new JobImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new JobImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new JobImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new JobImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new JobImpl(inner1, this.manager())); } public Response getByResourceGroupWithResponse(String resourceGroupName, String jobName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, jobName, context); + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, jobName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new JobImpl(inner.getValue(), this.manager())); } else { return null; @@ -94,8 +156,8 @@ public JobExecutionBase start(String resourceGroupName, String jobName) { } } - public JobExecutionBase start( - String resourceGroupName, String jobName, JobExecutionTemplate template, Context context) { + public JobExecutionBase start(String resourceGroupName, String jobName, JobExecutionTemplate template, + Context context) { JobExecutionBaseInner inner = this.serviceClient().start(resourceGroupName, jobName, template, context); if (inner != null) { return new JobExecutionBaseImpl(inner, this.manager()); @@ -122,8 +184,8 @@ public ContainerAppJobExecutions stopMultipleExecutions(String resourceGroupName } public ContainerAppJobExecutions stopMultipleExecutions(String resourceGroupName, String jobName, Context context) { - ContainerAppJobExecutionsInner inner = - this.serviceClient().stopMultipleExecutions(resourceGroupName, jobName, context); + ContainerAppJobExecutionsInner inner + = this.serviceClient().stopMultipleExecutions(resourceGroupName, jobName, context); if (inner != null) { return new ContainerAppJobExecutionsImpl(inner, this.manager()); } else { @@ -131,15 +193,12 @@ public ContainerAppJobExecutions stopMultipleExecutions(String resourceGroupName } } - public Response listSecretsWithResponse( - String resourceGroupName, String jobName, Context context) { - Response inner = - this.serviceClient().listSecretsWithResponse(resourceGroupName, jobName, context); + public Response listSecretsWithResponse(String resourceGroupName, String jobName, + Context context) { + Response inner + = this.serviceClient().listSecretsWithResponse(resourceGroupName, jobName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new JobSecretsCollectionImpl(inner.getValue(), this.manager())); } else { return null; @@ -156,77 +215,57 @@ public JobSecretsCollection listSecrets(String resourceGroupName, String jobName } public Job getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String jobName = Utils.getValueFromIdByName(id, "jobs"); + String jobName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); if (jobName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, jobName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String jobName = Utils.getValueFromIdByName(id, "jobs"); + String jobName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); if (jobName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, jobName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String jobName = Utils.getValueFromIdByName(id, "jobs"); + String jobName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); if (jobName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); } this.delete(resourceGroupName, jobName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); } - String jobName = Utils.getValueFromIdByName(id, "jobs"); + String jobName = ResourceManagerUtils.getValueFromIdByName(id, "jobs"); if (jobName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'jobs'.", id))); } this.delete(resourceGroupName, jobName, context); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificateImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificateImpl.java index 678fd7d6c785..56dda0044379 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificateImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificateImpl.java @@ -88,26 +88,19 @@ public ManagedCertificateImpl withExistingManagedEnvironment(String resourceGrou } public ManagedCertificate create() { - this.innerObject = - serviceManager - .serviceClient() - .getManagedCertificates() - .createOrUpdate( - resourceGroupName, environmentName, managedCertificateName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getManagedCertificates().createOrUpdate(resourceGroupName, + environmentName, managedCertificateName, this.innerModel(), Context.NONE); return this; } public ManagedCertificate create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getManagedCertificates() - .createOrUpdate(resourceGroupName, environmentName, managedCertificateName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getManagedCertificates().createOrUpdate(resourceGroupName, + environmentName, managedCertificateName, this.innerModel(), context); return this; } - ManagedCertificateImpl( - String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + ManagedCertificateImpl(String name, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = new ManagedCertificateInner(); this.serviceManager = serviceManager; this.managedCertificateName = name; @@ -119,62 +112,36 @@ public ManagedCertificateImpl update() { } public ManagedCertificate apply() { - this.innerObject = - serviceManager - .serviceClient() - .getManagedCertificates() - .updateWithResponse( - resourceGroupName, - environmentName, - managedCertificateName, - updateManagedCertificateEnvelope, - Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getManagedCertificates().updateWithResponse(resourceGroupName, + environmentName, managedCertificateName, updateManagedCertificateEnvelope, Context.NONE).getValue(); return this; } public ManagedCertificate apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getManagedCertificates() - .updateWithResponse( - resourceGroupName, - environmentName, - managedCertificateName, - updateManagedCertificateEnvelope, - context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getManagedCertificates().updateWithResponse(resourceGroupName, + environmentName, managedCertificateName, updateManagedCertificateEnvelope, context).getValue(); return this; } - ManagedCertificateImpl( - ManagedCertificateInner innerObject, + ManagedCertificateImpl(ManagedCertificateInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.environmentName = Utils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); - this.managedCertificateName = Utils.getValueFromIdByName(innerObject.id(), "managedCertificates"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.environmentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); + this.managedCertificateName + = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedCertificates"); } public ManagedCertificate refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getManagedCertificates() - .getWithResponse(resourceGroupName, environmentName, managedCertificateName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getManagedCertificates() + .getWithResponse(resourceGroupName, environmentName, managedCertificateName, Context.NONE).getValue(); return this; } public ManagedCertificate refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getManagedCertificates() - .getWithResponse(resourceGroupName, environmentName, managedCertificateName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getManagedCertificates() + .getWithResponse(resourceGroupName, environmentName, managedCertificateName, context).getValue(); return this; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesClientImpl.java index 73e22fb56419..2f82424fccd4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesClientImpl.java @@ -41,22 +41,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedCertificatesClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedCertificatesClient. + */ public final class ManagedCertificatesClientImpl implements ManagedCertificatesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedCertificatesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerAppsApiClientImpl client; /** * Initializes an instance of ManagedCertificatesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedCertificatesClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy.create(ManagedCertificatesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedCertificatesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -67,99 +73,77 @@ public final class ManagedCertificatesClientImpl implements ManagedCertificatesC @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") public interface ManagedCertificatesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("environmentName") String environmentName, @PathParam("managedCertificateName") String managedCertificateName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}") - @ExpectedResponses({200, 201}) - @UnexpectedResponseExceptionType( - value = ManagementException.class, - code = {400}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}") + @ExpectedResponses({ 200, 201 }) + @UnexpectedResponseExceptionType(value = ManagementException.class, code = { 400 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("environmentName") String environmentName, @PathParam("managedCertificateName") String managedCertificateName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ManagedCertificateInner managedCertificateEnvelope, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete( - @HostParam("$host") String endpoint, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("environmentName") String environmentName, @PathParam("managedCertificateName") String managedCertificateName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates/{managedCertificateName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> update( - @HostParam("$host") String endpoint, + Mono> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, @PathParam("environmentName") String environmentName, @PathParam("managedCertificateName") String managedCertificateName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ManagedCertificatePatch managedCertificateEnvelope, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/managedCertificates") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Get the specified Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. @@ -169,19 +153,15 @@ Mono> listNext( * @return the specified Managed Certificate along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String environmentName, String managedCertificateName) { + private Mono> getWithResponseAsync(String resourceGroupName, + String environmentName, String managedCertificateName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -192,30 +172,20 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); } if (managedCertificateName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - managedCertificateName, - this.client.getApiVersion(), - accept, - context)) + context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, managedCertificateName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the specified Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. @@ -226,19 +196,15 @@ private Mono> getWithResponseAsync( * @return the specified Managed Certificate along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String environmentName, String managedCertificateName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String environmentName, String managedCertificateName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -249,27 +215,18 @@ private Mono> getWithResponseAsync( .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); } if (managedCertificateName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - managedCertificateName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, managedCertificateName, this.client.getApiVersion(), accept, context); } /** * Get the specified Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. @@ -279,15 +236,15 @@ private Mono> getWithResponseAsync( * @return the specified Managed Certificate on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String environmentName, String managedCertificateName) { + private Mono getAsync(String resourceGroupName, String environmentName, + String managedCertificateName) { return getWithResponseAsync(resourceGroupName, environmentName, managedCertificateName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get the specified Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. @@ -298,14 +255,14 @@ private Mono getAsync( * @return the specified Managed Certificate along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String environmentName, String managedCertificateName, Context context) { + public Response getWithResponse(String resourceGroupName, String environmentName, + String managedCertificateName, Context context) { return getWithResponseAsync(resourceGroupName, environmentName, managedCertificateName, context).block(); } /** * Get the specified Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. @@ -315,14 +272,14 @@ public Response getWithResponse( * @return the specified Managed Certificate. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedCertificateInner get( - String resourceGroupName, String environmentName, String managedCertificateName) { + public ManagedCertificateInner get(String resourceGroupName, String environmentName, + String managedCertificateName) { return getWithResponse(resourceGroupName, environmentName, managedCertificateName, Context.NONE).getValue(); } /** * Create or Update a Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. @@ -332,25 +289,18 @@ public ManagedCertificateInner get( * @throws ManagementException thrown if the request is rejected by server on status code 400. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment along - * with {@link Response} on successful completion of {@link Mono}. + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String environmentName, - String managedCertificateName, - ManagedCertificateInner managedCertificateEnvelope) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String environmentName, String managedCertificateName, ManagedCertificateInner managedCertificateEnvelope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -361,34 +311,23 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); } if (managedCertificateName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); } if (managedCertificateEnvelope != null) { managedCertificateEnvelope.validate(); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - managedCertificateName, - this.client.getApiVersion(), - managedCertificateEnvelope, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, managedCertificateName, this.client.getApiVersion(), + managedCertificateEnvelope, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create or Update a Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. @@ -399,26 +338,19 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server on status code 400. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment along - * with {@link Response} on successful completion of {@link Mono}. + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String environmentName, - String managedCertificateName, - ManagedCertificateInner managedCertificateEnvelope, + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String environmentName, String managedCertificateName, ManagedCertificateInner managedCertificateEnvelope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -429,31 +361,22 @@ private Mono>> createOrUpdateWithResponseAsync( .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); } if (managedCertificateName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); } if (managedCertificateEnvelope != null) { managedCertificateEnvelope.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - managedCertificateName, - this.client.getApiVersion(), - managedCertificateEnvelope, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, managedCertificateName, this.client.getApiVersion(), managedCertificateEnvelope, accept, + context); } /** * Create or Update a Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. @@ -463,30 +386,22 @@ private Mono>> createOrUpdateWithResponseAsync( * @throws ManagementException thrown if the request is rejected by server on status code 400. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of managed certificates used for Custom Domain bindings of Container - * Apps in a Managed Environment. + * Apps in a Managed Environment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ManagedCertificateInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String environmentName, - String managedCertificateName, + String resourceGroupName, String environmentName, String managedCertificateName, ManagedCertificateInner managedCertificateEnvelope) { - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedCertificateInner.class, - ManagedCertificateInner.class, - this.client.getContext()); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, environmentName, + managedCertificateName, managedCertificateEnvelope); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ManagedCertificateInner.class, ManagedCertificateInner.class, + this.client.getContext()); } /** * Create or Update a Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. @@ -495,28 +410,22 @@ private PollerFlux, ManagedCertificateInner> * @throws ManagementException thrown if the request is rejected by server on status code 400. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of managed certificates used for Custom Domain bindings of Container - * Apps in a Managed Environment. + * Apps in a Managed Environment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, ManagedCertificateInner> beginCreateOrUpdateAsync( - String resourceGroupName, String environmentName, String managedCertificateName) { + private PollerFlux, ManagedCertificateInner> + beginCreateOrUpdateAsync(String resourceGroupName, String environmentName, String managedCertificateName) { final ManagedCertificateInner managedCertificateEnvelope = null; - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedCertificateInner.class, - ManagedCertificateInner.class, - this.client.getContext()); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, environmentName, + managedCertificateName, managedCertificateEnvelope); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ManagedCertificateInner.class, ManagedCertificateInner.class, + this.client.getContext()); } /** * Create or Update a Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. @@ -527,32 +436,22 @@ private PollerFlux, ManagedCertificateInner> * @throws ManagementException thrown if the request is rejected by server on status code 400. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link PollerFlux} for polling of managed certificates used for Custom Domain bindings of Container - * Apps in a Managed Environment. + * Apps in a Managed Environment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ManagedCertificateInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String environmentName, - String managedCertificateName, - ManagedCertificateInner managedCertificateEnvelope, - Context context) { + String resourceGroupName, String environmentName, String managedCertificateName, + ManagedCertificateInner managedCertificateEnvelope, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync( - resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedCertificateInner.class, - ManagedCertificateInner.class, - context); + Mono>> mono = createOrUpdateWithResponseAsync(resourceGroupName, environmentName, + managedCertificateName, managedCertificateEnvelope, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ManagedCertificateInner.class, ManagedCertificateInner.class, context); } /** * Create or Update a Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. @@ -561,21 +460,19 @@ private PollerFlux, ManagedCertificateInner> * @throws ManagementException thrown if the request is rejected by server on status code 400. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of managed certificates used for Custom Domain bindings of Container - * Apps in a Managed Environment. + * Apps in a Managed Environment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedCertificateInner> beginCreateOrUpdate( - String resourceGroupName, String environmentName, String managedCertificateName) { + public SyncPoller, ManagedCertificateInner> + beginCreateOrUpdate(String resourceGroupName, String environmentName, String managedCertificateName) { final ManagedCertificateInner managedCertificateEnvelope = null; - return this - .beginCreateOrUpdateAsync( - resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope) - .getSyncPoller(); + return this.beginCreateOrUpdateAsync(resourceGroupName, environmentName, managedCertificateName, + managedCertificateEnvelope).getSyncPoller(); } /** * Create or Update a Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. @@ -586,24 +483,19 @@ public SyncPoller, ManagedCertificateInner> * @throws ManagementException thrown if the request is rejected by server on status code 400. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link SyncPoller} for polling of managed certificates used for Custom Domain bindings of Container - * Apps in a Managed Environment. + * Apps in a Managed Environment. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedCertificateInner> beginCreateOrUpdate( - String resourceGroupName, - String environmentName, - String managedCertificateName, - ManagedCertificateInner managedCertificateEnvelope, - Context context) { - return this - .beginCreateOrUpdateAsync( - resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope, context) - .getSyncPoller(); + String resourceGroupName, String environmentName, String managedCertificateName, + ManagedCertificateInner managedCertificateEnvelope, Context context) { + return this.beginCreateOrUpdateAsync(resourceGroupName, environmentName, managedCertificateName, + managedCertificateEnvelope, context).getSyncPoller(); } /** * Create or Update a Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. @@ -613,23 +505,18 @@ public SyncPoller, ManagedCertificateInner> * @throws ManagementException thrown if the request is rejected by server on status code 400. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String environmentName, - String managedCertificateName, - ManagedCertificateInner managedCertificateEnvelope) { - return beginCreateOrUpdateAsync( - resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, + String managedCertificateName, ManagedCertificateInner managedCertificateEnvelope) { + return beginCreateOrUpdateAsync(resourceGroupName, environmentName, managedCertificateName, + managedCertificateEnvelope).last().flatMap(this.client::getLroFinalResultOrError); } /** * Create or Update a Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. @@ -638,21 +525,19 @@ private Mono createOrUpdateAsync( * @throws ManagementException thrown if the request is rejected by server on status code 400. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String environmentName, String managedCertificateName) { + private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, + String managedCertificateName) { final ManagedCertificateInner managedCertificateEnvelope = null; - return beginCreateOrUpdateAsync( - resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope) - .last() - .flatMap(this.client::getLroFinalResultOrError); + return beginCreateOrUpdateAsync(resourceGroupName, environmentName, managedCertificateName, + managedCertificateEnvelope).last().flatMap(this.client::getLroFinalResultOrError); } /** * Create or Update a Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. @@ -663,24 +548,18 @@ private Mono createOrUpdateAsync( * @throws ManagementException thrown if the request is rejected by server on status code 400. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String environmentName, - String managedCertificateName, - ManagedCertificateInner managedCertificateEnvelope, - Context context) { - return beginCreateOrUpdateAsync( - resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope, context) - .last() - .flatMap(this.client::getLroFinalResultOrError); + private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, + String managedCertificateName, ManagedCertificateInner managedCertificateEnvelope, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, environmentName, managedCertificateName, + managedCertificateEnvelope, context).last().flatMap(this.client::getLroFinalResultOrError); } /** * Create or Update a Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. @@ -691,17 +570,16 @@ private Mono createOrUpdateAsync( * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedCertificateInner createOrUpdate( - String resourceGroupName, String environmentName, String managedCertificateName) { + public ManagedCertificateInner createOrUpdate(String resourceGroupName, String environmentName, + String managedCertificateName) { final ManagedCertificateInner managedCertificateEnvelope = null; - return createOrUpdateAsync( - resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope) - .block(); + return createOrUpdateAsync(resourceGroupName, environmentName, managedCertificateName, + managedCertificateEnvelope).block(); } /** * Create or Update a Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. @@ -714,20 +592,15 @@ public ManagedCertificateInner createOrUpdate( * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedCertificateInner createOrUpdate( - String resourceGroupName, - String environmentName, - String managedCertificateName, - ManagedCertificateInner managedCertificateEnvelope, - Context context) { - return createOrUpdateAsync( - resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope, context) - .block(); + public ManagedCertificateInner createOrUpdate(String resourceGroupName, String environmentName, + String managedCertificateName, ManagedCertificateInner managedCertificateEnvelope, Context context) { + return createOrUpdateAsync(resourceGroupName, environmentName, managedCertificateName, + managedCertificateEnvelope, context).block(); } /** * Deletes the specified Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. @@ -737,19 +610,15 @@ public ManagedCertificateInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String environmentName, String managedCertificateName) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String environmentName, + String managedCertificateName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -760,30 +629,20 @@ private Mono> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); } if (managedCertificateName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - managedCertificateName, - this.client.getApiVersion(), - accept, - context)) + context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, managedCertificateName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Deletes the specified Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. @@ -794,19 +653,15 @@ private Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String environmentName, String managedCertificateName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String environmentName, + String managedCertificateName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -817,27 +672,18 @@ private Mono> deleteWithResponseAsync( .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); } if (managedCertificateName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - managedCertificateName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, managedCertificateName, this.client.getApiVersion(), accept, context); } /** * Deletes the specified Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. @@ -854,7 +700,7 @@ private Mono deleteAsync(String resourceGroupName, String environmentName, /** * Deletes the specified Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. @@ -865,14 +711,14 @@ private Mono deleteAsync(String resourceGroupName, String environmentName, * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String environmentName, String managedCertificateName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String environmentName, + String managedCertificateName, Context context) { return deleteWithResponseAsync(resourceGroupName, environmentName, managedCertificateName, context).block(); } /** * Deletes the specified Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. @@ -887,9 +733,9 @@ public void delete(String resourceGroupName, String environmentName, String mana /** * Update tags of a managed certificate - * - *

Patches a managed certificate. Oly patching of tags is supported. - * + * + * Patches a managed certificate. Oly 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 managedCertificateName Name of the Managed Certificate. @@ -898,25 +744,18 @@ public void delete(String resourceGroupName, String environmentName, String mana * @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 managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment along - * with {@link Response} on successful completion of {@link Mono}. + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String environmentName, - String managedCertificateName, - ManagedCertificatePatch managedCertificateEnvelope) { + private Mono> updateWithResponseAsync(String resourceGroupName, + String environmentName, String managedCertificateName, ManagedCertificatePatch managedCertificateEnvelope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -927,41 +766,28 @@ private Mono> updateWithResponseAsync( .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); } if (managedCertificateName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); } if (managedCertificateEnvelope == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter managedCertificateEnvelope is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter managedCertificateEnvelope is required and cannot be null.")); } else { managedCertificateEnvelope.validate(); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - managedCertificateName, - this.client.getApiVersion(), - managedCertificateEnvelope, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, managedCertificateName, this.client.getApiVersion(), + managedCertificateEnvelope, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update tags of a managed certificate - * - *

Patches a managed certificate. Oly patching of tags is supported. - * + * + * Patches a managed certificate. Oly 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 managedCertificateName Name of the Managed Certificate. @@ -971,26 +797,19 @@ private Mono> updateWithResponseAsync( * @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 managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment along - * with {@link Response} on successful completion of {@link Mono}. + * with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> updateWithResponseAsync( - String resourceGroupName, - String environmentName, - String managedCertificateName, - ManagedCertificatePatch managedCertificateEnvelope, + private Mono> updateWithResponseAsync(String resourceGroupName, + String environmentName, String managedCertificateName, ManagedCertificatePatch managedCertificateEnvelope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1001,38 +820,27 @@ private Mono> updateWithResponseAsync( .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); } if (managedCertificateName == null) { - return Mono - .error( - new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter managedCertificateName is required and cannot be null.")); } if (managedCertificateEnvelope == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter managedCertificateEnvelope is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter managedCertificateEnvelope is required and cannot be null.")); } else { managedCertificateEnvelope.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - managedCertificateName, - this.client.getApiVersion(), - managedCertificateEnvelope, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, managedCertificateName, this.client.getApiVersion(), managedCertificateEnvelope, accept, + context); } /** * Update tags of a managed certificate - * - *

Patches a managed certificate. Oly patching of tags is supported. - * + * + * Patches a managed certificate. Oly 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 managedCertificateName Name of the Managed Certificate. @@ -1041,24 +849,20 @@ private Mono> updateWithResponseAsync( * @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 managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String environmentName, - String managedCertificateName, - ManagedCertificatePatch managedCertificateEnvelope) { - return updateWithResponseAsync( - resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + private Mono updateAsync(String resourceGroupName, String environmentName, + String managedCertificateName, ManagedCertificatePatch managedCertificateEnvelope) { + return updateWithResponseAsync(resourceGroupName, environmentName, managedCertificateName, + managedCertificateEnvelope).flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Update tags of a managed certificate - * - *

Patches a managed certificate. Oly patching of tags is supported. - * + * + * Patches a managed certificate. Oly 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 managedCertificateName Name of the Managed Certificate. @@ -1068,25 +872,20 @@ private Mono updateAsync( * @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 managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment along - * with {@link Response}. + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( - String resourceGroupName, - String environmentName, - String managedCertificateName, - ManagedCertificatePatch managedCertificateEnvelope, - Context context) { - return updateWithResponseAsync( - resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope, context) - .block(); + public Response updateWithResponse(String resourceGroupName, String environmentName, + String managedCertificateName, ManagedCertificatePatch managedCertificateEnvelope, Context context) { + return updateWithResponseAsync(resourceGroupName, environmentName, managedCertificateName, + managedCertificateEnvelope, context).block(); } /** * Update tags of a managed certificate - * - *

Patches a managed certificate. Oly patching of tags is supported. - * + * + * Patches a managed certificate. Oly 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 managedCertificateName Name of the Managed Certificate. @@ -1097,41 +896,33 @@ public Response updateWithResponse( * @return managed certificates used for Custom Domain bindings of Container Apps in a Managed Environment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedCertificateInner update( - String resourceGroupName, - String environmentName, - String managedCertificateName, - ManagedCertificatePatch managedCertificateEnvelope) { - return updateWithResponse( - resourceGroupName, environmentName, managedCertificateName, managedCertificateEnvelope, Context.NONE) - .getValue(); + public ManagedCertificateInner update(String resourceGroupName, String environmentName, + String managedCertificateName, ManagedCertificatePatch managedCertificateEnvelope) { + return updateWithResponse(resourceGroupName, environmentName, managedCertificateName, + managedCertificateEnvelope, Context.NONE).getValue(); } /** * Get the Managed Certificates in a given managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 Managed Certificates in a given managed environment along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String environmentName) { + private Mono> listSinglePageAsync(String resourceGroupName, + String environmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1143,32 +934,16 @@ private Mono> listSinglePageAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the Managed Certificates in a given managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param context The context to associate with this operation. @@ -1176,22 +951,18 @@ private Mono> listSinglePageAsync( * @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 Managed Certificates in a given managed environment along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listSinglePageAsync( - String resourceGroupName, String environmentName, Context context) { + private Mono> listSinglePageAsync(String resourceGroupName, + String environmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1204,28 +975,15 @@ private Mono> listSinglePageAsync( final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, environmentName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the Managed Certificates in a given managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1235,14 +993,13 @@ private Mono> listSinglePageAsync( */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(String resourceGroupName, String environmentName) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, environmentName), + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName), nextLink -> listNextSinglePageAsync(nextLink)); } /** * Get the Managed Certificates in a given managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param context The context to associate with this operation. @@ -1252,16 +1009,15 @@ private PagedFlux listAsync(String resourceGroupName, S * @return the Managed Certificates in a given managed environment as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listAsync( - String resourceGroupName, String environmentName, Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(resourceGroupName, environmentName, context), + private PagedFlux listAsync(String resourceGroupName, String environmentName, + Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName, context), nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Get the Managed Certificates in a given managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1276,7 +1032,7 @@ public PagedIterable list(String resourceGroupName, Str /** * Get the Managed Certificates in a given managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param context The context to associate with this operation. @@ -1286,21 +1042,22 @@ public PagedIterable list(String resourceGroupName, Str * @return the Managed Certificates in a given managed environment as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable list( - String resourceGroupName, String environmentName, Context context) { + public PagedIterable list(String resourceGroupName, String environmentName, + Context context) { return new PagedIterable<>(listAsync(resourceGroupName, environmentName, context)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of Managed Certificates along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return collection of Managed Certificates along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -1308,37 +1065,28 @@ private Mono> listNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of Managed Certificates along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return collection of Managed Certificates along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -1346,23 +1094,13 @@ private Mono> listNextSinglePageAsync(Str return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesImpl.java index d20f95e682ae..cfdb8c2361cc 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedCertificatesImpl.java @@ -21,22 +21,18 @@ public final class ManagedCertificatesImpl implements ManagedCertificates { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - public ManagedCertificatesImpl( - ManagedCertificatesClient innerClient, + public ManagedCertificatesImpl(ManagedCertificatesClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getWithResponse( - String resourceGroupName, String environmentName, String managedCertificateName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, environmentName, managedCertificateName, context); + public Response getWithResponse(String resourceGroupName, String environmentName, + String managedCertificateName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, environmentName, managedCertificateName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ManagedCertificateImpl(inner.getValue(), this.manager())); } else { return null; @@ -44,8 +40,8 @@ public Response getWithResponse( } public ManagedCertificate get(String resourceGroupName, String environmentName, String managedCertificateName) { - ManagedCertificateInner inner = - this.serviceClient().get(resourceGroupName, environmentName, managedCertificateName); + ManagedCertificateInner inner + = this.serviceClient().get(resourceGroupName, environmentName, managedCertificateName); if (inner != null) { return new ManagedCertificateImpl(inner, this.manager()); } else { @@ -53,11 +49,10 @@ public ManagedCertificate get(String resourceGroupName, String environmentName, } } - public Response deleteWithResponse( - String resourceGroupName, String environmentName, String managedCertificateName, Context context) { - return this - .serviceClient() - .deleteWithResponse(resourceGroupName, environmentName, managedCertificateName, context); + public Response deleteWithResponse(String resourceGroupName, String environmentName, + String managedCertificateName, Context context) { + return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, managedCertificateName, + context); } public void delete(String resourceGroupName, String environmentName, String managedCertificateName) { @@ -66,133 +61,88 @@ public void delete(String resourceGroupName, String environmentName, String mana public PagedIterable list(String resourceGroupName, String environmentName) { PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName); - return Utils.mapPage(inner, inner1 -> new ManagedCertificateImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ManagedCertificateImpl(inner1, this.manager())); } public PagedIterable list(String resourceGroupName, String environmentName, Context context) { - PagedIterable inner = - this.serviceClient().list(resourceGroupName, environmentName, context); - return Utils.mapPage(inner, inner1 -> new ManagedCertificateImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().list(resourceGroupName, environmentName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ManagedCertificateImpl(inner1, this.manager())); } public ManagedCertificate getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); } - String managedCertificateName = Utils.getValueFromIdByName(id, "managedCertificates"); + String managedCertificateName = ResourceManagerUtils.getValueFromIdByName(id, "managedCertificates"); if (managedCertificateName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedCertificates'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedCertificates'.", id))); } - return this - .getWithResponse(resourceGroupName, environmentName, managedCertificateName, Context.NONE) + return this.getWithResponse(resourceGroupName, environmentName, managedCertificateName, Context.NONE) .getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); } - String managedCertificateName = Utils.getValueFromIdByName(id, "managedCertificates"); + String managedCertificateName = ResourceManagerUtils.getValueFromIdByName(id, "managedCertificates"); if (managedCertificateName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedCertificates'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedCertificates'.", id))); } return this.getWithResponse(resourceGroupName, environmentName, managedCertificateName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); } - String managedCertificateName = Utils.getValueFromIdByName(id, "managedCertificates"); + String managedCertificateName = ResourceManagerUtils.getValueFromIdByName(id, "managedCertificates"); if (managedCertificateName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedCertificates'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedCertificates'.", id))); } this.deleteWithResponse(resourceGroupName, environmentName, managedCertificateName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); } - String managedCertificateName = Utils.getValueFromIdByName(id, "managedCertificates"); + String managedCertificateName = ResourceManagerUtils.getValueFromIdByName(id, "managedCertificates"); if (managedCertificateName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedCertificates'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedCertificates'.", id))); } return this.deleteWithResponse(resourceGroupName, environmentName, managedCertificateName, context); } 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 9609f44b6edd..f0b8491e223a 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 @@ -26,93 +26,82 @@ import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedEnvironmentDiagnosticsClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedEnvironmentDiagnosticsClient. + */ public final class ManagedEnvironmentDiagnosticsClientImpl implements ManagedEnvironmentDiagnosticsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedEnvironmentDiagnosticsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerAppsApiClientImpl client; /** * Initializes an instance of ManagedEnvironmentDiagnosticsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedEnvironmentDiagnosticsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create( - ManagedEnvironmentDiagnosticsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedEnvironmentDiagnosticsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } /** - * The interface defining all the services for ContainerAppsApiClientManagedEnvironmentDiagnostics to be used by the - * proxy service to perform REST calls. + * The interface defining all the services for ContainerAppsApiClientManagedEnvironmentDiagnostics to be used by + * the proxy service to perform REST calls. */ @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") public interface ManagedEnvironmentDiagnosticsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/detectors") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/detectors") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listDetectors( - @HostParam("$host") String endpoint, + Mono> listDetectors(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/detectors/{detectorName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/detectors/{detectorName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getDetector( - @HostParam("$host") String endpoint, + Mono> getDetector(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("detectorName") String detectorName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("environmentName") String environmentName, @PathParam("detectorName") String detectorName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); } /** * Get the list of diagnostics for a given Managed Environment. - * - *

Get the list of diagnostics for a Managed Environment used to host container apps. - * + * + * Get the list of diagnostics for a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of diagnostics for a Managed Environment used to host container apps along with {@link Response} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDetectorsWithResponseAsync( - String resourceGroupName, String environmentName) { + private Mono> listDetectorsWithResponseAsync(String resourceGroupName, + String environmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -124,25 +113,16 @@ private Mono> listDetectorsWithResponseAsyn } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listDetectors( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.listDetectors(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the list of diagnostics for a given Managed Environment. - * - *

Get the list of diagnostics for a Managed Environment used to host container apps. - * + * + * Get the list of diagnostics for a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param context The context to associate with this operation. @@ -150,22 +130,18 @@ private Mono> listDetectorsWithResponseAsyn * @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 list of diagnostics for a Managed Environment used to host container apps along with {@link Response} - * on successful completion of {@link Mono}. + * on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listDetectorsWithResponseAsync( - String resourceGroupName, String environmentName, Context context) { + private Mono> listDetectorsWithResponseAsync(String resourceGroupName, + String environmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -177,29 +153,22 @@ private Mono> listDetectorsWithResponseAsyn } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listDetectors( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context); + return service.listDetectors(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, this.client.getApiVersion(), accept, context); } /** * Get the list of diagnostics for a given Managed Environment. - * - *

Get the list of diagnostics for a Managed Environment used to host container apps. - * + * + * Get the list of diagnostics for a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of diagnostics for a Managed Environment used to host container apps on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listDetectorsAsync(String resourceGroupName, String environmentName) { @@ -209,29 +178,29 @@ private Mono listDetectorsAsync(String resourceGroup /** * Get the list of diagnostics for a given Managed Environment. - * - *

Get the list of diagnostics for a Managed Environment used to host container apps. - * + * + * Get the list of diagnostics for a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a Managed Environment used to host container apps along with {@link - * Response}. + * @return the list of diagnostics for a Managed Environment used to host container apps along with + * {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listDetectorsWithResponse( - String resourceGroupName, String environmentName, Context context) { + public Response listDetectorsWithResponse(String resourceGroupName, + String environmentName, Context context) { return listDetectorsWithResponseAsync(resourceGroupName, environmentName, context).block(); } /** * Get the list of diagnostics for a given Managed Environment. - * - *

Get the list of diagnostics for a Managed Environment used to host container apps. - * + * + * Get the list of diagnostics for a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -246,9 +215,9 @@ public DiagnosticsCollectionInner listDetectors(String resourceGroupName, String /** * Get the diagnostics data for a given Managed Environment. - * - *

Get the diagnostics data for a Managed Environment used to host container apps. - * + * + * Get the diagnostics data for a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param detectorName Name of the Managed Environment detector. @@ -256,22 +225,18 @@ public DiagnosticsCollectionInner listDetectors(String resourceGroupName, String * @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 diagnostics data for a Managed Environment used to host container apps along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDetectorWithResponseAsync( - String resourceGroupName, String environmentName, String detectorName) { + private Mono> getDetectorWithResponseAsync(String resourceGroupName, + String environmentName, String detectorName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -286,26 +251,16 @@ private Mono> getDetectorWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getDetector( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - detectorName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.getDetector(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, detectorName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the diagnostics data for a given Managed Environment. - * - *

Get the diagnostics data for a Managed Environment used to host container apps. - * + * + * Get the diagnostics data for a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param detectorName Name of the Managed Environment detector. @@ -314,22 +269,18 @@ private Mono> getDetectorWithResponseAsync( * @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 diagnostics data for a Managed Environment used to host container apps along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getDetectorWithResponseAsync( - String resourceGroupName, String environmentName, String detectorName, Context context) { + private Mono> getDetectorWithResponseAsync(String resourceGroupName, + String environmentName, String detectorName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -344,23 +295,15 @@ private Mono> getDetectorWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getDetector( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - detectorName, - this.client.getApiVersion(), - accept, - context); + return service.getDetector(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, detectorName, this.client.getApiVersion(), accept, context); } /** * Get the diagnostics data for a given Managed Environment. - * - *

Get the diagnostics data for a Managed Environment used to host container apps. - * + * + * Get the diagnostics data for a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param detectorName Name of the Managed Environment detector. @@ -368,20 +311,20 @@ private Mono> getDetectorWithResponseAsync( * @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 diagnostics data for a Managed Environment used to host container apps on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getDetectorAsync( - String resourceGroupName, String environmentName, String detectorName) { + private Mono getDetectorAsync(String resourceGroupName, String environmentName, + String detectorName) { return getDetectorWithResponseAsync(resourceGroupName, environmentName, detectorName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get the diagnostics data for a given Managed Environment. - * - *

Get the diagnostics data for a Managed Environment used to host container apps. - * + * + * Get the diagnostics data for a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param detectorName Name of the Managed Environment detector. @@ -392,16 +335,16 @@ private Mono getDetectorAsync( * @return the diagnostics data for a Managed Environment used to host container apps along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getDetectorWithResponse( - String resourceGroupName, String environmentName, String detectorName, Context context) { + public Response getDetectorWithResponse(String resourceGroupName, String environmentName, + String detectorName, Context context) { return getDetectorWithResponseAsync(resourceGroupName, environmentName, detectorName, context).block(); } /** * Get the diagnostics data for a given Managed Environment. - * - *

Get the diagnostics data for a Managed Environment used to host container apps. - * + * + * Get the diagnostics data for a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param detectorName Name of the Managed Environment detector. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsImpl.java index 6ab273c40556..0a191bfe668a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsImpl.java @@ -22,22 +22,18 @@ public final class ManagedEnvironmentDiagnosticsImpl implements ManagedEnvironme private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - public ManagedEnvironmentDiagnosticsImpl( - ManagedEnvironmentDiagnosticsClient innerClient, + public ManagedEnvironmentDiagnosticsImpl(ManagedEnvironmentDiagnosticsClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response listDetectorsWithResponse( - String resourceGroupName, String environmentName, Context context) { - Response inner = - this.serviceClient().listDetectorsWithResponse(resourceGroupName, environmentName, context); + public Response listDetectorsWithResponse(String resourceGroupName, String environmentName, + Context context) { + Response inner + = this.serviceClient().listDetectorsWithResponse(resourceGroupName, environmentName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DiagnosticsCollectionImpl(inner.getValue(), this.manager())); } else { return null; @@ -53,15 +49,12 @@ public DiagnosticsCollection listDetectors(String resourceGroupName, String envi } } - public Response getDetectorWithResponse( - String resourceGroupName, String environmentName, String detectorName, Context context) { - Response inner = - this.serviceClient().getDetectorWithResponse(resourceGroupName, environmentName, detectorName, context); + public Response getDetectorWithResponse(String resourceGroupName, String environmentName, + String detectorName, Context context) { + Response inner + = this.serviceClient().getDetectorWithResponse(resourceGroupName, environmentName, detectorName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new DiagnosticsImpl(inner.getValue(), this.manager())); } else { return null; 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 1d0877490ef0..9a5213f6b0bf 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java @@ -9,6 +9,7 @@ import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; +import com.azure.resourcemanager.appcontainers.models.AppInsightsConfiguration; import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; import com.azure.resourcemanager.appcontainers.models.DaprConfiguration; @@ -17,6 +18,8 @@ import com.azure.resourcemanager.appcontainers.models.KedaConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironment; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import java.util.Collections; @@ -58,6 +61,10 @@ public String kind() { return this.innerModel().kind(); } + public ManagedServiceIdentity identity() { + return this.innerModel().identity(); + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -94,6 +101,14 @@ public AppLogsConfiguration appLogsConfiguration() { return this.innerModel().appLogsConfiguration(); } + public AppInsightsConfiguration appInsightsConfiguration() { + return this.innerModel().appInsightsConfiguration(); + } + + public OpenTelemetryConfiguration openTelemetryConfiguration() { + return this.innerModel().openTelemetryConfiguration(); + } + public Boolean zoneRedundant() { return this.innerModel().zoneRedundant(); } @@ -161,25 +176,19 @@ public ManagedEnvironmentImpl withExistingResourceGroup(String resourceGroupName } public ManagedEnvironment create() { - this.innerObject = - serviceManager - .serviceClient() - .getManagedEnvironments() - .createOrUpdate(resourceGroupName, environmentName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getManagedEnvironments().createOrUpdate(resourceGroupName, + environmentName, this.innerModel(), Context.NONE); return this; } public ManagedEnvironment create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getManagedEnvironments() - .createOrUpdate(resourceGroupName, environmentName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getManagedEnvironments().createOrUpdate(resourceGroupName, + environmentName, this.innerModel(), context); return this; } - ManagedEnvironmentImpl( - String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + ManagedEnvironmentImpl(String name, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = new ManagedEnvironmentInner(); this.serviceManager = serviceManager; this.environmentName = name; @@ -190,56 +199,40 @@ public ManagedEnvironmentImpl update() { } public ManagedEnvironment apply() { - this.innerObject = - serviceManager - .serviceClient() - .getManagedEnvironments() - .update(resourceGroupName, environmentName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getManagedEnvironments().update(resourceGroupName, + environmentName, this.innerModel(), Context.NONE); return this; } public ManagedEnvironment apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getManagedEnvironments() - .update(resourceGroupName, environmentName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getManagedEnvironments().update(resourceGroupName, + environmentName, this.innerModel(), context); return this; } - ManagedEnvironmentImpl( - ManagedEnvironmentInner innerObject, + ManagedEnvironmentImpl(ManagedEnvironmentInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.environmentName = Utils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.environmentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); } public ManagedEnvironment refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getManagedEnvironments() - .getByResourceGroupWithResponse(resourceGroupName, environmentName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getManagedEnvironments() + .getByResourceGroupWithResponse(resourceGroupName, environmentName, Context.NONE).getValue(); return this; } public ManagedEnvironment refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getManagedEnvironments() - .getByResourceGroupWithResponse(resourceGroupName, environmentName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getManagedEnvironments() + .getByResourceGroupWithResponse(resourceGroupName, environmentName, context).getValue(); return this; } public Response getAuthTokenWithResponse(Context context) { - return serviceManager - .managedEnvironments() - .getAuthTokenWithResponse(resourceGroupName, environmentName, context); + return serviceManager.managedEnvironments().getAuthTokenWithResponse(resourceGroupName, environmentName, + context); } public EnvironmentAuthToken getAuthToken() { @@ -266,6 +259,11 @@ public ManagedEnvironmentImpl withKind(String kind) { return this; } + public ManagedEnvironmentImpl withIdentity(ManagedServiceIdentity identity) { + this.innerModel().withIdentity(identity); + return this; + } + public ManagedEnvironmentImpl withDaprAIInstrumentationKey(String daprAIInstrumentationKey) { this.innerModel().withDaprAIInstrumentationKey(daprAIInstrumentationKey); return this; @@ -286,6 +284,17 @@ public ManagedEnvironmentImpl withAppLogsConfiguration(AppLogsConfiguration appL return this; } + public ManagedEnvironmentImpl withAppInsightsConfiguration(AppInsightsConfiguration appInsightsConfiguration) { + this.innerModel().withAppInsightsConfiguration(appInsightsConfiguration); + return this; + } + + public ManagedEnvironmentImpl + withOpenTelemetryConfiguration(OpenTelemetryConfiguration openTelemetryConfiguration) { + this.innerModel().withOpenTelemetryConfiguration(openTelemetryConfiguration); + return this; + } + public ManagedEnvironmentImpl withZoneRedundant(Boolean zoneRedundant) { this.innerModel().withZoneRedundant(zoneRedundant); return this; @@ -316,8 +325,8 @@ public ManagedEnvironmentImpl withInfrastructureResourceGroup(String infrastruct return this; } - public ManagedEnvironmentImpl withPeerAuthentication( - ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication) { + public ManagedEnvironmentImpl + withPeerAuthentication(ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication) { this.innerModel().withPeerAuthentication(peerAuthentication); return this; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStorageImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStorageImpl.java index dc5d0b9e1ee4..fb765ed16d53 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStorageImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStorageImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStorageInner; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorage; @@ -31,6 +32,10 @@ public ManagedEnvironmentStorageProperties properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public String resourceGroupName() { return resourceGroupName; } @@ -49,36 +54,28 @@ private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager( private String storageName; - public ManagedEnvironmentStorageImpl withExistingManagedEnvironment( - String resourceGroupName, String environmentName) { + public ManagedEnvironmentStorageImpl withExistingManagedEnvironment(String resourceGroupName, + String environmentName) { this.resourceGroupName = resourceGroupName; this.environmentName = environmentName; return this; } public ManagedEnvironmentStorage create() { - this.innerObject = - serviceManager - .serviceClient() - .getManagedEnvironmentsStorages() - .createOrUpdateWithResponse( - resourceGroupName, environmentName, storageName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getManagedEnvironmentsStorages().createOrUpdateWithResponse( + resourceGroupName, environmentName, storageName, this.innerModel(), Context.NONE).getValue(); return this; } public ManagedEnvironmentStorage create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getManagedEnvironmentsStorages() - .createOrUpdateWithResponse(resourceGroupName, environmentName, storageName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getManagedEnvironmentsStorages() + .createOrUpdateWithResponse(resourceGroupName, environmentName, storageName, this.innerModel(), context) + .getValue(); return this; } - ManagedEnvironmentStorageImpl( - String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + ManagedEnvironmentStorageImpl(String name, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = new ManagedEnvironmentStorageInner(); this.serviceManager = serviceManager; this.storageName = name; @@ -89,53 +86,36 @@ public ManagedEnvironmentStorageImpl update() { } public ManagedEnvironmentStorage apply() { - this.innerObject = - serviceManager - .serviceClient() - .getManagedEnvironmentsStorages() - .createOrUpdateWithResponse( - resourceGroupName, environmentName, storageName, this.innerModel(), Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getManagedEnvironmentsStorages().createOrUpdateWithResponse( + resourceGroupName, environmentName, storageName, this.innerModel(), Context.NONE).getValue(); return this; } public ManagedEnvironmentStorage apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getManagedEnvironmentsStorages() - .createOrUpdateWithResponse(resourceGroupName, environmentName, storageName, this.innerModel(), context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getManagedEnvironmentsStorages() + .createOrUpdateWithResponse(resourceGroupName, environmentName, storageName, this.innerModel(), context) + .getValue(); return this; } - ManagedEnvironmentStorageImpl( - ManagedEnvironmentStorageInner innerObject, + ManagedEnvironmentStorageImpl(ManagedEnvironmentStorageInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.environmentName = Utils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); - this.storageName = Utils.getValueFromIdByName(innerObject.id(), "storages"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.environmentName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "managedEnvironments"); + this.storageName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "storages"); } public ManagedEnvironmentStorage refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getManagedEnvironmentsStorages() - .getWithResponse(resourceGroupName, environmentName, storageName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getManagedEnvironmentsStorages() + .getWithResponse(resourceGroupName, environmentName, storageName, Context.NONE).getValue(); return this; } public ManagedEnvironmentStorage refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getManagedEnvironmentsStorages() - .getWithResponse(resourceGroupName, environmentName, storageName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getManagedEnvironmentsStorages() + .getWithResponse(resourceGroupName, environmentName, storageName, context).getValue(); return this; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStoragesCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStoragesCollectionImpl.java index 6fa6eecef739..4a37a11ebfed 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStoragesCollectionImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentStoragesCollectionImpl.java @@ -17,8 +17,7 @@ public final class ManagedEnvironmentStoragesCollectionImpl implements ManagedEn private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - ManagedEnvironmentStoragesCollectionImpl( - ManagedEnvironmentStoragesCollectionInner innerObject, + ManagedEnvironmentStoragesCollectionImpl(ManagedEnvironmentStoragesCollectionInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -27,12 +26,8 @@ public final class ManagedEnvironmentStoragesCollectionImpl implements ManagedEn public List value() { List inner = this.innerModel().value(); if (inner != null) { - return Collections - .unmodifiableList( - inner - .stream() - .map(inner1 -> new ManagedEnvironmentStorageImpl(inner1, this.manager())) - .collect(Collectors.toList())); + return Collections.unmodifiableList(inner.stream() + .map(inner1 -> new ManagedEnvironmentStorageImpl(inner1, this.manager())).collect(Collectors.toList())); } else { return Collections.emptyList(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesClientImpl.java new file mode 100644 index 000000000000..c9e4fdceb164 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesClientImpl.java @@ -0,0 +1,283 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentUsagesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; +import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appcontainers.models.ListUsagesResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in ManagedEnvironmentUsagesClient. + */ +public final class ManagedEnvironmentUsagesClientImpl implements ManagedEnvironmentUsagesClient { + /** + * The proxy service used to perform REST calls. + */ + private final ManagedEnvironmentUsagesService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of ManagedEnvironmentUsagesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + ManagedEnvironmentUsagesClientImpl(ContainerAppsApiClientImpl client) { + this.service = RestProxy.create(ManagedEnvironmentUsagesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientManagedEnvironmentUsages to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface ManagedEnvironmentUsagesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/usages") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets the current usage information as well as the limits for environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current usage information as well as the limits for environment along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String environmentName) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets the current usage information as well as the limits for environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current usage information as well as the limits for environment along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String resourceGroupName, String environmentName, + Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (environmentName == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, environmentName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets the current usage information as well as the limits for environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current usage information as well as the limits for environment as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String environmentName) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName), + nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets the current usage information as well as the limits for environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current usage information as well as the limits for environment as paginated response with + * {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String environmentName, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(resourceGroupName, environmentName, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets the current usage information as well as the limits for environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current usage information as well as the limits for environment as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String environmentName) { + return new PagedIterable<>(listAsync(resourceGroupName, environmentName)); + } + + /** + * Gets the current usage information as well as the limits for environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the current usage information as well as the limits for environment as paginated response with + * {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String environmentName, Context context) { + return new PagedIterable<>(listAsync(resourceGroupName, environmentName, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesImpl.java new file mode 100644 index 000000000000..d50d07f8e2b2 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentUsagesImpl.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentUsagesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentUsages; +import com.azure.resourcemanager.appcontainers.models.Usage; + +public final class ManagedEnvironmentUsagesImpl implements ManagedEnvironmentUsages { + private static final ClientLogger LOGGER = new ClientLogger(ManagedEnvironmentUsagesImpl.class); + + private final ManagedEnvironmentUsagesClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public ManagedEnvironmentUsagesImpl(ManagedEnvironmentUsagesClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String resourceGroupName, String environmentName) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); + } + + public PagedIterable list(String resourceGroupName, String environmentName, Context context) { + PagedIterable inner = this.serviceClient().list(resourceGroupName, environmentName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); + } + + private ManagedEnvironmentUsagesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsClientImpl.java index 17ca79951291..d1d0a06f943d 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 @@ -43,22 +43,28 @@ import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedEnvironmentsClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedEnvironmentsClient. + */ public final class ManagedEnvironmentsClientImpl implements ManagedEnvironmentsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedEnvironmentsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerAppsApiClientImpl client; /** * Initializes an instance of ManagedEnvironmentsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedEnvironmentsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy.create(ManagedEnvironmentsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedEnvironmentsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -69,260 +75,190 @@ public final class ManagedEnvironmentsClientImpl implements ManagedEnvironmentsC @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") public interface ManagedEnvironmentsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/managedEnvironments") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list( - @HostParam("$host") String endpoint, - @PathParam("subscriptionId") String subscriptionId, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listByResourceGroup( - @HostParam("$host") String endpoint, + Mono> listByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getByResourceGroup( - @HostParam("$host") String endpoint, + Mono> getByResourceGroup(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}") - @ExpectedResponses({200, 201}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}") + @ExpectedResponses({ 200, 201 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> createOrUpdate( - @HostParam("$host") String endpoint, + Mono>> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @QueryParam("api-version") String apiVersion, + @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ManagedEnvironmentInner environmentEnvelope, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}") - @ExpectedResponses({200, 202, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}") + @ExpectedResponses({ 200, 202, 204 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> delete( - @HostParam("$host") String endpoint, + Mono>> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Patch( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}") - @ExpectedResponses({200, 202}) + @Headers({ "Content-Type: application/json" }) + @Patch("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}") + @ExpectedResponses({ 200, 202 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono>> update( - @HostParam("$host") String endpoint, + Mono>> update(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @QueryParam("api-version") String apiVersion, + @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ManagedEnvironmentInner environmentEnvelope, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/getAuthtoken") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/getAuthtoken") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getAuthToken( - @HostParam("$host") String endpoint, + Mono> getAuthToken(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/workloadProfileStates") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/workloadProfileStates") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listWorkloadProfileStates( - @HostParam("$host") String endpoint, + Mono> listWorkloadProfileStates(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @QueryParam("api-version") String apiVersion, - @PathParam("environmentName") String environmentName, - @HeaderParam("Accept") String accept, + @PathParam("resourceGroupName") String resourceGroupName, @QueryParam("api-version") String apiVersion, + @PathParam("environmentName") String environmentName, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listBySubscriptionNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listByResourceGroupNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono> listWorkloadProfileStatesNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, Context context); } /** * Get all Environments for a subscription. - * - *

Get all Managed Environments for a subscription. - * + * + * Get all Managed Environments for a subscription. + * * @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 all Managed Environments for a subscription along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get all Environments for a subscription. - * - *

Get all Managed Environments for a subscription. - * + * + * Get all Managed Environments for a subscription. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all Managed Environments for a subscription along with {@link PagedResponse} on successful completion of - * {@link Mono}. + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - this.client.getApiVersion(), - accept, + .list(this.client.getEndpoint(), this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get all Environments for a subscription. - * - *

Get all Managed Environments for a subscription. - * + * + * Get all Managed Environments for a subscription. + * * @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 all Managed Environments for a subscription as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync() { - return new PagedFlux<>( - () -> listSinglePageAsync(), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); + return new PagedFlux<>(() -> listSinglePageAsync(), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)); } /** * Get all Environments for a subscription. - * - *

Get all Managed Environments for a subscription. - * + * + * Get all Managed Environments for a subscription. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -331,15 +267,15 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listBySubscriptionNextSinglePageAsync(nextLink, context)); } /** * Get all Environments for a subscription. - * - *

Get all Managed Environments for a subscription. - * + * + * Get all Managed Environments for a subscription. + * * @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 all Managed Environments for a subscription as paginated response with {@link PagedIterable}. @@ -351,9 +287,9 @@ public PagedIterable list() { /** * Get all Environments for a subscription. - * - *

Get all Managed Environments for a subscription. - * + * + * Get all Managed Environments for a subscription. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -367,29 +303,25 @@ public PagedIterable list(Context context) { /** * Get all the Environments in a resource group. - * - *

Get all the Managed Environments in a resource group. - * + * + * Get all the Managed Environments in a resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @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 all the Managed Environments in a resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -397,55 +329,36 @@ private Mono> listByResourceGroupSinglePa } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .withContext(context -> service.listByResourceGroup(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get all the Environments in a resource group. - * - *

Get all the Managed Environments in a resource group. - * + * + * Get all the Managed Environments in a resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all the Managed Environments in a resource group along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupSinglePageAsync( - String resourceGroupName, Context context) { + private Mono> listByResourceGroupSinglePageAsync(String resourceGroupName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -454,29 +367,17 @@ private Mono> listByResourceGroupSinglePa final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get all the Environments in a resource group. - * - *

Get all the Managed Environments in a resource group. - * + * + * Get all the Managed Environments in a resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -485,16 +386,15 @@ private Mono> listByResourceGroupSinglePa */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink)); } /** * Get all the Environments in a resource group. - * - *

Get all the Managed Environments in a resource group. - * + * + * Get all the Managed Environments in a resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -504,16 +404,15 @@ private PagedFlux listByResourceGroupAsync(String resou */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listByResourceGroupAsync(String resourceGroupName, Context context) { - return new PagedFlux<>( - () -> listByResourceGroupSinglePageAsync(resourceGroupName, context), + return new PagedFlux<>(() -> listByResourceGroupSinglePageAsync(resourceGroupName, context), nextLink -> listByResourceGroupNextSinglePageAsync(nextLink, context)); } /** * Get all the Environments in a resource group. - * - *

Get all the Managed Environments in a resource group. - * + * + * Get all the Managed Environments in a resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -527,9 +426,9 @@ public PagedIterable listByResourceGroup(String resourc /** * Get all the Environments in a resource group. - * - *

Get all the Managed Environments in a resource group. - * + * + * Get all the Managed Environments in a resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -544,31 +443,27 @@ public PagedIterable listByResourceGroup(String resourc /** * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * + * + * Get the properties of a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Managed Environment used to host container apps along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String environmentName) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String environmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -581,24 +476,16 @@ private Mono> getByResourceGroupWithResponseAs final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context)) + context -> service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * + * + * Get the properties of a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param context The context to associate with this operation. @@ -606,22 +493,18 @@ private Mono> getByResourceGroupWithResponseAs * @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 properties of a Managed Environment used to host container apps along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getByResourceGroupWithResponseAsync( - String resourceGroupName, String environmentName, Context context) { + private Mono> getByResourceGroupWithResponseAsync(String resourceGroupName, + String environmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -633,29 +516,22 @@ private Mono> getByResourceGroupWithResponseAs } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getByResourceGroup( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context); + return service.getByResourceGroup(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, this.client.getApiVersion(), accept, context); } /** * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * + * + * Get the properties of a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps on successful completion of {@link - * Mono}. + * @return the properties of a Managed Environment used to host container apps on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getByResourceGroupAsync(String resourceGroupName, String environmentName) { @@ -665,9 +541,9 @@ private Mono getByResourceGroupAsync(String resourceGro /** * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * + * + * Get the properties of a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param context The context to associate with this operation. @@ -677,16 +553,16 @@ private Mono getByResourceGroupAsync(String resourceGro * @return the properties of a Managed Environment used to host container apps along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String environmentName, Context context) { + public Response getByResourceGroupWithResponse(String resourceGroupName, + String environmentName, Context context) { return getByResourceGroupWithResponseAsync(resourceGroupName, environmentName, context).block(); } /** * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * + * + * Get the properties of a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -701,32 +577,28 @@ public ManagedEnvironmentInner getByResourceGroup(String resourceGroupName, Stri /** * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * + * + * Creates or updates a Managed Environment used to host container apps. + * * @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 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 along with {@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>> createOrUpdateWithResponseAsync( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String environmentName, ManagedEnvironmentInner environmentEnvelope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -744,26 +616,16 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - environmentEnvelope, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, this.client.getApiVersion(), environmentEnvelope, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * + * + * Creates or updates a Managed Environment used to host container apps. + * * @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. @@ -771,26 +633,19 @@ private Mono>> createOrUpdateWithResponseAsync( * @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 along with {@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>> createOrUpdateWithResponseAsync( - String resourceGroupName, - String environmentName, - ManagedEnvironmentInner environmentEnvelope, - Context context) { + private Mono>> createOrUpdateWithResponseAsync(String resourceGroupName, + String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -808,23 +663,15 @@ private Mono>> createOrUpdateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - environmentEnvelope, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, this.client.getApiVersion(), environmentEnvelope, accept, context); } /** * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * + * + * Creates or updates a Managed Environment used to host container apps. + * * @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. @@ -836,23 +683,18 @@ private Mono>> createOrUpdateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ManagedEnvironmentInner> beginCreateOrUpdateAsync( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, environmentName, environmentEnvelope); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedEnvironmentInner.class, - ManagedEnvironmentInner.class, - this.client.getContext()); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, environmentName, environmentEnvelope); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ManagedEnvironmentInner.class, ManagedEnvironmentInner.class, + this.client.getContext()); } /** * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * + * + * Creates or updates a Managed Environment used to host container apps. + * * @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. @@ -864,28 +706,20 @@ private PollerFlux, ManagedEnvironmentInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ManagedEnvironmentInner> beginCreateOrUpdateAsync( - String resourceGroupName, - String environmentName, - ManagedEnvironmentInner environmentEnvelope, + String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - createOrUpdateWithResponseAsync(resourceGroupName, environmentName, environmentEnvelope, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedEnvironmentInner.class, - ManagedEnvironmentInner.class, - context); + Mono>> mono + = createOrUpdateWithResponseAsync(resourceGroupName, environmentName, environmentEnvelope, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ManagedEnvironmentInner.class, ManagedEnvironmentInner.class, context); } /** * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * + * + * Creates or updates a Managed Environment used to host container apps. + * * @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. @@ -902,9 +736,9 @@ public SyncPoller, ManagedEnvironmentInner> /** * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * + * + * Creates or updates a Managed Environment used to host container apps. + * * @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. @@ -916,20 +750,17 @@ public SyncPoller, ManagedEnvironmentInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedEnvironmentInner> beginCreateOrUpdate( - String resourceGroupName, - String environmentName, - ManagedEnvironmentInner environmentEnvelope, + String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context) { - return this - .beginCreateOrUpdateAsync(resourceGroupName, environmentName, environmentEnvelope, context) + return this.beginCreateOrUpdateAsync(resourceGroupName, environmentName, environmentEnvelope, context) .getSyncPoller(); } /** * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * + * + * Creates or updates a Managed Environment used to host container apps. + * * @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. @@ -939,18 +770,17 @@ public SyncPoller, ManagedEnvironmentInner> * @return an environment for hosting container apps on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - return beginCreateOrUpdateAsync(resourceGroupName, environmentName, environmentEnvelope) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, + ManagedEnvironmentInner environmentEnvelope) { + return beginCreateOrUpdateAsync(resourceGroupName, environmentName, environmentEnvelope).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * + * + * Creates or updates a Managed Environment used to host container apps. + * * @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. @@ -961,21 +791,17 @@ private Mono createOrUpdateAsync( * @return an environment for hosting container apps on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String environmentName, - ManagedEnvironmentInner environmentEnvelope, - Context context) { - return beginCreateOrUpdateAsync(resourceGroupName, environmentName, environmentEnvelope, context) - .last() + private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, + ManagedEnvironmentInner environmentEnvelope, Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, environmentName, environmentEnvelope, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * + * + * Creates or updates a Managed Environment used to host container apps. + * * @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. @@ -985,16 +811,16 @@ private Mono createOrUpdateAsync( * @return an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentInner createOrUpdate( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { + public ManagedEnvironmentInner createOrUpdate(String resourceGroupName, String environmentName, + ManagedEnvironmentInner environmentEnvelope) { return createOrUpdateAsync(resourceGroupName, environmentName, environmentEnvelope).block(); } /** * Creates or updates a Managed Environment. - * - *

Creates or updates a Managed Environment used to host container apps. - * + * + * Creates or updates a Managed Environment used to host container apps. + * * @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. @@ -1005,19 +831,16 @@ public ManagedEnvironmentInner createOrUpdate( * @return an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentInner createOrUpdate( - String resourceGroupName, - String environmentName, - ManagedEnvironmentInner environmentEnvelope, - Context context) { + public ManagedEnvironmentInner createOrUpdate(String resourceGroupName, String environmentName, + ManagedEnvironmentInner environmentEnvelope, Context context) { return createOrUpdateAsync(resourceGroupName, environmentName, environmentEnvelope, context).block(); } /** * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * + * + * Delete a Managed Environment if it does not have any container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1028,16 +851,12 @@ public ManagedEnvironmentInner createOrUpdate( @ServiceMethod(returns = ReturnType.SINGLE) private Mono>> deleteWithResponseAsync(String resourceGroupName, String environmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1049,25 +868,16 @@ private Mono>> deleteWithResponseAsync(String resource } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * + * + * Delete a Managed Environment if it does not have any container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param context The context to associate with this operation. @@ -1077,19 +887,15 @@ private Mono>> deleteWithResponseAsync(String resource * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono>> deleteWithResponseAsync( - String resourceGroupName, String environmentName, Context context) { + private Mono>> deleteWithResponseAsync(String resourceGroupName, String environmentName, + Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1101,22 +907,15 @@ private Mono>> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, this.client.getApiVersion(), accept, context); } /** * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * + * + * Delete a Managed Environment if it does not have any container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1127,17 +926,15 @@ private Mono>> deleteWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String environmentName) { Mono>> mono = deleteWithResponseAsync(resourceGroupName, environmentName); - return this - .client - .getLroResult( - mono, this.client.getHttpPipeline(), Void.class, Void.class, this.client.getContext()); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + this.client.getContext()); } /** * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * + * + * Delete a Managed Environment if it does not have any container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param context The context to associate with this operation. @@ -1147,20 +944,19 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup * @return the {@link PollerFlux} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - private PollerFlux, Void> beginDeleteAsync( - String resourceGroupName, String environmentName, Context context) { + private PollerFlux, Void> beginDeleteAsync(String resourceGroupName, String environmentName, + Context context) { context = this.client.mergeContext(context); Mono>> mono = deleteWithResponseAsync(resourceGroupName, environmentName, context); - return this - .client - .getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, context); + return this.client.getLroResult(mono, this.client.getHttpPipeline(), Void.class, Void.class, + context); } /** * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * + * + * Delete a Managed Environment if it does not have any container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1175,9 +971,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, /** * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * + * + * Delete a Managed Environment if it does not have any container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param context The context to associate with this operation. @@ -1187,16 +983,16 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, * @return the {@link SyncPoller} for polling of long-running operation. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, Void> beginDelete( - String resourceGroupName, String environmentName, Context context) { + public SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName, + Context context) { return this.beginDeleteAsync(resourceGroupName, environmentName, context).getSyncPoller(); } /** * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * + * + * Delete a Managed Environment if it does not have any container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1206,16 +1002,15 @@ public SyncPoller, Void> beginDelete( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String environmentName) { - return beginDeleteAsync(resourceGroupName, environmentName) - .last() + return beginDeleteAsync(resourceGroupName, environmentName).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * + * + * Delete a Managed Environment if it does not have any container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param context The context to associate with this operation. @@ -1226,16 +1021,15 @@ private Mono deleteAsync(String resourceGroupName, String environmentName) */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono deleteAsync(String resourceGroupName, String environmentName, Context context) { - return beginDeleteAsync(resourceGroupName, environmentName, context) - .last() + return beginDeleteAsync(resourceGroupName, environmentName, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * + * + * Delete a Managed Environment if it does not have any container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1249,9 +1043,9 @@ public void delete(String resourceGroupName, String environmentName) { /** * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * + * + * Delete a Managed Environment if it does not have any container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param context The context to associate with this operation. @@ -1266,32 +1060,28 @@ public void delete(String resourceGroupName, String environmentName, Context con /** * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * + * + * 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 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 along with {@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( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String environmentName, + ManagedEnvironmentInner environmentEnvelope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1309,26 +1099,16 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - environmentEnvelope, - accept, - context)) + .withContext(context -> service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, this.client.getApiVersion(), environmentEnvelope, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * + * + * 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. @@ -1336,26 +1116,19 @@ 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 an environment for hosting container apps along with {@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( - String resourceGroupName, - String environmentName, - ManagedEnvironmentInner environmentEnvelope, - Context context) { + private Mono>> updateWithResponseAsync(String resourceGroupName, String environmentName, + ManagedEnvironmentInner environmentEnvelope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1373,23 +1146,15 @@ private Mono>> updateWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .update( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - environmentEnvelope, - accept, - context); + return service.update(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, this.client.getApiVersion(), environmentEnvelope, accept, context); } /** * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * + * + * 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. @@ -1401,23 +1166,18 @@ private Mono>> updateWithResponseAsync( @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ManagedEnvironmentInner> beginUpdateAsync( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - Mono>> mono = - updateWithResponseAsync(resourceGroupName, environmentName, environmentEnvelope); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedEnvironmentInner.class, - ManagedEnvironmentInner.class, - this.client.getContext()); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, environmentName, environmentEnvelope); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ManagedEnvironmentInner.class, ManagedEnvironmentInner.class, + this.client.getContext()); } /** * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * + * + * 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. @@ -1429,28 +1189,20 @@ private PollerFlux, ManagedEnvironmentInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) private PollerFlux, ManagedEnvironmentInner> beginUpdateAsync( - String resourceGroupName, - String environmentName, - ManagedEnvironmentInner environmentEnvelope, + String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context) { context = this.client.mergeContext(context); - Mono>> mono = - updateWithResponseAsync(resourceGroupName, environmentName, environmentEnvelope, context); - return this - .client - .getLroResult( - mono, - this.client.getHttpPipeline(), - ManagedEnvironmentInner.class, - ManagedEnvironmentInner.class, - context); + Mono>> mono + = updateWithResponseAsync(resourceGroupName, environmentName, environmentEnvelope, context); + return this.client.getLroResult(mono, + this.client.getHttpPipeline(), ManagedEnvironmentInner.class, ManagedEnvironmentInner.class, context); } /** * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * + * + * 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. @@ -1460,16 +1212,16 @@ private PollerFlux, ManagedEnvironmentInner> * @return the {@link SyncPoller} for polling of an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) - public SyncPoller, ManagedEnvironmentInner> beginUpdate( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { + public SyncPoller, ManagedEnvironmentInner> + beginUpdate(String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { return this.beginUpdateAsync(resourceGroupName, environmentName, environmentEnvelope).getSyncPoller(); } /** * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * + * + * 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. @@ -1481,18 +1233,16 @@ public SyncPoller, ManagedEnvironmentInner> */ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller, ManagedEnvironmentInner> beginUpdate( - String resourceGroupName, - String environmentName, - ManagedEnvironmentInner environmentEnvelope, + String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context) { return this.beginUpdateAsync(resourceGroupName, environmentName, environmentEnvelope, context).getSyncPoller(); } /** * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * + * + * 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. @@ -1502,18 +1252,17 @@ public SyncPoller, ManagedEnvironmentInner> * @return an environment for hosting container apps on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { - return beginUpdateAsync(resourceGroupName, environmentName, environmentEnvelope) - .last() + private Mono updateAsync(String resourceGroupName, String environmentName, + ManagedEnvironmentInner environmentEnvelope) { + return beginUpdateAsync(resourceGroupName, environmentName, environmentEnvelope).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * + * + * 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. @@ -1524,21 +1273,17 @@ private Mono updateAsync( * @return an environment for hosting container apps on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono updateAsync( - String resourceGroupName, - String environmentName, - ManagedEnvironmentInner environmentEnvelope, - Context context) { - return beginUpdateAsync(resourceGroupName, environmentName, environmentEnvelope, context) - .last() + private Mono updateAsync(String resourceGroupName, String environmentName, + ManagedEnvironmentInner environmentEnvelope, Context context) { + return beginUpdateAsync(resourceGroupName, environmentName, environmentEnvelope, context).last() .flatMap(this.client::getLroFinalResultOrError); } /** * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * + * + * 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. @@ -1548,16 +1293,16 @@ private Mono updateAsync( * @return an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentInner update( - String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope) { + public ManagedEnvironmentInner update(String resourceGroupName, String environmentName, + ManagedEnvironmentInner environmentEnvelope) { return updateAsync(resourceGroupName, environmentName, environmentEnvelope).block(); } /** * Update Managed Environment's properties. - * - *

Patches a Managed Environment using JSON Merge Patch. - * + * + * 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. @@ -1568,19 +1313,16 @@ public ManagedEnvironmentInner update( * @return an environment for hosting container apps. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentInner update( - String resourceGroupName, - String environmentName, - ManagedEnvironmentInner environmentEnvelope, - Context context) { + public ManagedEnvironmentInner update(String resourceGroupName, String environmentName, + ManagedEnvironmentInner environmentEnvelope, Context context) { return updateAsync(resourceGroupName, environmentName, environmentEnvelope, context).block(); } /** * Get auth token for a managed environment - * - *

Checks if resource name is available. - * + * + * Checks if resource name is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1589,19 +1331,15 @@ public ManagedEnvironmentInner update( * @return environment Auth Token along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getAuthTokenWithResponseAsync( - String resourceGroupName, String environmentName) { + private Mono> getAuthTokenWithResponseAsync(String resourceGroupName, + String environmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1613,25 +1351,16 @@ private Mono> getAuthTokenWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getAuthToken( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.getAuthToken(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get auth token for a managed environment - * - *

Checks if resource name is available. - * + * + * Checks if resource name is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param context The context to associate with this operation. @@ -1641,19 +1370,15 @@ private Mono> getAuthTokenWithResponseAsync( * @return environment Auth Token along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getAuthTokenWithResponseAsync( - String resourceGroupName, String environmentName, Context context) { + private Mono> getAuthTokenWithResponseAsync(String resourceGroupName, + String environmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1665,22 +1390,15 @@ private Mono> getAuthTokenWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getAuthToken( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context); + return service.getAuthToken(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, this.client.getApiVersion(), accept, context); } /** * Get auth token for a managed environment - * - *

Checks if resource name is available. - * + * + * Checks if resource name is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1696,9 +1414,9 @@ private Mono getAuthTokenAsync(String resourceGroupNa /** * Get auth token for a managed environment - * - *

Checks if resource name is available. - * + * + * Checks if resource name is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param context The context to associate with this operation. @@ -1708,16 +1426,16 @@ private Mono getAuthTokenAsync(String resourceGroupNa * @return environment Auth Token along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getAuthTokenWithResponse( - String resourceGroupName, String environmentName, Context context) { + public Response getAuthTokenWithResponse(String resourceGroupName, + String environmentName, Context context) { return getAuthTokenWithResponseAsync(resourceGroupName, environmentName, context).block(); } /** * Get auth token for a managed environment - * - *

Checks if resource name is available. - * + * + * Checks if resource name is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1732,31 +1450,27 @@ public EnvironmentAuthTokenInner getAuthToken(String resourceGroupName, String e /** * Get all workload Profile States for a Managed Environment.. - * - *

Get all workload Profile States for a Managed Environment. - * + * + * Get all workload Profile States for a Managed Environment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all workload Profile States for a Managed Environment along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWorkloadProfileStatesSinglePageAsync( - String resourceGroupName, String environmentName) { + private Mono> + listWorkloadProfileStatesSinglePageAsync(String resourceGroupName, String environmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1769,33 +1483,18 @@ private Mono> listWorkloadProfileState final String accept = "application/json"; return FluxUtil .withContext( - context -> - service - .listWorkloadProfileStates( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - environmentName, - accept, - context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + context -> service.listWorkloadProfileStates(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, this.client.getApiVersion(), environmentName, accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get all workload Profile States for a Managed Environment.. - * - *

Get all workload Profile States for a Managed Environment. - * + * + * Get all workload Profile States for a Managed Environment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param context The context to associate with this operation. @@ -1803,22 +1502,18 @@ private Mono> listWorkloadProfileState * @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 all workload Profile States for a Managed Environment along with {@link PagedResponse} on successful - * completion of {@link Mono}. + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWorkloadProfileStatesSinglePageAsync( - String resourceGroupName, String environmentName, Context context) { + private Mono> + listWorkloadProfileStatesSinglePageAsync(String resourceGroupName, String environmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -1831,30 +1526,17 @@ private Mono> listWorkloadProfileState final String accept = "application/json"; context = this.client.mergeContext(context); return service - .listWorkloadProfileStates( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - this.client.getApiVersion(), - environmentName, - accept, - context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + .listWorkloadProfileStates(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + this.client.getApiVersion(), environmentName, accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get all workload Profile States for a Managed Environment.. - * - *

Get all workload Profile States for a Managed Environment. - * + * + * Get all workload Profile States for a Managed Environment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1863,18 +1545,17 @@ private Mono> listWorkloadProfileState * @return all workload Profile States for a Managed Environment as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listWorkloadProfileStatesAsync( - String resourceGroupName, String environmentName) { - return new PagedFlux<>( - () -> listWorkloadProfileStatesSinglePageAsync(resourceGroupName, environmentName), + private PagedFlux listWorkloadProfileStatesAsync(String resourceGroupName, + String environmentName) { + return new PagedFlux<>(() -> listWorkloadProfileStatesSinglePageAsync(resourceGroupName, environmentName), nextLink -> listWorkloadProfileStatesNextSinglePageAsync(nextLink)); } /** * Get all workload Profile States for a Managed Environment.. - * - *

Get all workload Profile States for a Managed Environment. - * + * + * Get all workload Profile States for a Managed Environment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param context The context to associate with this operation. @@ -1884,8 +1565,8 @@ private PagedFlux listWorkloadProfileStatesAsync( * @return all workload Profile States for a Managed Environment as paginated response with {@link PagedFlux}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - private PagedFlux listWorkloadProfileStatesAsync( - String resourceGroupName, String environmentName, Context context) { + private PagedFlux listWorkloadProfileStatesAsync(String resourceGroupName, + String environmentName, Context context) { return new PagedFlux<>( () -> listWorkloadProfileStatesSinglePageAsync(resourceGroupName, environmentName, context), nextLink -> listWorkloadProfileStatesNextSinglePageAsync(nextLink, context)); @@ -1893,9 +1574,9 @@ private PagedFlux listWorkloadProfileStatesAsync( /** * Get all workload Profile States for a Managed Environment.. - * - *

Get all workload Profile States for a Managed Environment. - * + * + * Get all workload Profile States for a Managed Environment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -1904,16 +1585,16 @@ private PagedFlux listWorkloadProfileStatesAsync( * @return all workload Profile States for a Managed Environment as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listWorkloadProfileStates( - String resourceGroupName, String environmentName) { + public PagedIterable listWorkloadProfileStates(String resourceGroupName, + String environmentName) { return new PagedIterable<>(listWorkloadProfileStatesAsync(resourceGroupName, environmentName)); } /** * Get all workload Profile States for a Managed Environment.. - * - *

Get all workload Profile States for a Managed Environment. - * + * + * Get all workload Profile States for a Managed Environment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param context The context to associate with this operation. @@ -1923,16 +1604,17 @@ public PagedIterable listWorkloadProfileStates( * @return all workload Profile States for a Managed Environment as paginated response with {@link PagedIterable}. */ @ServiceMethod(returns = ReturnType.COLLECTION) - public PagedIterable listWorkloadProfileStates( - String resourceGroupName, String environmentName, Context context) { + public PagedIterable listWorkloadProfileStates(String resourceGroupName, + String environmentName, Context context) { return new PagedIterable<>(listWorkloadProfileStatesAsync(resourceGroupName, environmentName, context)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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. @@ -1944,32 +1626,24 @@ private Mono> listBySubscriptionNextSingl return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1977,37 +1651,28 @@ private Mono> listBySubscriptionNextSingl * @return collection of Environments along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listBySubscriptionNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listBySubscriptionNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listBySubscriptionNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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. @@ -2019,32 +1684,24 @@ private Mono> listByResourceGroupNextSing return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -2052,107 +1709,80 @@ private Mono> listByResourceGroupNextSing * @return collection of Environments along with {@link PagedResponse} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listByResourceGroupNextSinglePageAsync( - String nextLink, Context context) { + private Mono> listByResourceGroupNextSinglePageAsync(String nextLink, + Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listByResourceGroupNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of workloadProfileStates along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return collection of workloadProfileStates along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWorkloadProfileStatesNextSinglePageAsync( - String nextLink) { + private Mono> + listWorkloadProfileStatesNextSinglePageAsync(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.listWorkloadProfileStatesNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return collection of workloadProfileStates along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return collection of workloadProfileStates along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWorkloadProfileStatesNextSinglePageAsync( - String nextLink, Context context) { + private Mono> + listWorkloadProfileStatesNextSinglePageAsync(String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listWorkloadProfileStatesNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listWorkloadProfileStatesNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsClientImpl.java index e13f64a584cf..deb3dae4382c 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 @@ -25,26 +25,28 @@ import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedEnvironmentsDiagnosticsClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedEnvironmentsDiagnosticsClient. + */ public final class ManagedEnvironmentsDiagnosticsClientImpl implements ManagedEnvironmentsDiagnosticsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedEnvironmentsDiagnosticsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerAppsApiClientImpl client; /** * Initializes an instance of ManagedEnvironmentsDiagnosticsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedEnvironmentsDiagnosticsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create( - ManagedEnvironmentsDiagnosticsService.class, - client.getHttpPipeline(), - client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedEnvironmentsDiagnosticsService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -55,48 +57,40 @@ public final class ManagedEnvironmentsDiagnosticsClientImpl implements ManagedEn @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") public interface ManagedEnvironmentsDiagnosticsService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/detectorProperties/rootApi/") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/detectorProperties/rootApi/") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> getRoot( - @HostParam("$host") String endpoint, + Mono> getRoot(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); } /** * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * + * + * Get the properties of a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Managed Environment used to host container apps along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRootWithResponseAsync( - String resourceGroupName, String environmentName) { + private Mono> getRootWithResponseAsync(String resourceGroupName, + String environmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -108,25 +102,16 @@ private Mono> getRootWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .getRoot( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.getRoot(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * + * + * Get the properties of a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param context The context to associate with this operation. @@ -134,22 +119,18 @@ private Mono> getRootWithResponseAsync( * @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 properties of a Managed Environment used to host container apps along with {@link Response} on - * successful completion of {@link Mono}. + * successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getRootWithResponseAsync( - String resourceGroupName, String environmentName, Context context) { + private Mono> getRootWithResponseAsync(String resourceGroupName, + String environmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -161,29 +142,22 @@ private Mono> getRootWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .getRoot( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context); + return service.getRoot(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, this.client.getApiVersion(), accept, context); } /** * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * + * + * Get the properties of a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the properties of a Managed Environment used to host container apps on successful completion of {@link - * Mono}. + * @return the properties of a Managed Environment used to host container apps on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono getRootAsync(String resourceGroupName, String environmentName) { @@ -193,9 +167,9 @@ private Mono getRootAsync(String resourceGroupName, Str /** * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * + * + * Get the properties of a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param context The context to associate with this operation. @@ -205,16 +179,16 @@ private Mono getRootAsync(String resourceGroupName, Str * @return the properties of a Managed Environment used to host container apps along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getRootWithResponse( - String resourceGroupName, String environmentName, Context context) { + public Response getRootWithResponse(String resourceGroupName, String environmentName, + Context context) { return getRootWithResponseAsync(resourceGroupName, environmentName, context).block(); } /** * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * + * + * Get the properties of a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsImpl.java index 7a4187d4cd52..544062c66a9d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsImpl.java @@ -20,22 +20,18 @@ public final class ManagedEnvironmentsDiagnosticsImpl implements ManagedEnvironm private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - public ManagedEnvironmentsDiagnosticsImpl( - ManagedEnvironmentsDiagnosticsClient innerClient, + public ManagedEnvironmentsDiagnosticsImpl(ManagedEnvironmentsDiagnosticsClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response getRootWithResponse( - String resourceGroupName, String environmentName, Context context) { - Response inner = - this.serviceClient().getRootWithResponse(resourceGroupName, environmentName, context); + public Response getRootWithResponse(String resourceGroupName, String environmentName, + Context context) { + Response inner + = this.serviceClient().getRootWithResponse(resourceGroupName, environmentName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ManagedEnvironmentImpl(inner.getValue(), this.manager())); } else { return null; 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 80f706e9a89c..c140973da287 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 @@ -25,8 +25,7 @@ public final class ManagedEnvironmentsImpl implements ManagedEnvironments { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - public ManagedEnvironmentsImpl( - ManagedEnvironmentsClient innerClient, + public ManagedEnvironmentsImpl(ManagedEnvironmentsClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; @@ -34,34 +33,31 @@ public ManagedEnvironmentsImpl( public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new ManagedEnvironmentImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ManagedEnvironmentImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new ManagedEnvironmentImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ManagedEnvironmentImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName) { PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); - return Utils.mapPage(inner, inner1 -> new ManagedEnvironmentImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ManagedEnvironmentImpl(inner1, this.manager())); } public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { - PagedIterable inner = - this.serviceClient().listByResourceGroup(resourceGroupName, context); - return Utils.mapPage(inner, inner1 -> new ManagedEnvironmentImpl(inner1, this.manager())); + PagedIterable inner + = this.serviceClient().listByResourceGroup(resourceGroupName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new ManagedEnvironmentImpl(inner1, this.manager())); } - public Response getByResourceGroupWithResponse( - String resourceGroupName, String environmentName, Context context) { - Response inner = - this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, environmentName, context); + public Response getByResourceGroupWithResponse(String resourceGroupName, String environmentName, + Context context) { + Response inner + = this.serviceClient().getByResourceGroupWithResponse(resourceGroupName, environmentName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ManagedEnvironmentImpl(inner.getValue(), this.manager())); } else { return null; @@ -85,15 +81,12 @@ public void delete(String resourceGroupName, String environmentName, Context con this.serviceClient().delete(resourceGroupName, environmentName, context); } - public Response getAuthTokenWithResponse( - String resourceGroupName, String environmentName, Context context) { - Response inner = - this.serviceClient().getAuthTokenWithResponse(resourceGroupName, environmentName, context); + public Response getAuthTokenWithResponse(String resourceGroupName, String environmentName, + Context context) { + Response inner + = this.serviceClient().getAuthTokenWithResponse(resourceGroupName, environmentName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new EnvironmentAuthTokenImpl(inner.getValue(), this.manager())); } else { return null; @@ -109,100 +102,72 @@ public EnvironmentAuthToken getAuthToken(String resourceGroupName, String enviro } } - public PagedIterable listWorkloadProfileStates( - String resourceGroupName, String environmentName) { - PagedIterable inner = - this.serviceClient().listWorkloadProfileStates(resourceGroupName, environmentName); - return Utils.mapPage(inner, inner1 -> new WorkloadProfileStatesImpl(inner1, this.manager())); + public PagedIterable listWorkloadProfileStates(String resourceGroupName, + String environmentName) { + PagedIterable inner + = this.serviceClient().listWorkloadProfileStates(resourceGroupName, environmentName); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadProfileStatesImpl(inner1, this.manager())); } - public PagedIterable listWorkloadProfileStates( - String resourceGroupName, String environmentName, Context context) { - PagedIterable inner = - this.serviceClient().listWorkloadProfileStates(resourceGroupName, environmentName, context); - return Utils.mapPage(inner, inner1 -> new WorkloadProfileStatesImpl(inner1, this.manager())); + public PagedIterable listWorkloadProfileStates(String resourceGroupName, + String environmentName, Context context) { + PagedIterable inner + = this.serviceClient().listWorkloadProfileStates(resourceGroupName, environmentName, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new WorkloadProfileStatesImpl(inner1, this.manager())); } public ManagedEnvironment getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, environmentName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); } return this.getByResourceGroupWithResponse(resourceGroupName, environmentName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); } this.delete(resourceGroupName, environmentName, Context.NONE); } public void deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); } this.delete(resourceGroupName, environmentName, context); } 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 c92a99ffc179..7507b73c6cb5 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 @@ -29,24 +29,28 @@ import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ManagedEnvironmentsStoragesClient. */ +/** + * An instance of this class provides access to all the operations defined in ManagedEnvironmentsStoragesClient. + */ public final class ManagedEnvironmentsStoragesClientImpl implements ManagedEnvironmentsStoragesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ManagedEnvironmentsStoragesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerAppsApiClientImpl client; /** * Initializes an instance of ManagedEnvironmentsStoragesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ManagedEnvironmentsStoragesClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy - .create( - ManagedEnvironmentsStoragesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service = RestProxy.create(ManagedEnvironmentsStoragesService.class, client.getHttpPipeline(), + client.getSerializerAdapter()); this.client = client; } @@ -57,92 +61,70 @@ public final class ManagedEnvironmentsStoragesClientImpl implements ManagedEnvir @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") public interface ManagedEnvironmentsStoragesService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list( - @HostParam("$host") String endpoint, + Mono> list(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages/{storageName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages/{storageName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> get( - @HostParam("$host") String endpoint, + Mono> get(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("storageName") String storageName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("environmentName") String environmentName, @PathParam("storageName") String storageName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Put( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages/{storageName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Put("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages/{storageName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> createOrUpdate( - @HostParam("$host") String endpoint, + Mono> createOrUpdate(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("storageName") String storageName, + @PathParam("environmentName") String environmentName, @PathParam("storageName") String storageName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") ManagedEnvironmentStorageInner storageEnvelope, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) - @Delete( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages/{storageName}") - @ExpectedResponses({200, 204}) + @Headers({ "Content-Type: application/json" }) + @Delete("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/storages/{storageName}") + @ExpectedResponses({ 200, 204 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> delete( - @HostParam("$host") String endpoint, + Mono> delete(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @PathParam("storageName") String storageName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("environmentName") String environmentName, @PathParam("storageName") String storageName, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); } /** * Get all storages for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a managedEnvironment along with {@link Response} on successful completion of {@link - * Mono}. + * @return all storages for a managedEnvironment along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String resourceGroupName, String environmentName) { + private Mono> listWithResponseAsync(String resourceGroupName, + String environmentName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -154,46 +136,33 @@ private Mono> listWithRespon } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get all storages for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a managedEnvironment along with {@link Response} on successful completion of {@link - * Mono}. + * @return all storages for a managedEnvironment along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> listWithResponseAsync( - String resourceGroupName, String environmentName, Context context) { + private Mono> listWithResponseAsync(String resourceGroupName, + String environmentName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -205,20 +174,13 @@ private Mono> listWithRespon } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - accept, - context); + return service.list(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, this.client.getApiVersion(), accept, context); } /** * Get all storages for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -227,15 +189,15 @@ private Mono> listWithRespon * @return all storages for a managedEnvironment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listAsync( - String resourceGroupName, String environmentName) { + private Mono listAsync(String resourceGroupName, + String environmentName) { return listWithResponseAsync(resourceGroupName, environmentName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get all storages for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param context The context to associate with this operation. @@ -245,14 +207,14 @@ private Mono listAsync( * @return all storages for a managedEnvironment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String resourceGroupName, String environmentName, Context context) { + public Response listWithResponse(String resourceGroupName, + String environmentName, Context context) { return listWithResponseAsync(resourceGroupName, environmentName, context).block(); } /** * Get all storages for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -267,7 +229,7 @@ public ManagedEnvironmentStoragesCollectionInner list(String resourceGroupName, /** * Get storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. @@ -277,19 +239,15 @@ public ManagedEnvironmentStoragesCollectionInner list(String resourceGroupName, * @return storage for a managedEnvironment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String environmentName, String storageName) { + private Mono> getWithResponseAsync(String resourceGroupName, + String environmentName, String storageName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -304,24 +262,14 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - storageName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, storageName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. @@ -332,19 +280,15 @@ private Mono> getWithResponseAsync( * @return storage for a managedEnvironment along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> getWithResponseAsync( - String resourceGroupName, String environmentName, String storageName, Context context) { + private Mono> getWithResponseAsync(String resourceGroupName, + String environmentName, String storageName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -359,21 +303,13 @@ private Mono> getWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .get( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - storageName, - this.client.getApiVersion(), - accept, - context); + return service.get(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, storageName, this.client.getApiVersion(), accept, context); } /** * Get storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. @@ -383,15 +319,15 @@ private Mono> getWithResponseAsync( * @return storage for a managedEnvironment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono getAsync( - String resourceGroupName, String environmentName, String storageName) { + private Mono getAsync(String resourceGroupName, String environmentName, + String storageName) { return getWithResponseAsync(resourceGroupName, environmentName, storageName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. @@ -402,14 +338,14 @@ private Mono getAsync( * @return storage for a managedEnvironment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String environmentName, String storageName, Context context) { + public Response getWithResponse(String resourceGroupName, String environmentName, + String storageName, Context context) { return getWithResponseAsync(resourceGroupName, environmentName, storageName, context).block(); } /** * Get storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. @@ -425,7 +361,7 @@ public ManagedEnvironmentStorageInner get(String resourceGroupName, String envir /** * Create or update storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. @@ -433,26 +369,19 @@ public ManagedEnvironmentStorageInner get(String resourceGroupName, String envir * @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 storage resource for managedEnvironment along with {@link Response} on successful completion of {@link - * Mono}. + * @return storage resource for managedEnvironment along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String environmentName, - String storageName, - ManagedEnvironmentStorageInner storageEnvelope) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String environmentName, String storageName, ManagedEnvironmentStorageInner storageEnvelope) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -473,25 +402,15 @@ private Mono> createOrUpdateWithRespons } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - storageName, - this.client.getApiVersion(), - storageEnvelope, - accept, - context)) + .withContext(context -> service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, storageName, this.client.getApiVersion(), storageEnvelope, accept, + context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Create or update storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. @@ -500,27 +419,19 @@ private Mono> createOrUpdateWithRespons * @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 storage resource for managedEnvironment along with {@link Response} on successful completion of {@link - * Mono}. + * @return storage resource for managedEnvironment along with {@link Response} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> createOrUpdateWithResponseAsync( - String resourceGroupName, - String environmentName, - String storageName, - ManagedEnvironmentStorageInner storageEnvelope, - Context context) { + private Mono> createOrUpdateWithResponseAsync(String resourceGroupName, + String environmentName, String storageName, ManagedEnvironmentStorageInner storageEnvelope, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -541,22 +452,13 @@ private Mono> createOrUpdateWithRespons } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .createOrUpdate( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - storageName, - this.client.getApiVersion(), - storageEnvelope, - accept, - context); + return service.createOrUpdate(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, storageName, this.client.getApiVersion(), storageEnvelope, accept, context); } /** * Create or update storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. @@ -567,18 +469,15 @@ private Mono> createOrUpdateWithRespons * @return storage resource for managedEnvironment on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, - String environmentName, - String storageName, - ManagedEnvironmentStorageInner storageEnvelope) { + private Mono createOrUpdateAsync(String resourceGroupName, String environmentName, + String storageName, ManagedEnvironmentStorageInner storageEnvelope) { return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, storageName, storageEnvelope) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Create or update storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. @@ -590,20 +489,15 @@ private Mono createOrUpdateAsync( * @return storage resource for managedEnvironment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String environmentName, - String storageName, - ManagedEnvironmentStorageInner storageEnvelope, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, environmentName, storageName, storageEnvelope, context) - .block(); + public Response createOrUpdateWithResponse(String resourceGroupName, + String environmentName, String storageName, ManagedEnvironmentStorageInner storageEnvelope, Context context) { + return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, storageName, storageEnvelope, + context).block(); } /** * Create or update storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. @@ -614,19 +508,15 @@ public Response createOrUpdateWithResponse( * @return storage resource for managedEnvironment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentStorageInner createOrUpdate( - String resourceGroupName, - String environmentName, - String storageName, - ManagedEnvironmentStorageInner storageEnvelope) { - return createOrUpdateWithResponse( - resourceGroupName, environmentName, storageName, storageEnvelope, Context.NONE) - .getValue(); + public ManagedEnvironmentStorageInner createOrUpdate(String resourceGroupName, String environmentName, + String storageName, ManagedEnvironmentStorageInner storageEnvelope) { + return createOrUpdateWithResponse(resourceGroupName, environmentName, storageName, storageEnvelope, + Context.NONE).getValue(); } /** * Delete storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. @@ -636,19 +526,15 @@ public ManagedEnvironmentStorageInner createOrUpdate( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String environmentName, String storageName) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String environmentName, + String storageName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -663,24 +549,14 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - storageName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, storageName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Delete storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. @@ -691,19 +567,15 @@ private Mono> deleteWithResponseAsync( * @return the {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> deleteWithResponseAsync( - String resourceGroupName, String environmentName, String storageName, Context context) { + private Mono> deleteWithResponseAsync(String resourceGroupName, String environmentName, + String storageName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -718,21 +590,13 @@ private Mono> deleteWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .delete( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - storageName, - this.client.getApiVersion(), - accept, - context); + return service.delete(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + environmentName, storageName, this.client.getApiVersion(), accept, context); } /** * Delete storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. @@ -749,7 +613,7 @@ private Mono deleteAsync(String resourceGroupName, String environmentName, /** * Delete storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. @@ -760,14 +624,14 @@ private Mono deleteAsync(String resourceGroupName, String environmentName, * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String environmentName, String storageName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String environmentName, String storageName, + Context context) { return deleteWithResponseAsync(resourceGroupName, environmentName, storageName, context).block(); } /** * Delete storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesImpl.java index dfcc84bf5607..0912a5938a1b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesImpl.java @@ -22,22 +22,18 @@ public final class ManagedEnvironmentsStoragesImpl implements ManagedEnvironment private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - public ManagedEnvironmentsStoragesImpl( - ManagedEnvironmentsStoragesClient innerClient, + public ManagedEnvironmentsStoragesImpl(ManagedEnvironmentsStoragesClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response listWithResponse( - String resourceGroupName, String environmentName, Context context) { - Response inner = - this.serviceClient().listWithResponse(resourceGroupName, environmentName, context); + public Response listWithResponse(String resourceGroupName, + String environmentName, Context context) { + Response inner + = this.serviceClient().listWithResponse(resourceGroupName, environmentName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ManagedEnvironmentStoragesCollectionImpl(inner.getValue(), this.manager())); } else { return null; @@ -53,15 +49,12 @@ public ManagedEnvironmentStoragesCollection list(String resourceGroupName, Strin } } - public Response getWithResponse( - String resourceGroupName, String environmentName, String storageName, Context context) { - Response inner = - this.serviceClient().getWithResponse(resourceGroupName, environmentName, storageName, context); + public Response getWithResponse(String resourceGroupName, String environmentName, + String storageName, Context context) { + Response inner + = this.serviceClient().getWithResponse(resourceGroupName, environmentName, storageName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new ManagedEnvironmentStorageImpl(inner.getValue(), this.manager())); } else { return null; @@ -69,8 +62,8 @@ public Response getWithResponse( } public ManagedEnvironmentStorage get(String resourceGroupName, String environmentName, String storageName) { - ManagedEnvironmentStorageInner inner = - this.serviceClient().get(resourceGroupName, environmentName, storageName); + ManagedEnvironmentStorageInner inner + = this.serviceClient().get(resourceGroupName, environmentName, storageName); if (inner != null) { return new ManagedEnvironmentStorageImpl(inner, this.manager()); } else { @@ -78,8 +71,8 @@ public ManagedEnvironmentStorage get(String resourceGroupName, String environmen } } - public Response deleteWithResponse( - String resourceGroupName, String environmentName, String storageName, Context context) { + public Response deleteWithResponse(String resourceGroupName, String environmentName, String storageName, + Context context) { return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, storageName, context); } @@ -88,113 +81,77 @@ public void delete(String resourceGroupName, String environmentName, String stor } public ManagedEnvironmentStorage getById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String storageName = Utils.getValueFromIdByName(id, "storages"); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String storageName = ResourceManagerUtils.getValueFromIdByName(id, "storages"); if (storageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); } return this.getWithResponse(resourceGroupName, environmentName, storageName, Context.NONE).getValue(); } public Response getByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String storageName = Utils.getValueFromIdByName(id, "storages"); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String storageName = ResourceManagerUtils.getValueFromIdByName(id, "storages"); if (storageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); } return this.getWithResponse(resourceGroupName, environmentName, storageName, context); } public void deleteById(String id) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String storageName = Utils.getValueFromIdByName(id, "storages"); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String storageName = ResourceManagerUtils.getValueFromIdByName(id, "storages"); if (storageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); } this.deleteWithResponse(resourceGroupName, environmentName, storageName, Context.NONE); } public Response deleteByIdWithResponse(String id, Context context) { - String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + String resourceGroupName = ResourceManagerUtils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + 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"); + String environmentName = ResourceManagerUtils.getValueFromIdByName(id, "managedEnvironments"); if (environmentName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String - .format( - "The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); - } - String storageName = Utils.getValueFromIdByName(id, "storages"); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'managedEnvironments'.", id))); + } + String storageName = ResourceManagerUtils.getValueFromIdByName(id, "storages"); if (storageName == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + String.format("The resource ID '%s' is not valid. Missing path segment 'storages'.", id))); } return this.deleteWithResponse(resourceGroupName, environmentName, storageName, context); } 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 0a6fb3fc357b..404efd5e2957 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 @@ -27,22 +27,28 @@ import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in NamespacesClient. */ +/** + * An instance of this class provides access to all the operations defined in NamespacesClient. + */ public final class NamespacesClientImpl implements NamespacesClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final NamespacesService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerAppsApiClientImpl client; /** * Initializes an instance of NamespacesClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ NamespacesClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy.create(NamespacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(NamespacesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -53,27 +59,23 @@ public final class NamespacesClientImpl implements NamespacesClient { @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") public interface NamespacesService { - @Headers({"Content-Type: application/json"}) - @Post( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/checkNameAvailability") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/managedEnvironments/{environmentName}/checkNameAvailability") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> checkNameAvailability( - @HostParam("$host") String endpoint, + Mono> checkNameAvailability(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("environmentName") String environmentName, - @QueryParam("api-version") String apiVersion, + @PathParam("environmentName") String environmentName, @QueryParam("api-version") String apiVersion, @BodyParam("application/json") CheckNameAvailabilityRequest checkNameAvailabilityRequest, - @HeaderParam("Accept") String accept, - Context context); + @HeaderParam("Accept") String accept, Context context); } /** * Checks the resource name availability. - * - *

Checks if resource name is available. - * + * + * Checks if resource name is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param checkNameAvailabilityRequest The check name availability request. @@ -86,16 +88,12 @@ Mono> checkNameAvailability( private Mono> checkNameAvailabilityWithResponseAsync( String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -106,35 +104,24 @@ private Mono> checkNameAvailability .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); } if (checkNameAvailabilityRequest == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter checkNameAvailabilityRequest is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter checkNameAvailabilityRequest is required and cannot be null.")); } else { checkNameAvailabilityRequest.validate(); } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .checkNameAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - checkNameAvailabilityRequest, - accept, - context)) + .withContext(context -> service.checkNameAvailability(this.client.getEndpoint(), + this.client.getSubscriptionId(), resourceGroupName, environmentName, this.client.getApiVersion(), + checkNameAvailabilityRequest, accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Checks the resource name availability. - * - *

Checks if resource name is available. - * + * + * Checks if resource name is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param checkNameAvailabilityRequest The check name availability request. @@ -146,21 +133,15 @@ private Mono> checkNameAvailability */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> checkNameAvailabilityWithResponseAsync( - String resourceGroupName, - String environmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest, + String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -171,32 +152,23 @@ private Mono> checkNameAvailability .error(new IllegalArgumentException("Parameter environmentName is required and cannot be null.")); } if (checkNameAvailabilityRequest == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter checkNameAvailabilityRequest is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter checkNameAvailabilityRequest is required and cannot be null.")); } else { checkNameAvailabilityRequest.validate(); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .checkNameAvailability( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - environmentName, - this.client.getApiVersion(), - checkNameAvailabilityRequest, - accept, - context); + return service.checkNameAvailability(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, environmentName, this.client.getApiVersion(), checkNameAvailabilityRequest, accept, + context); } /** * Checks the resource name availability. - * - *

Checks if resource name is available. - * + * + * Checks if resource name is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param checkNameAvailabilityRequest The check name availability request. @@ -206,17 +178,17 @@ private Mono> checkNameAvailability * @return the check availability result on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono checkNameAvailabilityAsync( - String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest) { + private Mono checkNameAvailabilityAsync(String resourceGroupName, + String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest) { return checkNameAvailabilityWithResponseAsync(resourceGroupName, environmentName, checkNameAvailabilityRequest) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Checks the resource name availability. - * - *

Checks if resource name is available. - * + * + * Checks if resource name is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param checkNameAvailabilityRequest The check name availability request. @@ -227,21 +199,17 @@ private Mono checkNameAvailabilityAsync( * @return the check availability result along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkNameAvailabilityWithResponse( - String resourceGroupName, - String environmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest, - Context context) { - return checkNameAvailabilityWithResponseAsync( - resourceGroupName, environmentName, checkNameAvailabilityRequest, context) - .block(); + public Response checkNameAvailabilityWithResponse(String resourceGroupName, + String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context) { + return checkNameAvailabilityWithResponseAsync(resourceGroupName, environmentName, checkNameAvailabilityRequest, + context).block(); } /** * Checks the resource name availability. - * - *

Checks if resource name is available. - * + * + * Checks if resource name is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param checkNameAvailabilityRequest The check name availability request. @@ -251,10 +219,9 @@ public Response checkNameAvailabilityWithRes * @return the check availability result. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CheckNameAvailabilityResponseInner checkNameAvailability( - String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - return checkNameAvailabilityWithResponse( - resourceGroupName, environmentName, checkNameAvailabilityRequest, Context.NONE) - .getValue(); + public CheckNameAvailabilityResponseInner checkNameAvailability(String resourceGroupName, String environmentName, + CheckNameAvailabilityRequest checkNameAvailabilityRequest) { + return checkNameAvailabilityWithResponse(resourceGroupName, environmentName, checkNameAvailabilityRequest, + Context.NONE).getValue(); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesImpl.java index 167621f13759..91183b68a218 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesImpl.java @@ -21,39 +21,28 @@ public final class NamespacesImpl implements Namespaces { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - public NamespacesImpl( - NamespacesClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + public NamespacesImpl(NamespacesClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response checkNameAvailabilityWithResponse( - String resourceGroupName, - String environmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest, - Context context) { - Response inner = - this - .serviceClient() - .checkNameAvailabilityWithResponse( - resourceGroupName, environmentName, checkNameAvailabilityRequest, context); + public Response checkNameAvailabilityWithResponse(String resourceGroupName, + String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context) { + Response inner = this.serviceClient().checkNameAvailabilityWithResponse( + resourceGroupName, environmentName, checkNameAvailabilityRequest, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new CheckNameAvailabilityResponseImpl(inner.getValue(), this.manager())); } else { return null; } } - public CheckNameAvailabilityResponse checkNameAvailability( - String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - CheckNameAvailabilityResponseInner inner = - this - .serviceClient() - .checkNameAvailability(resourceGroupName, environmentName, checkNameAvailabilityRequest); + public CheckNameAvailabilityResponse checkNameAvailability(String resourceGroupName, String environmentName, + CheckNameAvailabilityRequest checkNameAvailabilityRequest) { + CheckNameAvailabilityResponseInner inner = this.serviceClient().checkNameAvailability(resourceGroupName, + environmentName, checkNameAvailabilityRequest); if (inner != null) { return new CheckNameAvailabilityResponseImpl(inner, this.manager()); } else { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationDetailImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationDetailImpl.java index 1d78896f2723..cd2fca311b4b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationDetailImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationDetailImpl.java @@ -13,8 +13,7 @@ public final class OperationDetailImpl implements OperationDetail { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - OperationDetailImpl( - OperationDetailInner innerObject, + OperationDetailImpl(OperationDetailInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; 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 6f299e42cfed..6d5969c5049e 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 @@ -30,22 +30,28 @@ import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in OperationsClient. */ +/** + * An instance of this class provides access to all the operations defined in OperationsClient. + */ public final class OperationsClientImpl implements OperationsClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final OperationsService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerAppsApiClientImpl client; /** * Initializes an instance of OperationsClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ OperationsClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(OperationsService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -56,95 +62,70 @@ public final class OperationsClientImpl implements OperationsClient { @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") public interface OperationsService { - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("/providers/Microsoft.App/operations") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> list( - @HostParam("$host") String endpoint, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + Mono> list(@HostParam("$host") String endpoint, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); - @Headers({"Content-Type: application/json"}) + @Headers({ "Content-Type: application/json" }) @Get("{nextLink}") - @ExpectedResponses({200}) + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> listNext( - @PathParam(value = "nextLink", encoded = true) String nextLink, - @HostParam("$host") String endpoint, - @HeaderParam("Accept") String accept, - Context context); + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); } /** * Lists all of the available RP operations. - * + * * @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 available operations of the service along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return available operations of the service along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync() { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; return FluxUtil .withContext( context -> service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Lists all of the available RP operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available operations of the service along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return available operations of the service along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSinglePageAsync(Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.list(this.client.getEndpoint(), this.client.getApiVersion(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } /** * Lists all of the available RP operations. - * + * * @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 available operations of the service as paginated response with {@link PagedFlux}. @@ -156,7 +137,7 @@ private PagedFlux listAsync() { /** * Lists all of the available RP operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -165,13 +146,13 @@ private PagedFlux listAsync() { */ @ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux listAsync(Context context) { - return new PagedFlux<>( - () -> listSinglePageAsync(context), nextLink -> listNextSinglePageAsync(nextLink, context)); + return new PagedFlux<>(() -> listSinglePageAsync(context), + nextLink -> listNextSinglePageAsync(nextLink, context)); } /** * Lists all of the available RP operations. - * + * * @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 available operations of the service as paginated response with {@link PagedIterable}. @@ -183,7 +164,7 @@ public PagedIterable list() { /** * Lists all of the available RP operations. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -197,14 +178,15 @@ public PagedIterable list(Context context) { /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @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 available operations of the service along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return available operations of the service along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink) { @@ -212,37 +194,28 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; - return FluxUtil - .withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) - .>map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)) + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), + res.getStatusCode(), res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get the next page of items. - * + * * @param nextLink The URL to get the next list of items - *

The nextLink parameter. + * + * The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return available operations of the service along with {@link PagedResponse} on successful completion of {@link - * Mono}. + * @return available operations of the service along with {@link PagedResponse} on successful completion of + * {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listNextSinglePageAsync(String nextLink, Context context) { @@ -250,23 +223,13 @@ private Mono> listNextSinglePageAsync(String return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); } if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .listNext(nextLink, this.client.getEndpoint(), accept, context) - .map( - res -> - new PagedResponseBase<>( - res.getRequest(), - res.getStatusCode(), - res.getHeaders(), - res.getValue().value(), - res.getValue().nextLink(), - null)); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationsImpl.java index fb3cfe7ac585..7cbc6577e929 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationsImpl.java @@ -19,20 +19,20 @@ public final class OperationsImpl implements Operations { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - public OperationsImpl( - OperationsClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + public OperationsImpl(OperationsClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } public PagedIterable list() { PagedIterable inner = this.serviceClient().list(); - return Utils.mapPage(inner, inner1 -> new OperationDetailImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationDetailImpl(inner1, this.manager())); } public PagedIterable list(Context context) { PagedIterable inner = this.serviceClient().list(context); - return Utils.mapPage(inner, inner1 -> new OperationDetailImpl(inner1, this.manager())); + return ResourceManagerUtils.mapPage(inner, inner1 -> new OperationDetailImpl(inner1, this.manager())); } private OperationsClient serviceClient() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaCollectionImpl.java index fcb6c32ab789..e9bba45d900e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaCollectionImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaCollectionImpl.java @@ -17,8 +17,7 @@ public final class ReplicaCollectionImpl implements ReplicaCollection { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - ReplicaCollectionImpl( - ReplicaCollectionInner innerObject, + ReplicaCollectionImpl(ReplicaCollectionInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -27,9 +26,8 @@ public final class ReplicaCollectionImpl implements ReplicaCollection { public List value() { List inner = this.innerModel().value(); if (inner != null) { - return Collections - .unmodifiableList( - inner.stream().map(inner1 -> new ReplicaImpl(inner1, this.manager())).collect(Collectors.toList())); + return Collections.unmodifiableList( + inner.stream().map(inner1 -> new ReplicaImpl(inner1, this.manager())).collect(Collectors.toList())); } else { return Collections.emptyList(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaImpl.java index 89ccdf824e2c..927df01ea0d9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ReplicaImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; import com.azure.resourcemanager.appcontainers.models.ContainerAppReplicaRunningState; import com.azure.resourcemanager.appcontainers.models.Replica; @@ -17,8 +18,8 @@ public final class ReplicaImpl implements Replica { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - ReplicaImpl( - ReplicaInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + ReplicaImpl(ReplicaInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -35,6 +36,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public OffsetDateTime createdTime() { return this.innerModel().createdTime(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/Utils.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceManagerUtils.java similarity index 79% rename from sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/Utils.java rename to sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceManagerUtils.java index 0ea4b1a2e5c1..94a651ce19fa 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/Utils.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceManagerUtils.java @@ -19,7 +19,10 @@ import java.util.stream.Stream; import reactor.core.publisher.Flux; -final class Utils { +final class ResourceManagerUtils { + private ResourceManagerUtils() { + } + static String getValueFromIdByName(String id, String name) { if (id == null) { return null; @@ -38,6 +41,7 @@ static String getValueFromIdByName(String id, String name) { } } return null; + } static String getValueFromIdByParameterName(String id, String pathTemplate, String parameterName) { @@ -60,7 +64,7 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri segments.add(idSegment); idItrReverted.forEachRemaining(segments::add); Collections.reverse(segments); - if (segments.size() > 0 && segments.get(0).isEmpty()) { + if (!segments.isEmpty() && segments.get(0).isEmpty()) { segments.remove(0); } return String.join("/", segments); @@ -71,10 +75,11 @@ static String getValueFromIdByParameterName(String id, String pathTemplate, Stri } } return null; + } static PagedIterable mapPage(PagedIterable pageIterable, Function mapper) { - return new PagedIterableImpl(pageIterable, mapper); + return new PagedIterableImpl<>(pageIterable, mapper); } private static final class PagedIterableImpl extends PagedIterable { @@ -84,26 +89,17 @@ private static final class PagedIterableImpl extends PagedIterable { private final Function, PagedResponse> pageMapper; private PagedIterableImpl(PagedIterable pagedIterable, Function mapper) { - super( - PagedFlux - .create( - () -> - (continuationToken, pageSize) -> - Flux.fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); + super(PagedFlux.create(() -> (continuationToken, pageSize) -> Flux + .fromStream(pagedIterable.streamByPage().map(getPageMapper(mapper))))); this.pagedIterable = pagedIterable; this.mapper = mapper; this.pageMapper = getPageMapper(mapper); } private static Function, PagedResponse> getPageMapper(Function mapper) { - return page -> - new PagedResponseBase( - page.getRequest(), - page.getStatusCode(), - page.getHeaders(), - page.getElements().stream().map(mapper).collect(Collectors.toList()), - page.getContinuationToken(), - null); + return page -> new PagedResponseBase(page.getRequest(), page.getStatusCode(), page.getHeaders(), + page.getElements().stream().map(mapper).collect(Collectors.toList()), page.getContinuationToken(), + null); } @Override @@ -133,30 +129,27 @@ public Stream> streamByPage(String continuationToken, int prefe @Override public Iterator iterator() { - return new IteratorImpl(pagedIterable.iterator(), mapper); + return new IteratorImpl<>(pagedIterable.iterator(), mapper); } @Override public Iterable> iterableByPage() { - return new IterableImpl, PagedResponse>(pagedIterable.iterableByPage(), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken), pageMapper); } @Override public Iterable> iterableByPage(int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(preferredPageSize), pageMapper); } @Override public Iterable> iterableByPage(String continuationToken, int preferredPageSize) { - return new IterableImpl, PagedResponse>( - pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); + return new IterableImpl<>(pagedIterable.iterableByPage(continuationToken, preferredPageSize), pageMapper); } } @@ -198,7 +191,7 @@ private IterableImpl(Iterable iterable, Function mapper) { @Override public Iterator iterator() { - return new IteratorImpl(iterable.iterator(), mapper); + return new IteratorImpl<>(iterable.iterator(), mapper); } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersClientImpl.java index 02ade665b719..22debf25d272 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersClientImpl.java @@ -11,6 +11,7 @@ import com.azure.core.annotation.Host; import com.azure.core.annotation.HostParam; import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; import com.azure.core.annotation.QueryParam; import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceInterface; @@ -25,22 +26,28 @@ import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; import reactor.core.publisher.Mono; -/** An instance of this class provides access to all the operations defined in ResourceProvidersClient. */ +/** + * An instance of this class provides access to all the operations defined in ResourceProvidersClient. + */ public final class ResourceProvidersClientImpl implements ResourceProvidersClient { - /** The proxy service used to perform REST calls. */ + /** + * The proxy service used to perform REST calls. + */ private final ResourceProvidersService service; - /** The service client containing this operation class. */ + /** + * The service client containing this operation class. + */ private final ContainerAppsApiClientImpl client; /** * Initializes an instance of ResourceProvidersClientImpl. - * + * * @param client the instance of the service client containing this operation class. */ ResourceProvidersClientImpl(ContainerAppsApiClientImpl client) { - this.service = - RestProxy.create(ResourceProvidersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.service + = RestProxy.create(ResourceProvidersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); this.client = client; } @@ -51,25 +58,28 @@ public final class ResourceProvidersClientImpl implements ResourceProvidersClien @Host("{$host}") @ServiceInterface(name = "ContainerAppsApiClie") public interface ResourceProvidersService { - @Headers({"Content-Type: application/json"}) - @Get( - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName}") - @ExpectedResponses({200}) + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/executions/{jobExecutionName}") + @ExpectedResponses({ 200 }) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) - Mono> jobExecution( - @HostParam("$host") String endpoint, + Mono> jobExecution(@HostParam("$host") String endpoint, @PathParam("subscriptionId") String subscriptionId, - @PathParam("resourceGroupName") String resourceGroupName, - @PathParam("jobName") String jobName, - @PathParam("jobExecutionName") String jobExecutionName, - @QueryParam("api-version") String apiVersion, - @HeaderParam("Accept") String accept, - Context context); + @PathParam("resourceGroupName") String resourceGroupName, @PathParam("jobName") String jobName, + @PathParam("jobExecutionName") String jobExecutionName, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Post("/subscriptions/{subscriptionId}/providers/Microsoft.App/getCustomDomainVerificationId") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getCustomDomainVerificationId(@HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, Context context); } /** * Get details of a single job execution. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. @@ -79,19 +89,15 @@ Mono> jobExecution( * @return details of a single job execution along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> jobExecutionWithResponseAsync( - String resourceGroupName, String jobName, String jobExecutionName) { + private Mono> jobExecutionWithResponseAsync(String resourceGroupName, String jobName, + String jobExecutionName) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -106,24 +112,14 @@ private Mono> jobExecutionWithResponseAsync( } final String accept = "application/json"; return FluxUtil - .withContext( - context -> - service - .jobExecution( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - jobName, - jobExecutionName, - this.client.getApiVersion(), - accept, - context)) + .withContext(context -> service.jobExecution(this.client.getEndpoint(), this.client.getSubscriptionId(), + resourceGroupName, jobName, jobExecutionName, this.client.getApiVersion(), accept, context)) .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); } /** * Get details of a single job execution. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. @@ -134,19 +130,15 @@ private Mono> jobExecutionWithResponseAsync( * @return details of a single job execution along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono> jobExecutionWithResponseAsync( - String resourceGroupName, String jobName, String jobExecutionName, Context context) { + private Mono> jobExecutionWithResponseAsync(String resourceGroupName, String jobName, + String jobExecutionName, Context context) { if (this.client.getEndpoint() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getEndpoint() is required and cannot be null.")); + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { - return Mono - .error( - new IllegalArgumentException( - "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); } if (resourceGroupName == null) { return Mono @@ -161,21 +153,13 @@ private Mono> jobExecutionWithResponseAsync( } final String accept = "application/json"; context = this.client.mergeContext(context); - return service - .jobExecution( - this.client.getEndpoint(), - this.client.getSubscriptionId(), - resourceGroupName, - jobName, - jobExecutionName, - this.client.getApiVersion(), - accept, - context); + return service.jobExecution(this.client.getEndpoint(), this.client.getSubscriptionId(), resourceGroupName, + jobName, jobExecutionName, this.client.getApiVersion(), accept, context); } /** * Get details of a single job execution. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. @@ -185,15 +169,15 @@ private Mono> jobExecutionWithResponseAsync( * @return details of a single job execution on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono jobExecutionAsync( - String resourceGroupName, String jobName, String jobExecutionName) { + private Mono jobExecutionAsync(String resourceGroupName, String jobName, + String jobExecutionName) { return jobExecutionWithResponseAsync(resourceGroupName, jobName, jobExecutionName) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } /** * Get details of a single job execution. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. @@ -204,14 +188,14 @@ private Mono jobExecutionAsync( * @return details of a single job execution along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response jobExecutionWithResponse( - String resourceGroupName, String jobName, String jobExecutionName, Context context) { + public Response jobExecutionWithResponse(String resourceGroupName, String jobName, + String jobExecutionName, Context context) { return jobExecutionWithResponseAsync(resourceGroupName, jobName, jobExecutionName, context).block(); } /** * Get details of a single job execution. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. @@ -224,4 +208,94 @@ public Response jobExecutionWithResponse( public JobExecutionInner jobExecution(String resourceGroupName, String jobName, String jobExecutionName) { return jobExecutionWithResponse(resourceGroupName, jobName, jobExecutionName, Context.NONE).getValue(); } + + /** + * Get the verification id of a subscription used for verifying custom domains. + * + * @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 verification id of a subscription used for verifying custom domains along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getCustomDomainVerificationIdWithResponseAsync() { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.getCustomDomainVerificationId(this.client.getEndpoint(), + this.client.getSubscriptionId(), this.client.getApiVersion(), accept, context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the verification id of a subscription used for verifying custom domains. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the verification id of a subscription used for verifying custom domains along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getCustomDomainVerificationIdWithResponseAsync(Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.getCustomDomainVerificationId(this.client.getEndpoint(), this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context); + } + + /** + * Get the verification id of a subscription used for verifying custom domains. + * + * @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 verification id of a subscription used for verifying custom domains on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getCustomDomainVerificationIdAsync() { + return getCustomDomainVerificationIdWithResponseAsync().flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the verification id of a subscription used for verifying custom domains. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the verification id of a subscription used for verifying custom domains along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getCustomDomainVerificationIdWithResponse(Context context) { + return getCustomDomainVerificationIdWithResponseAsync(context).block(); + } + + /** + * Get the verification id of a subscription used for verifying custom domains. + * + * @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 verification id of a subscription used for verifying custom domains. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public String getCustomDomainVerificationId() { + return getCustomDomainVerificationIdWithResponse(Context.NONE).getValue(); + } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersImpl.java index fcec09b561bf..cacbfd455506 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ResourceProvidersImpl.java @@ -20,22 +20,18 @@ public final class ResourceProvidersImpl implements ResourceProviders { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - public ResourceProvidersImpl( - ResourceProvidersClient innerClient, + public ResourceProvidersImpl(ResourceProvidersClient innerClient, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerClient = innerClient; this.serviceManager = serviceManager; } - public Response jobExecutionWithResponse( - String resourceGroupName, String jobName, String jobExecutionName, Context context) { - Response inner = - this.serviceClient().jobExecutionWithResponse(resourceGroupName, jobName, jobExecutionName, context); + public Response jobExecutionWithResponse(String resourceGroupName, String jobName, + String jobExecutionName, Context context) { + Response inner + = this.serviceClient().jobExecutionWithResponse(resourceGroupName, jobName, jobExecutionName, context); if (inner != null) { - return new SimpleResponse<>( - inner.getRequest(), - inner.getStatusCode(), - inner.getHeaders(), + return new SimpleResponse<>(inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), new JobExecutionImpl(inner.getValue(), this.manager())); } else { return null; @@ -51,6 +47,14 @@ public JobExecution jobExecution(String resourceGroupName, String jobName, Strin } } + public Response getCustomDomainVerificationIdWithResponse(Context context) { + return this.serviceClient().getCustomDomainVerificationIdWithResponse(context); + } + + public String getCustomDomainVerificationId() { + return this.serviceClient().getCustomDomainVerificationId(); + } + private ResourceProvidersClient serviceClient() { return this.innerClient; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/RevisionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/RevisionImpl.java index e56a7cd26d09..93deebbb0d1b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/RevisionImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/RevisionImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; import com.azure.resourcemanager.appcontainers.models.Revision; import com.azure.resourcemanager.appcontainers.models.RevisionHealthState; @@ -17,8 +18,8 @@ public final class RevisionImpl implements Revision { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - RevisionImpl( - RevisionInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + RevisionImpl(RevisionInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; } @@ -35,6 +36,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public OffsetDateTime createdTime() { return this.innerModel().createdTime(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SecretsCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SecretsCollectionImpl.java index deeb159aabe9..e08baebd76bd 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SecretsCollectionImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SecretsCollectionImpl.java @@ -15,8 +15,7 @@ public final class SecretsCollectionImpl implements SecretsCollection { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - SecretsCollectionImpl( - SecretsCollectionInner innerObject, + SecretsCollectionImpl(SecretsCollectionInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SourceControlImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SourceControlImpl.java index 20efb9b6dd7f..432fbc9bdb43 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SourceControlImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/SourceControlImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.SourceControlInner; import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; @@ -27,6 +28,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public SourceControlOperationState operationState() { return this.innerModel().operationState(); } @@ -68,21 +73,14 @@ public SourceControlImpl withExistingContainerApp(String resourceGroupName, Stri } public SourceControl create() { - this.innerObject = - serviceManager - .serviceClient() - .getContainerAppsSourceControls() - .createOrUpdate( - resourceGroupName, containerAppName, sourceControlName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getContainerAppsSourceControls() + .createOrUpdate(resourceGroupName, containerAppName, sourceControlName, this.innerModel(), Context.NONE); return this; } public SourceControl create(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getContainerAppsSourceControls() - .createOrUpdate(resourceGroupName, containerAppName, sourceControlName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getContainerAppsSourceControls() + .createOrUpdate(resourceGroupName, containerAppName, sourceControlName, this.innerModel(), context); return this; } @@ -97,51 +95,35 @@ public SourceControlImpl update() { } public SourceControl apply() { - this.innerObject = - serviceManager - .serviceClient() - .getContainerAppsSourceControls() - .createOrUpdate( - resourceGroupName, containerAppName, sourceControlName, this.innerModel(), Context.NONE); + this.innerObject = serviceManager.serviceClient().getContainerAppsSourceControls() + .createOrUpdate(resourceGroupName, containerAppName, sourceControlName, this.innerModel(), Context.NONE); return this; } public SourceControl apply(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getContainerAppsSourceControls() - .createOrUpdate(resourceGroupName, containerAppName, sourceControlName, this.innerModel(), context); + this.innerObject = serviceManager.serviceClient().getContainerAppsSourceControls() + .createOrUpdate(resourceGroupName, containerAppName, sourceControlName, this.innerModel(), context); return this; } - SourceControlImpl( - SourceControlInner innerObject, + SourceControlImpl(SourceControlInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; - this.resourceGroupName = Utils.getValueFromIdByName(innerObject.id(), "resourceGroups"); - this.containerAppName = Utils.getValueFromIdByName(innerObject.id(), "containerApps"); - this.sourceControlName = Utils.getValueFromIdByName(innerObject.id(), "sourcecontrols"); + this.resourceGroupName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "resourceGroups"); + this.containerAppName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "containerApps"); + this.sourceControlName = ResourceManagerUtils.getValueFromIdByName(innerObject.id(), "sourcecontrols"); } public SourceControl refresh() { - this.innerObject = - serviceManager - .serviceClient() - .getContainerAppsSourceControls() - .getWithResponse(resourceGroupName, containerAppName, sourceControlName, Context.NONE) - .getValue(); + this.innerObject = serviceManager.serviceClient().getContainerAppsSourceControls() + .getWithResponse(resourceGroupName, containerAppName, sourceControlName, Context.NONE).getValue(); return this; } public SourceControl refresh(Context context) { - this.innerObject = - serviceManager - .serviceClient() - .getContainerAppsSourceControls() - .getWithResponse(resourceGroupName, containerAppName, sourceControlName, context) - .getValue(); + this.innerObject = serviceManager.serviceClient().getContainerAppsSourceControls() + .getWithResponse(resourceGroupName, containerAppName, sourceControlName, context).getValue(); return this; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsageImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsageImpl.java new file mode 100644 index 000000000000..9d768b691cd4 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsageImpl.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; +import com.azure.resourcemanager.appcontainers.models.Usage; +import com.azure.resourcemanager.appcontainers.models.UsageName; + +public final class UsageImpl implements Usage { + private UsageInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + UsageImpl(UsageInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String unit() { + return this.innerModel().unit(); + } + + public float currentValue() { + return this.innerModel().currentValue(); + } + + public float limit() { + return this.innerModel().limit(); + } + + public UsageName name() { + return this.innerModel().name(); + } + + public UsageInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsagesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsagesClientImpl.java new file mode 100644 index 000000000000..e24dcfce4166 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsagesClientImpl.java @@ -0,0 +1,262 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.appcontainers.fluent.UsagesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; +import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; +import com.azure.resourcemanager.appcontainers.models.ListUsagesResult; +import reactor.core.publisher.Mono; + +/** + * An instance of this class provides access to all the operations defined in UsagesClient. + */ +public final class UsagesClientImpl implements UsagesClient { + /** + * The proxy service used to perform REST calls. + */ + private final UsagesService service; + + /** + * The service client containing this operation class. + */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of UsagesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + UsagesClientImpl(ContainerAppsApiClientImpl client) { + this.service = RestProxy.create(UsagesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientUsages to be used by the proxy service to + * perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + public interface UsagesService { + @Headers({ "Content-Type: application/json" }) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}/usages") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> list(@HostParam("$host") String endpoint, + @PathParam("location") String location, @PathParam("subscriptionId") String subscriptionId, + @QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context); + + @Headers({ "Content-Type: application/json" }) + @Get("{nextLink}") + @ExpectedResponses({ 200 }) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listNext(@PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + } + + /** + * Gets, for the specified location, the current resource usage information as well as the limits under the + * subscription. + * + * @param location The location for which resource usage is queried. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext(context -> service.list(this.client.getEndpoint(), location, this.client.getSubscriptionId(), + this.client.getApiVersion(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Gets, for the specified location, the current resource usage information as well as the limits under the + * subscription. + * + * @param location The location for which resource usage is queried. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listSinglePageAsync(String location, Context context) { + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + if (location == null) { + return Mono.error(new IllegalArgumentException("Parameter location is required and cannot be null.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono.error(new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .list(this.client.getEndpoint(), location, this.client.getSubscriptionId(), this.client.getApiVersion(), + accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } + + /** + * Gets, for the specified location, the current resource usage information as well as the limits under the + * subscription. + * + * @param location The location for which resource usage is queried. + * @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 paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location) { + return new PagedFlux<>(() -> listSinglePageAsync(location), nextLink -> listNextSinglePageAsync(nextLink)); + } + + /** + * Gets, for the specified location, the current resource usage information as well as the limits under the + * subscription. + * + * @param location The location for which resource usage is queried. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String location, Context context) { + return new PagedFlux<>(() -> listSinglePageAsync(location, context), + nextLink -> listNextSinglePageAsync(nextLink, context)); + } + + /** + * Gets, for the specified location, the current resource usage information as well as the limits under the + * subscription. + * + * @param location The location for which resource usage is queried. + * @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 paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location) { + return new PagedIterable<>(listAsync(location)); + } + + /** + * Gets, for the specified location, the current resource usage information as well as the limits under the + * subscription. + * + * @param location The location for which resource usage is queried. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String location, Context context) { + return new PagedIterable<>(listAsync(location, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil.withContext(context -> service.listNext(nextLink, this.client.getEndpoint(), accept, context)) + .>map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), + res.getHeaders(), res.getValue().value(), res.getValue().nextLink(), null)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + * + * The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link PagedResponse} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listNextSinglePageAsync(String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono.error( + new IllegalArgumentException("Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service.listNext(nextLink, this.client.getEndpoint(), accept, context) + .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(), + res.getValue().value(), res.getValue().nextLink(), null)); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsagesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsagesImpl.java new file mode 100644 index 000000000000..9606e538e86b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/UsagesImpl.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.UsagesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; +import com.azure.resourcemanager.appcontainers.models.Usage; +import com.azure.resourcemanager.appcontainers.models.Usages; + +public final class UsagesImpl implements Usages { + private static final ClientLogger LOGGER = new ClientLogger(UsagesImpl.class); + + private final UsagesClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public UsagesImpl(UsagesClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable list(String location) { + PagedIterable inner = this.serviceClient().list(location); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); + } + + public PagedIterable list(String location, Context context) { + PagedIterable inner = this.serviceClient().list(location, context); + return ResourceManagerUtils.mapPage(inner, inner1 -> new UsageImpl(inner1, this.manager())); + } + + private UsagesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/WorkloadProfileStatesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/WorkloadProfileStatesImpl.java index 8e91506dd431..6bf062081f2c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/WorkloadProfileStatesImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/WorkloadProfileStatesImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.implementation; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStates; import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; @@ -13,8 +14,7 @@ public final class WorkloadProfileStatesImpl implements WorkloadProfileStates { private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; - WorkloadProfileStatesImpl( - WorkloadProfileStatesInner innerObject, + WorkloadProfileStatesImpl(WorkloadProfileStatesInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { this.innerObject = innerObject; this.serviceManager = serviceManager; @@ -36,6 +36,10 @@ public WorkloadProfileStatesProperties properties() { return this.innerModel().properties(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public WorkloadProfileStatesInner innerModel() { return this.innerObject; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/package-info.java index 9eb807ce176a..d5c81f00f20c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/package-info.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/package-info.java @@ -2,5 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the implementations for ContainerAppsApiClient. null. */ +/** + * Package containing the implementations for ContainerAppsApiClient. + * Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the + * function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions + * extension resource. + */ package com.azure.resourcemanager.appcontainers.implementation; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AccessMode.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AccessMode.java index 32fca9da968c..852bec4dd599 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AccessMode.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AccessMode.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Access mode for storage. */ +/** + * Access mode for storage. + */ public final class AccessMode extends ExpandableStringEnum { - /** Static value ReadOnly for AccessMode. */ + /** + * Static value ReadOnly for AccessMode. + */ public static final AccessMode READ_ONLY = fromString("ReadOnly"); - /** Static value ReadWrite for AccessMode. */ + /** + * Static value ReadWrite for AccessMode. + */ public static final AccessMode READ_WRITE = fromString("ReadWrite"); /** * Creates a new instance of AccessMode value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public AccessMode() { /** * Creates or finds a AccessMode from its string representation. - * + * * @param name a name to look for. * @return the corresponding AccessMode. */ @@ -38,7 +44,7 @@ public static AccessMode fromString(String name) { /** * Gets known AccessMode values. - * + * * @return known AccessMode values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Action.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Action.java index 03ba2ba32d11..a6e094ef55ee 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Action.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Action.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL Allow or ALL Deny. */ +/** + * Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL Allow or ALL Deny. + */ public final class Action extends ExpandableStringEnum { - /** Static value Allow for Action. */ + /** + * Static value Allow for Action. + */ public static final Action ALLOW = fromString("Allow"); - /** Static value Deny for Action. */ + /** + * Static value Deny for Action. + */ public static final Action DENY = fromString("Deny"); /** * Creates a new instance of Action value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public Action() { /** * Creates or finds a Action from its string representation. - * + * * @param name a name to look for. * @return the corresponding Action. */ @@ -38,7 +44,7 @@ public static Action fromString(String name) { /** * Gets known Action values. - * + * * @return known Action values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ActiveRevisionsMode.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ActiveRevisionsMode.java index 7084cbc19dc9..1423db539a9a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ActiveRevisionsMode.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ActiveRevisionsMode.java @@ -15,15 +15,19 @@ * default.</item></list>. */ public final class ActiveRevisionsMode extends ExpandableStringEnum { - /** Static value Multiple for ActiveRevisionsMode. */ + /** + * Static value Multiple for ActiveRevisionsMode. + */ public static final ActiveRevisionsMode MULTIPLE = fromString("Multiple"); - /** Static value Single for ActiveRevisionsMode. */ + /** + * Static value Single for ActiveRevisionsMode. + */ public static final ActiveRevisionsMode SINGLE = fromString("Single"); /** * Creates a new instance of ActiveRevisionsMode value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -32,7 +36,7 @@ public ActiveRevisionsMode() { /** * Creates or finds a ActiveRevisionsMode from its string representation. - * + * * @param name a name to look for. * @return the corresponding ActiveRevisionsMode. */ @@ -43,7 +47,7 @@ public static ActiveRevisionsMode fromString(String name) { /** * Gets known ActiveRevisionsMode values. - * + * * @return known ActiveRevisionsMode values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Affinity.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Affinity.java index c7493e9bb820..cab5ae672ceb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Affinity.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Affinity.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Sticky Session Affinity. */ +/** + * Sticky Session Affinity. + */ public final class Affinity extends ExpandableStringEnum { - /** Static value sticky for Affinity. */ + /** + * Static value sticky for Affinity. + */ public static final Affinity STICKY = fromString("sticky"); - /** Static value none for Affinity. */ + /** + * Static value none for Affinity. + */ public static final Affinity NONE = fromString("none"); /** * Creates a new instance of Affinity value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public Affinity() { /** * Creates or finds a Affinity from its string representation. - * + * * @param name a name to look for. * @return the corresponding Affinity. */ @@ -38,7 +44,7 @@ public static Affinity fromString(String name) { /** * Gets known Affinity values. - * + * * @return known Affinity values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedAudiencesValidation.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedAudiencesValidation.java index 3a63ecb42ca0..4f3646099c37 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedAudiencesValidation.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedAudiencesValidation.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The configuration settings of the Allowed Audiences validation flow. */ +/** + * The configuration settings of the Allowed Audiences validation flow. + */ @Fluent public final class AllowedAudiencesValidation { /* @@ -17,14 +19,16 @@ public final class AllowedAudiencesValidation { @JsonProperty(value = "allowedAudiences") private List allowedAudiences; - /** Creates an instance of AllowedAudiencesValidation class. */ + /** + * Creates an instance of AllowedAudiencesValidation class. + */ public AllowedAudiencesValidation() { } /** * Get the allowedAudiences property: The configuration settings of the allowed list of audiences from which to * validate the JWT token. - * + * * @return the allowedAudiences value. */ public List allowedAudiences() { @@ -34,7 +38,7 @@ public List allowedAudiences() { /** * Set the allowedAudiences property: The configuration settings of the allowed list of audiences from which to * validate the JWT token. - * + * * @param allowedAudiences the allowedAudiences value to set. * @return the AllowedAudiencesValidation object itself. */ @@ -45,7 +49,7 @@ public AllowedAudiencesValidation withAllowedAudiences(List allowedAudie /** * 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/AllowedPrincipals.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedPrincipals.java index 836c4bcc7816..608dbfd51e79 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedPrincipals.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedPrincipals.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The configuration settings of the Azure Active Directory allowed principals. */ +/** + * The configuration settings of the Azure Active Directory allowed principals. + */ @Fluent public final class AllowedPrincipals { /* @@ -23,13 +25,15 @@ public final class AllowedPrincipals { @JsonProperty(value = "identities") private List identities; - /** Creates an instance of AllowedPrincipals class. */ + /** + * Creates an instance of AllowedPrincipals class. + */ public AllowedPrincipals() { } /** * Get the groups property: The list of the allowed groups. - * + * * @return the groups value. */ public List groups() { @@ -38,7 +42,7 @@ public List groups() { /** * Set the groups property: The list of the allowed groups. - * + * * @param groups the groups value to set. * @return the AllowedPrincipals object itself. */ @@ -49,7 +53,7 @@ public AllowedPrincipals withGroups(List groups) { /** * Get the identities property: The list of the allowed identities. - * + * * @return the identities value. */ public List identities() { @@ -58,7 +62,7 @@ public List identities() { /** * Set the identities property: The list of the allowed identities. - * + * * @param identities the identities value to set. * @return the AllowedPrincipals object itself. */ @@ -69,7 +73,7 @@ public AllowedPrincipals withIdentities(List identities) { /** * 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/AppInsightsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppInsightsConfiguration.java new file mode 100644 index 000000000000..7a1878f16723 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppInsightsConfiguration.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Configuration of Application Insights. + */ +@Fluent +public final class AppInsightsConfiguration { + /* + * Application Insights connection string + */ + @JsonProperty(value = "connectionString") + private String connectionString; + + /** + * Creates an instance of AppInsightsConfiguration class. + */ + public AppInsightsConfiguration() { + } + + /** + * Get the connectionString property: Application Insights connection string. + * + * @return the connectionString value. + */ + public String connectionString() { + return this.connectionString; + } + + /** + * Set the connectionString property: Application Insights connection string. + * + * @param connectionString the connectionString value to set. + * @return the AppInsightsConfiguration object itself. + */ + public AppInsightsConfiguration withConnectionString(String connectionString) { + this.connectionString = connectionString; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppLogsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppLogsConfiguration.java index b015b446de0f..4e09302a6818 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppLogsConfiguration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppLogsConfiguration.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Configuration of application logs. */ +/** + * Configuration of application logs. + */ @Fluent public final class AppLogsConfiguration { /* @@ -22,13 +24,15 @@ public final class AppLogsConfiguration { @JsonProperty(value = "logAnalyticsConfiguration") private LogAnalyticsConfiguration logAnalyticsConfiguration; - /** Creates an instance of AppLogsConfiguration class. */ + /** + * Creates an instance of AppLogsConfiguration class. + */ public AppLogsConfiguration() { } /** * Get the destination property: Logs destination, can be 'log-analytics', 'azure-monitor' or 'none'. - * + * * @return the destination value. */ public String destination() { @@ -37,7 +41,7 @@ public String destination() { /** * Set the destination property: Logs destination, can be 'log-analytics', 'azure-monitor' or 'none'. - * + * * @param destination the destination value to set. * @return the AppLogsConfiguration object itself. */ @@ -49,7 +53,7 @@ public AppLogsConfiguration withDestination(String destination) { /** * Get the logAnalyticsConfiguration property: Log Analytics configuration, must only be provided when destination * is configured as 'log-analytics'. - * + * * @return the logAnalyticsConfiguration value. */ public LogAnalyticsConfiguration logAnalyticsConfiguration() { @@ -59,7 +63,7 @@ public LogAnalyticsConfiguration logAnalyticsConfiguration() { /** * Set the logAnalyticsConfiguration property: Log Analytics configuration, must only be provided when destination * is configured as 'log-analytics'. - * + * * @param logAnalyticsConfiguration the logAnalyticsConfiguration value to set. * @return the AppLogsConfiguration object itself. */ @@ -70,7 +74,7 @@ public AppLogsConfiguration withLogAnalyticsConfiguration(LogAnalyticsConfigurat /** * 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/AppProtocol.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppProtocol.java index f4c1d5c4844b..c4db82bce2a5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppProtocol.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppProtocol.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Tells Dapr which protocol your application is using. Valid options are http and grpc. Default is http. */ +/** + * Tells Dapr which protocol your application is using. Valid options are http and grpc. Default is http. + */ public final class AppProtocol extends ExpandableStringEnum { - /** Static value http for AppProtocol. */ + /** + * Static value http for AppProtocol. + */ public static final AppProtocol HTTP = fromString("http"); - /** Static value grpc for AppProtocol. */ + /** + * Static value grpc for AppProtocol. + */ public static final AppProtocol GRPC = fromString("grpc"); /** * Creates a new instance of AppProtocol value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public AppProtocol() { /** * Creates or finds a AppProtocol from its string representation. - * + * * @param name a name to look for. * @return the corresponding AppProtocol. */ @@ -38,7 +44,7 @@ public static AppProtocol fromString(String name) { /** * Gets known AppProtocol values. - * + * * @return known AppProtocol values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppRegistration.java index d3114a04a7e5..103b3dc5d783 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppRegistration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppRegistration.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The configuration settings of the app registration for providers that have app ids and app secrets. */ +/** + * The configuration settings of the app registration for providers that have app ids and app secrets. + */ @Fluent public final class AppRegistration { /* @@ -22,13 +24,15 @@ public final class AppRegistration { @JsonProperty(value = "appSecretSettingName") private String appSecretSettingName; - /** Creates an instance of AppRegistration class. */ + /** + * Creates an instance of AppRegistration class. + */ public AppRegistration() { } /** * Get the appId property: The App ID of the app used for login. - * + * * @return the appId value. */ public String appId() { @@ -37,7 +41,7 @@ public String appId() { /** * Set the appId property: The App ID of the app used for login. - * + * * @param appId the appId value to set. * @return the AppRegistration object itself. */ @@ -48,7 +52,7 @@ public AppRegistration withAppId(String appId) { /** * Get the appSecretSettingName property: The app setting name that contains the app secret. - * + * * @return the appSecretSettingName value. */ public String appSecretSettingName() { @@ -57,7 +61,7 @@ public String appSecretSettingName() { /** * Set the appSecretSettingName property: The app setting name that contains the app secret. - * + * * @param appSecretSettingName the appSecretSettingName value to set. * @return the AppRegistration object itself. */ @@ -68,7 +72,7 @@ public AppRegistration withAppSecretSettingName(String appSecretSettingName) { /** * 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/AppResiliencies.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliencies.java new file mode 100644 index 000000000000..06fb0d166368 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliencies.java @@ -0,0 +1,175 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of AppResiliencies. + */ +public interface AppResiliencies { + /** + * Delete an application's resiliency policy. + * + * Delete container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse(String resourceGroupName, String appName, String name, Context context); + + /** + * Delete an application's resiliency policy. + * + * Delete container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String appName, String name); + + /** + * Get an application's resiliency policy. + * + * Get container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container app resiliency policy along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String appName, String name, Context context); + + /** + * Get an application's resiliency policy. + * + * Get container app resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param name Name of the resiliency policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container app resiliency policy. + */ + AppResiliency get(String resourceGroupName, String appName, String name); + + /** + * List an application's resiliency policies. + * + * List container app resiliency policies. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of AppResiliency policies as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String appName); + + /** + * List an application's resiliency policies. + * + * List container app resiliency policies. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of AppResiliency policies as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String appName, Context context); + + /** + * Get an application's resiliency policy. + * + * Get container app resiliency policy. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container app resiliency policy along with {@link Response}. + */ + AppResiliency getById(String id); + + /** + * Get an application's resiliency policy. + * + * Get container app resiliency policy. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container app resiliency policy along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete an application's resiliency policy. + * + * Delete container app resiliency policy. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete an application's resiliency policy. + * + * Delete container app resiliency policy. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new AppResiliency resource. + * + * @param name resource name. + * @return the first stage of the new AppResiliency definition. + */ + AppResiliency.DefinitionStages.Blank define(String name); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliency.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliency.java new file mode 100644 index 000000000000..2ddc37d1845c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliency.java @@ -0,0 +1,358 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.AppResiliencyInner; + +/** + * An immutable client-side representation of AppResiliency. + */ +public interface AppResiliency { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the timeoutPolicy property: Policy to set request timeouts. + * + * @return the timeoutPolicy value. + */ + TimeoutPolicy timeoutPolicy(); + + /** + * Gets the httpRetryPolicy property: Policy that defines http request retry conditions. + * + * @return the httpRetryPolicy value. + */ + HttpRetryPolicy httpRetryPolicy(); + + /** + * Gets the tcpRetryPolicy property: Policy that defines tcp request retry conditions. + * + * @return the tcpRetryPolicy value. + */ + TcpRetryPolicy tcpRetryPolicy(); + + /** + * Gets the circuitBreakerPolicy property: Policy that defines circuit breaker conditions. + * + * @return the circuitBreakerPolicy value. + */ + CircuitBreakerPolicy circuitBreakerPolicy(); + + /** + * Gets the httpConnectionPool property: Defines parameters for http connection pooling. + * + * @return the httpConnectionPool value. + */ + HttpConnectionPool httpConnectionPool(); + + /** + * Gets the tcpConnectionPool property: Defines parameters for tcp connection pooling. + * + * @return the tcpConnectionPool value. + */ + TcpConnectionPool tcpConnectionPool(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.AppResiliencyInner object. + * + * @return the inner object. + */ + AppResiliencyInner innerModel(); + + /** + * The entirety of the AppResiliency definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The AppResiliency definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the AppResiliency definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the AppResiliency definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, appName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param appName Name of the Container App. + * @return the next definition stage. + */ + WithCreate withExistingContainerApp(String resourceGroupName, String appName); + } + + /** + * The stage of the AppResiliency definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTimeoutPolicy, DefinitionStages.WithHttpRetryPolicy, + DefinitionStages.WithTcpRetryPolicy, DefinitionStages.WithCircuitBreakerPolicy, + DefinitionStages.WithHttpConnectionPool, DefinitionStages.WithTcpConnectionPool { + /** + * Executes the create request. + * + * @return the created resource. + */ + AppResiliency create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + AppResiliency create(Context context); + } + + /** + * The stage of the AppResiliency definition allowing to specify timeoutPolicy. + */ + interface WithTimeoutPolicy { + /** + * Specifies the timeoutPolicy property: Policy to set request timeouts. + * + * @param timeoutPolicy Policy to set request timeouts. + * @return the next definition stage. + */ + WithCreate withTimeoutPolicy(TimeoutPolicy timeoutPolicy); + } + + /** + * The stage of the AppResiliency definition allowing to specify httpRetryPolicy. + */ + interface WithHttpRetryPolicy { + /** + * Specifies the httpRetryPolicy property: Policy that defines http request retry conditions. + * + * @param httpRetryPolicy Policy that defines http request retry conditions. + * @return the next definition stage. + */ + WithCreate withHttpRetryPolicy(HttpRetryPolicy httpRetryPolicy); + } + + /** + * The stage of the AppResiliency definition allowing to specify tcpRetryPolicy. + */ + interface WithTcpRetryPolicy { + /** + * Specifies the tcpRetryPolicy property: Policy that defines tcp request retry conditions. + * + * @param tcpRetryPolicy Policy that defines tcp request retry conditions. + * @return the next definition stage. + */ + WithCreate withTcpRetryPolicy(TcpRetryPolicy tcpRetryPolicy); + } + + /** + * The stage of the AppResiliency definition allowing to specify circuitBreakerPolicy. + */ + interface WithCircuitBreakerPolicy { + /** + * Specifies the circuitBreakerPolicy property: Policy that defines circuit breaker conditions. + * + * @param circuitBreakerPolicy Policy that defines circuit breaker conditions. + * @return the next definition stage. + */ + WithCreate withCircuitBreakerPolicy(CircuitBreakerPolicy circuitBreakerPolicy); + } + + /** + * The stage of the AppResiliency definition allowing to specify httpConnectionPool. + */ + interface WithHttpConnectionPool { + /** + * Specifies the httpConnectionPool property: Defines parameters for http connection pooling. + * + * @param httpConnectionPool Defines parameters for http connection pooling. + * @return the next definition stage. + */ + WithCreate withHttpConnectionPool(HttpConnectionPool httpConnectionPool); + } + + /** + * The stage of the AppResiliency definition allowing to specify tcpConnectionPool. + */ + interface WithTcpConnectionPool { + /** + * Specifies the tcpConnectionPool property: Defines parameters for tcp connection pooling. + * + * @param tcpConnectionPool Defines parameters for tcp connection pooling. + * @return the next definition stage. + */ + WithCreate withTcpConnectionPool(TcpConnectionPool tcpConnectionPool); + } + } + + /** + * Begins update for the AppResiliency resource. + * + * @return the stage of resource update. + */ + AppResiliency.Update update(); + + /** + * The template for AppResiliency update. + */ + interface Update + extends UpdateStages.WithTimeoutPolicy, UpdateStages.WithHttpRetryPolicy, UpdateStages.WithTcpRetryPolicy, + UpdateStages.WithCircuitBreakerPolicy, UpdateStages.WithHttpConnectionPool, UpdateStages.WithTcpConnectionPool { + /** + * Executes the update request. + * + * @return the updated resource. + */ + AppResiliency apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + AppResiliency apply(Context context); + } + + /** + * The AppResiliency update stages. + */ + interface UpdateStages { + /** + * The stage of the AppResiliency update allowing to specify timeoutPolicy. + */ + interface WithTimeoutPolicy { + /** + * Specifies the timeoutPolicy property: Policy to set request timeouts. + * + * @param timeoutPolicy Policy to set request timeouts. + * @return the next definition stage. + */ + Update withTimeoutPolicy(TimeoutPolicy timeoutPolicy); + } + + /** + * The stage of the AppResiliency update allowing to specify httpRetryPolicy. + */ + interface WithHttpRetryPolicy { + /** + * Specifies the httpRetryPolicy property: Policy that defines http request retry conditions. + * + * @param httpRetryPolicy Policy that defines http request retry conditions. + * @return the next definition stage. + */ + Update withHttpRetryPolicy(HttpRetryPolicy httpRetryPolicy); + } + + /** + * The stage of the AppResiliency update allowing to specify tcpRetryPolicy. + */ + interface WithTcpRetryPolicy { + /** + * Specifies the tcpRetryPolicy property: Policy that defines tcp request retry conditions. + * + * @param tcpRetryPolicy Policy that defines tcp request retry conditions. + * @return the next definition stage. + */ + Update withTcpRetryPolicy(TcpRetryPolicy tcpRetryPolicy); + } + + /** + * The stage of the AppResiliency update allowing to specify circuitBreakerPolicy. + */ + interface WithCircuitBreakerPolicy { + /** + * Specifies the circuitBreakerPolicy property: Policy that defines circuit breaker conditions. + * + * @param circuitBreakerPolicy Policy that defines circuit breaker conditions. + * @return the next definition stage. + */ + Update withCircuitBreakerPolicy(CircuitBreakerPolicy circuitBreakerPolicy); + } + + /** + * The stage of the AppResiliency update allowing to specify httpConnectionPool. + */ + interface WithHttpConnectionPool { + /** + * Specifies the httpConnectionPool property: Defines parameters for http connection pooling. + * + * @param httpConnectionPool Defines parameters for http connection pooling. + * @return the next definition stage. + */ + Update withHttpConnectionPool(HttpConnectionPool httpConnectionPool); + } + + /** + * The stage of the AppResiliency update allowing to specify tcpConnectionPool. + */ + interface WithTcpConnectionPool { + /** + * Specifies the tcpConnectionPool property: Defines parameters for tcp connection pooling. + * + * @param tcpConnectionPool Defines parameters for tcp connection pooling. + * @return the next definition stage. + */ + Update withTcpConnectionPool(TcpConnectionPool tcpConnectionPool); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + AppResiliency refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + AppResiliency refresh(Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliencyCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliencyCollection.java new file mode 100644 index 000000000000..89441a8d33bb --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppResiliencyCollection.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.models.AppResiliencyInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Collection of AppResiliency policies. + */ +@Fluent +public final class AppResiliencyCollection { + /* + * Collection of resources. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * Link to next page of resources. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of AppResiliencyCollection class. + */ + public AppResiliencyCollection() { + } + + /** + * Get the value property: Collection of resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Collection of resources. + * + * @param value the value value to set. + * @return the AppResiliencyCollection object itself. + */ + public AppResiliencyCollection withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to next page of resources. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model AppResiliencyCollection")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AppResiliencyCollection.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Apple.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Apple.java index 34b83d23ca18..9d31e6c18518 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Apple.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Apple.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The configuration settings of the Apple provider. */ +/** + * The configuration settings of the Apple provider. + */ @Fluent public final class Apple { /* @@ -29,14 +31,16 @@ public final class Apple { @JsonProperty(value = "login") private LoginScopes login; - /** Creates an instance of Apple class. */ + /** + * Creates an instance of Apple class. + */ public Apple() { } /** * Get the enabled property: <code>false</code> if the Apple provider should not be enabled despite the * set registration; otherwise, <code>true</code>. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -46,7 +50,7 @@ public Boolean enabled() { /** * Set the enabled property: <code>false</code> if the Apple provider should not be enabled despite the * set registration; otherwise, <code>true</code>. - * + * * @param enabled the enabled value to set. * @return the Apple object itself. */ @@ -57,7 +61,7 @@ public Apple withEnabled(Boolean enabled) { /** * Get the registration property: The configuration settings of the Apple registration. - * + * * @return the registration value. */ public AppleRegistration registration() { @@ -66,7 +70,7 @@ public AppleRegistration registration() { /** * Set the registration property: The configuration settings of the Apple registration. - * + * * @param registration the registration value to set. * @return the Apple object itself. */ @@ -77,7 +81,7 @@ public Apple withRegistration(AppleRegistration registration) { /** * Get the login property: The configuration settings of the login flow. - * + * * @return the login value. */ public LoginScopes login() { @@ -86,7 +90,7 @@ public LoginScopes login() { /** * Set the login property: The configuration settings of the login flow. - * + * * @param login the login value to set. * @return the Apple object itself. */ @@ -97,7 +101,7 @@ public Apple withLogin(LoginScopes login) { /** * 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/AppleRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppleRegistration.java index 19013329ef25..2c98beff6028 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppleRegistration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppleRegistration.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The configuration settings of the registration for the Apple provider. */ +/** + * The configuration settings of the registration for the Apple provider. + */ @Fluent public final class AppleRegistration { /* @@ -22,13 +24,15 @@ public final class AppleRegistration { @JsonProperty(value = "clientSecretSettingName") private String clientSecretSettingName; - /** Creates an instance of AppleRegistration class. */ + /** + * Creates an instance of AppleRegistration class. + */ public AppleRegistration() { } /** * Get the clientId property: The Client ID of the app used for login. - * + * * @return the clientId value. */ public String clientId() { @@ -37,7 +41,7 @@ public String clientId() { /** * Set the clientId property: The Client ID of the app used for login. - * + * * @param clientId the clientId value to set. * @return the AppleRegistration object itself. */ @@ -48,7 +52,7 @@ public AppleRegistration withClientId(String clientId) { /** * Get the clientSecretSettingName property: The app setting name that contains the client secret. - * + * * @return the clientSecretSettingName value. */ public String clientSecretSettingName() { @@ -57,7 +61,7 @@ public String clientSecretSettingName() { /** * Set the clientSecretSettingName property: The app setting name that contains the client secret. - * + * * @param clientSecretSettingName the clientSecretSettingName value to set. * @return the AppleRegistration object itself. */ @@ -68,7 +72,7 @@ public AppleRegistration withClientSecretSettingName(String clientSecretSettingN /** * 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/Applicability.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Applicability.java index 1eb234379234..e11f3e143baa 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Applicability.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Applicability.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** indicates whether the profile is default for the location. */ +/** + * indicates whether the profile is default for the location. + */ public final class Applicability extends ExpandableStringEnum { - /** Static value LocationDefault for Applicability. */ + /** + * Static value LocationDefault for Applicability. + */ public static final Applicability LOCATION_DEFAULT = fromString("LocationDefault"); - /** Static value Custom for Applicability. */ + /** + * Static value Custom for Applicability. + */ public static final Applicability CUSTOM = fromString("Custom"); /** * Creates a new instance of Applicability value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public Applicability() { /** * Creates or finds a Applicability from its string representation. - * + * * @param name a name to look for. * @return the corresponding Applicability. */ @@ -38,7 +44,7 @@ public static Applicability fromString(String name) { /** * Gets known Applicability values. - * + * * @return known Applicability values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfig.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfig.java index 9f83b649744d..0c8e2faee1f9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfig.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfig.java @@ -8,32 +8,34 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner; -/** An immutable client-side representation of AuthConfig. */ +/** + * An immutable client-side representation of AuthConfig. + */ public interface AuthConfig { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); @@ -41,7 +43,7 @@ public interface AuthConfig { /** * Gets the platform property: The configuration settings of the platform of ContainerApp Service * Authentication/Authorization. - * + * * @return the platform value. */ AuthPlatform platform(); @@ -49,7 +51,7 @@ public interface AuthConfig { /** * Gets the globalValidation property: The configuration settings that determines the validation flow of users using * Service Authentication/Authorization. - * + * * @return the globalValidation value. */ GlobalValidation globalValidation(); @@ -57,7 +59,7 @@ public interface AuthConfig { /** * Gets the identityProviders property: The configuration settings of each of the identity providers used to * configure ContainerApp Service Authentication/Authorization. - * + * * @return the identityProviders value. */ IdentityProviders identityProviders(); @@ -65,7 +67,7 @@ public interface AuthConfig { /** * Gets the login property: The configuration settings of the login flow of users using ContainerApp Service * Authentication/Authorization. - * + * * @return the login value. */ Login login(); @@ -73,41 +75,57 @@ public interface AuthConfig { /** * Gets the httpSettings property: The configuration settings of the HTTP requests for authentication and * authorization requests made against ContainerApp Service Authentication/Authorization. - * + * * @return the httpSettings value. */ HttpSettings httpSettings(); + /** + * Gets the encryptionSettings property: The configuration settings of the secrets references of encryption key and + * signing key for ContainerApp Service Authentication/Authorization. + * + * @return the encryptionSettings value. + */ + EncryptionSettings encryptionSettings(); + /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner object. - * + * * @return the inner object. */ AuthConfigInner innerModel(); - /** The entirety of the AuthConfig definition. */ + /** + * The entirety of the AuthConfig definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The AuthConfig definition stages. */ + /** + * The AuthConfig definition stages. + */ interface DefinitionStages { - /** The first stage of the AuthConfig definition. */ + /** + * The first stage of the AuthConfig definition. + */ interface Blank extends WithParentResource { } - /** The stage of the AuthConfig definition allowing to specify parent resource. */ + /** + * The stage of the AuthConfig definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, containerAppName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @return the next definition stage. @@ -119,202 +137,250 @@ interface WithParentResource { * The stage of the AuthConfig definition which contains all the minimum required properties for the resource to * be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithPlatform, - DefinitionStages.WithGlobalValidation, - DefinitionStages.WithIdentityProviders, - DefinitionStages.WithLogin, - DefinitionStages.WithHttpSettings { + interface WithCreate extends DefinitionStages.WithPlatform, DefinitionStages.WithGlobalValidation, + DefinitionStages.WithIdentityProviders, DefinitionStages.WithLogin, DefinitionStages.WithHttpSettings, + DefinitionStages.WithEncryptionSettings { /** * Executes the create request. - * + * * @return the created resource. */ AuthConfig create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ AuthConfig create(Context context); } - /** The stage of the AuthConfig definition allowing to specify platform. */ + /** + * The stage of the AuthConfig definition allowing to specify platform. + */ interface WithPlatform { /** * Specifies the platform property: The configuration settings of the platform of ContainerApp Service * Authentication/Authorization.. - * + * * @param platform The configuration settings of the platform of ContainerApp Service - * Authentication/Authorization. + * Authentication/Authorization. * @return the next definition stage. */ WithCreate withPlatform(AuthPlatform platform); } - /** The stage of the AuthConfig definition allowing to specify globalValidation. */ + /** + * The stage of the AuthConfig definition allowing to specify globalValidation. + */ interface WithGlobalValidation { /** * Specifies the globalValidation property: The configuration settings that determines the validation flow * of users using Service Authentication/Authorization.. - * + * * @param globalValidation The configuration settings that determines the validation flow of users using - * Service Authentication/Authorization. + * Service Authentication/Authorization. * @return the next definition stage. */ WithCreate withGlobalValidation(GlobalValidation globalValidation); } - /** The stage of the AuthConfig definition allowing to specify identityProviders. */ + /** + * The stage of the AuthConfig definition allowing to specify identityProviders. + */ interface WithIdentityProviders { /** * Specifies the identityProviders property: The configuration settings of each of the identity providers * used to configure ContainerApp Service Authentication/Authorization.. - * + * * @param identityProviders The configuration settings of each of the identity providers used to configure - * ContainerApp Service Authentication/Authorization. + * ContainerApp Service Authentication/Authorization. * @return the next definition stage. */ WithCreate withIdentityProviders(IdentityProviders identityProviders); } - /** The stage of the AuthConfig definition allowing to specify login. */ + /** + * The stage of the AuthConfig definition allowing to specify login. + */ interface WithLogin { /** * Specifies the login property: The configuration settings of the login flow of users using ContainerApp * Service Authentication/Authorization.. - * + * * @param login The configuration settings of the login flow of users using ContainerApp Service - * Authentication/Authorization. + * Authentication/Authorization. * @return the next definition stage. */ WithCreate withLogin(Login login); } - /** The stage of the AuthConfig definition allowing to specify httpSettings. */ + /** + * The stage of the AuthConfig definition allowing to specify httpSettings. + */ interface WithHttpSettings { /** * Specifies the httpSettings property: The configuration settings of the HTTP requests for authentication * and authorization requests made against ContainerApp Service Authentication/Authorization.. - * + * * @param httpSettings The configuration settings of the HTTP requests for authentication and authorization - * requests made against ContainerApp Service Authentication/Authorization. + * requests made against ContainerApp Service Authentication/Authorization. * @return the next definition stage. */ WithCreate withHttpSettings(HttpSettings httpSettings); } + + /** + * The stage of the AuthConfig definition allowing to specify encryptionSettings. + */ + interface WithEncryptionSettings { + /** + * Specifies the encryptionSettings property: The configuration settings of the secrets references of + * encryption key and signing key for ContainerApp Service Authentication/Authorization.. + * + * @param encryptionSettings The configuration settings of the secrets references of encryption key and + * signing key for ContainerApp Service Authentication/Authorization. + * @return the next definition stage. + */ + WithCreate withEncryptionSettings(EncryptionSettings encryptionSettings); + } } /** * Begins update for the AuthConfig resource. - * + * * @return the stage of resource update. */ AuthConfig.Update update(); - /** The template for AuthConfig update. */ + /** + * The template for AuthConfig update. + */ interface Update - extends UpdateStages.WithPlatform, - UpdateStages.WithGlobalValidation, - UpdateStages.WithIdentityProviders, - UpdateStages.WithLogin, - UpdateStages.WithHttpSettings { + extends UpdateStages.WithPlatform, UpdateStages.WithGlobalValidation, UpdateStages.WithIdentityProviders, + UpdateStages.WithLogin, UpdateStages.WithHttpSettings, UpdateStages.WithEncryptionSettings { /** * Executes the update request. - * + * * @return the updated resource. */ AuthConfig apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ AuthConfig apply(Context context); } - /** The AuthConfig update stages. */ + /** + * The AuthConfig update stages. + */ interface UpdateStages { - /** The stage of the AuthConfig update allowing to specify platform. */ + /** + * The stage of the AuthConfig update allowing to specify platform. + */ interface WithPlatform { /** * Specifies the platform property: The configuration settings of the platform of ContainerApp Service * Authentication/Authorization.. - * + * * @param platform The configuration settings of the platform of ContainerApp Service - * Authentication/Authorization. + * Authentication/Authorization. * @return the next definition stage. */ Update withPlatform(AuthPlatform platform); } - /** The stage of the AuthConfig update allowing to specify globalValidation. */ + /** + * The stage of the AuthConfig update allowing to specify globalValidation. + */ interface WithGlobalValidation { /** * Specifies the globalValidation property: The configuration settings that determines the validation flow * of users using Service Authentication/Authorization.. - * + * * @param globalValidation The configuration settings that determines the validation flow of users using - * Service Authentication/Authorization. + * Service Authentication/Authorization. * @return the next definition stage. */ Update withGlobalValidation(GlobalValidation globalValidation); } - /** The stage of the AuthConfig update allowing to specify identityProviders. */ + /** + * The stage of the AuthConfig update allowing to specify identityProviders. + */ interface WithIdentityProviders { /** * Specifies the identityProviders property: The configuration settings of each of the identity providers * used to configure ContainerApp Service Authentication/Authorization.. - * + * * @param identityProviders The configuration settings of each of the identity providers used to configure - * ContainerApp Service Authentication/Authorization. + * ContainerApp Service Authentication/Authorization. * @return the next definition stage. */ Update withIdentityProviders(IdentityProviders identityProviders); } - /** The stage of the AuthConfig update allowing to specify login. */ + /** + * The stage of the AuthConfig update allowing to specify login. + */ interface WithLogin { /** * Specifies the login property: The configuration settings of the login flow of users using ContainerApp * Service Authentication/Authorization.. - * + * * @param login The configuration settings of the login flow of users using ContainerApp Service - * Authentication/Authorization. + * Authentication/Authorization. * @return the next definition stage. */ Update withLogin(Login login); } - /** The stage of the AuthConfig update allowing to specify httpSettings. */ + /** + * The stage of the AuthConfig update allowing to specify httpSettings. + */ interface WithHttpSettings { /** * Specifies the httpSettings property: The configuration settings of the HTTP requests for authentication * and authorization requests made against ContainerApp Service Authentication/Authorization.. - * + * * @param httpSettings The configuration settings of the HTTP requests for authentication and authorization - * requests made against ContainerApp Service Authentication/Authorization. + * requests made against ContainerApp Service Authentication/Authorization. * @return the next definition stage. */ Update withHttpSettings(HttpSettings httpSettings); } + + /** + * The stage of the AuthConfig update allowing to specify encryptionSettings. + */ + interface WithEncryptionSettings { + /** + * Specifies the encryptionSettings property: The configuration settings of the secrets references of + * encryption key and signing key for ContainerApp Service Authentication/Authorization.. + * + * @param encryptionSettings The configuration settings of the secrets references of encryption key and + * signing key for ContainerApp Service Authentication/Authorization. + * @return the next definition stage. + */ + Update withEncryptionSettings(EncryptionSettings encryptionSettings); + } } /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ AuthConfig refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfigCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfigCollection.java index cca73947e6dc..cb6e133045e8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfigCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfigCollection.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** AuthConfig collection ARM resource. */ +/** + * AuthConfig collection ARM resource. + */ @Fluent public final class AuthConfigCollection { /* @@ -25,13 +27,15 @@ public final class AuthConfigCollection { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of AuthConfigCollection class. */ + /** + * Creates an instance of AuthConfigCollection class. + */ public AuthConfigCollection() { } /** * Get the value property: Collection of resources. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: Collection of resources. - * + * * @param value the value value to set. * @return the AuthConfigCollection object itself. */ @@ -51,7 +55,7 @@ public AuthConfigCollection withValue(List value) { /** * Get the nextLink property: Link to next page of resources. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,14 +64,13 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model AuthConfigCollection")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model AuthConfigCollection")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthPlatform.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthPlatform.java index 94143f340220..0c477b52f3a7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthPlatform.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthPlatform.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The configuration settings of the platform of ContainerApp Service Authentication/Authorization. */ +/** + * The configuration settings of the platform of ContainerApp Service Authentication/Authorization. + */ @Fluent public final class AuthPlatform { /* @@ -25,14 +27,16 @@ public final class AuthPlatform { @JsonProperty(value = "runtimeVersion") private String runtimeVersion; - /** Creates an instance of AuthPlatform class. */ + /** + * Creates an instance of AuthPlatform class. + */ public AuthPlatform() { } /** * Get the enabled property: <code>true</code> if the Authentication / Authorization feature is enabled * for the current app; otherwise, <code>false</code>. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -42,7 +46,7 @@ public Boolean enabled() { /** * Set the enabled property: <code>true</code> if the Authentication / Authorization feature is enabled * for the current app; otherwise, <code>false</code>. - * + * * @param enabled the enabled value to set. * @return the AuthPlatform object itself. */ @@ -53,9 +57,10 @@ public AuthPlatform withEnabled(Boolean enabled) { /** * Get the runtimeVersion property: The RuntimeVersion of the Authentication / Authorization feature in use for the - * current app. The setting in this value can control the behavior of certain features in the Authentication / - * Authorization module. - * + * current app. + * The setting in this value can control the behavior of certain features in the Authentication / Authorization + * module. + * * @return the runtimeVersion value. */ public String runtimeVersion() { @@ -64,9 +69,10 @@ public String runtimeVersion() { /** * Set the runtimeVersion property: The RuntimeVersion of the Authentication / Authorization feature in use for the - * current app. The setting in this value can control the behavior of certain features in the Authentication / - * Authorization module. - * + * current app. + * The setting in this value can control the behavior of certain features in the Authentication / Authorization + * module. + * * @param runtimeVersion the runtimeVersion value to set. * @return the AuthPlatform object itself. */ @@ -77,7 +83,7 @@ public AuthPlatform withRuntimeVersion(String runtimeVersion) { /** * 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/AvailableOperations.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableOperations.java index 61b0f8789eda..adf507e54f74 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableOperations.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableOperations.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Available operations of the service. */ +/** + * Available operations of the service. + */ @Fluent public final class AvailableOperations { /* @@ -25,13 +27,15 @@ public final class AvailableOperations { @JsonProperty(value = "nextLink") private String nextLink; - /** Creates an instance of AvailableOperations class. */ + /** + * Creates an instance of AvailableOperations class. + */ public AvailableOperations() { } /** * Get the value property: Collection of available operation details. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: Collection of available operation details. - * + * * @param value the value value to set. * @return the AvailableOperations object itself. */ @@ -50,9 +54,9 @@ public AvailableOperations withValue(List value) { } /** - * Get the nextLink property: URL client should use to fetch the next page (per server side paging). It's null for - * now, added for future use. - * + * Get the nextLink property: URL client should use to fetch the next page (per server side paging). + * It's null for now, added for future use. + * * @return the nextLink value. */ public String nextLink() { @@ -60,9 +64,9 @@ public String nextLink() { } /** - * Set the nextLink property: URL client should use to fetch the next page (per server side paging). It's null for - * now, added for future use. - * + * Set the nextLink property: URL client should use to fetch the next page (per server side paging). + * It's null for now, added for future use. + * * @param nextLink the nextLink value to set. * @return the AvailableOperations object itself. */ @@ -73,7 +77,7 @@ public AvailableOperations withNextLink(String nextLink) { /** * 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/AvailableWorkloadProfile.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfile.java index 9d2d444694b5..453036211ae0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfile.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfile.java @@ -4,48 +4,58 @@ package com.azure.resourcemanager.appcontainers.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; -/** An immutable client-side representation of AvailableWorkloadProfile. */ +/** + * An immutable client-side representation of AvailableWorkloadProfile. + */ public interface AvailableWorkloadProfile { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: Region of the workload profile. - * + * * @return the location value. */ String location(); /** * Gets the properties property: Revision resource specific properties. - * + * * @return the properties value. */ AvailableWorkloadProfileProperties properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner object. - * + * * @return the inner object. */ AvailableWorkloadProfileInner innerModel(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfileProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfileProperties.java index 2960060ee3cf..7985d9a2d615 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfileProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfileProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Revision resource specific properties. */ +/** + * Revision resource specific properties. + */ @Fluent public final class AvailableWorkloadProfileProperties { /* @@ -34,19 +36,27 @@ public final class AvailableWorkloadProfileProperties { @JsonProperty(value = "memoryGiB") private Integer memoryGiB; + /* + * Number of GPUs. + */ + @JsonProperty(value = "gpus") + private Integer gpus; + /* * The everyday name of the workload profile. */ @JsonProperty(value = "displayName") private String displayName; - /** Creates an instance of AvailableWorkloadProfileProperties class. */ + /** + * Creates an instance of AvailableWorkloadProfileProperties class. + */ public AvailableWorkloadProfileProperties() { } /** * Get the category property: Used to categorize workload profiles. - * + * * @return the category value. */ public String category() { @@ -55,7 +65,7 @@ public String category() { /** * Set the category property: Used to categorize workload profiles. - * + * * @param category the category value to set. * @return the AvailableWorkloadProfileProperties object itself. */ @@ -66,7 +76,7 @@ public AvailableWorkloadProfileProperties withCategory(String category) { /** * Get the applicability property: indicates whether the profile is default for the location. - * + * * @return the applicability value. */ public Applicability applicability() { @@ -75,7 +85,7 @@ public Applicability applicability() { /** * Set the applicability property: indicates whether the profile is default for the location. - * + * * @param applicability the applicability value to set. * @return the AvailableWorkloadProfileProperties object itself. */ @@ -86,7 +96,7 @@ public AvailableWorkloadProfileProperties withApplicability(Applicability applic /** * Get the cores property: Number of cores in CPU. - * + * * @return the cores value. */ public Integer cores() { @@ -95,7 +105,7 @@ public Integer cores() { /** * Set the cores property: Number of cores in CPU. - * + * * @param cores the cores value to set. * @return the AvailableWorkloadProfileProperties object itself. */ @@ -106,7 +116,7 @@ public AvailableWorkloadProfileProperties withCores(Integer cores) { /** * Get the memoryGiB property: Memory in GiB. - * + * * @return the memoryGiB value. */ public Integer memoryGiB() { @@ -115,7 +125,7 @@ public Integer memoryGiB() { /** * Set the memoryGiB property: Memory in GiB. - * + * * @param memoryGiB the memoryGiB value to set. * @return the AvailableWorkloadProfileProperties object itself. */ @@ -124,9 +134,29 @@ public AvailableWorkloadProfileProperties withMemoryGiB(Integer memoryGiB) { return this; } + /** + * Get the gpus property: Number of GPUs. + * + * @return the gpus value. + */ + public Integer gpus() { + return this.gpus; + } + + /** + * Set the gpus property: Number of GPUs. + * + * @param gpus the gpus value to set. + * @return the AvailableWorkloadProfileProperties object itself. + */ + public AvailableWorkloadProfileProperties withGpus(Integer gpus) { + this.gpus = gpus; + return this; + } + /** * Get the displayName property: The everyday name of the workload profile. - * + * * @return the displayName value. */ public String displayName() { @@ -135,7 +165,7 @@ public String displayName() { /** * Set the displayName property: The everyday name of the workload profile. - * + * * @param displayName the displayName value to set. * @return the AvailableWorkloadProfileProperties object itself. */ @@ -146,7 +176,7 @@ public AvailableWorkloadProfileProperties withDisplayName(String displayName) { /** * 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/AvailableWorkloadProfiles.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfiles.java index 30eb8fd64ad8..e31a39b02d69 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfiles.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfiles.java @@ -7,13 +7,15 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of AvailableWorkloadProfiles. */ +/** + * Resource collection API of AvailableWorkloadProfiles. + */ public interface AvailableWorkloadProfiles { /** * Get available workload profiles by location. - * - *

Get all available workload profiles for a location. - * + * + * Get all available workload profiles for a location. + * * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. @@ -24,9 +26,9 @@ public interface AvailableWorkloadProfiles { /** * Get available workload profiles by location. - * - *

Get all available workload profiles for a location. - * + * + * Get all available workload profiles for a location. + * * @param location The name of Azure region. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfilesCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfilesCollection.java index a21dfb315cd7..78d73b05d570 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfilesCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfilesCollection.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Collection of available workload profiles in the location. */ +/** + * Collection of available workload profiles in the location. + */ @Fluent public final class AvailableWorkloadProfilesCollection { /* @@ -25,13 +27,15 @@ public final class AvailableWorkloadProfilesCollection { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of AvailableWorkloadProfilesCollection class. */ + /** + * Creates an instance of AvailableWorkloadProfilesCollection class. + */ public AvailableWorkloadProfilesCollection() { } /** * Get the value property: Collection of workload profiles. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: Collection of workload profiles. - * + * * @param value the value value to set. * @return the AvailableWorkloadProfilesCollection object itself. */ @@ -51,7 +55,7 @@ public AvailableWorkloadProfilesCollection withValue(List e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectory.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectory.java index a75e724b450f..4f9eaadb5f71 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectory.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectory.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The configuration settings of the Azure Active directory provider. */ +/** + * The configuration settings of the Azure Active directory provider. + */ @Fluent public final class AzureActiveDirectory { /* @@ -43,14 +45,16 @@ public final class AzureActiveDirectory { @JsonProperty(value = "isAutoProvisioned") private Boolean isAutoProvisioned; - /** Creates an instance of AzureActiveDirectory class. */ + /** + * Creates an instance of AzureActiveDirectory class. + */ public AzureActiveDirectory() { } /** * Get the enabled property: <code>false</code> if the Azure Active Directory provider should not be * enabled despite the set registration; otherwise, <code>true</code>. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -60,7 +64,7 @@ public Boolean enabled() { /** * Set the enabled property: <code>false</code> if the Azure Active Directory provider should not be * enabled despite the set registration; otherwise, <code>true</code>. - * + * * @param enabled the enabled value to set. * @return the AzureActiveDirectory object itself. */ @@ -71,7 +75,7 @@ public AzureActiveDirectory withEnabled(Boolean enabled) { /** * Get the registration property: The configuration settings of the Azure Active Directory app registration. - * + * * @return the registration value. */ public AzureActiveDirectoryRegistration registration() { @@ -80,7 +84,7 @@ public AzureActiveDirectoryRegistration registration() { /** * Set the registration property: The configuration settings of the Azure Active Directory app registration. - * + * * @param registration the registration value to set. * @return the AzureActiveDirectory object itself. */ @@ -91,7 +95,7 @@ public AzureActiveDirectory withRegistration(AzureActiveDirectoryRegistration re /** * Get the login property: The configuration settings of the Azure Active Directory login flow. - * + * * @return the login value. */ public AzureActiveDirectoryLogin login() { @@ -100,7 +104,7 @@ public AzureActiveDirectoryLogin login() { /** * Set the login property: The configuration settings of the Azure Active Directory login flow. - * + * * @param login the login value to set. * @return the AzureActiveDirectory object itself. */ @@ -111,7 +115,7 @@ public AzureActiveDirectory withLogin(AzureActiveDirectoryLogin login) { /** * Get the validation property: The configuration settings of the Azure Active Directory token validation flow. - * + * * @return the validation value. */ public AzureActiveDirectoryValidation validation() { @@ -120,7 +124,7 @@ public AzureActiveDirectoryValidation validation() { /** * Set the validation property: The configuration settings of the Azure Active Directory token validation flow. - * + * * @param validation the validation value to set. * @return the AzureActiveDirectory object itself. */ @@ -131,9 +135,10 @@ public AzureActiveDirectory withValidation(AzureActiveDirectoryValidation valida /** * Get the isAutoProvisioned property: Gets a value indicating whether the Azure AD configuration was - * auto-provisioned using 1st party tooling. This is an internal flag primarily intended to support the Azure - * Management Portal. Users should not read or write to this property. - * + * auto-provisioned using 1st party tooling. + * This is an internal flag primarily intended to support the Azure Management Portal. Users should not + * read or write to this property. + * * @return the isAutoProvisioned value. */ public Boolean isAutoProvisioned() { @@ -142,9 +147,10 @@ public Boolean isAutoProvisioned() { /** * Set the isAutoProvisioned property: Gets a value indicating whether the Azure AD configuration was - * auto-provisioned using 1st party tooling. This is an internal flag primarily intended to support the Azure - * Management Portal. Users should not read or write to this property. - * + * auto-provisioned using 1st party tooling. + * This is an internal flag primarily intended to support the Azure Management Portal. Users should not + * read or write to this property. + * * @param isAutoProvisioned the isAutoProvisioned value to set. * @return the AzureActiveDirectory object itself. */ @@ -155,7 +161,7 @@ public AzureActiveDirectory withIsAutoProvisioned(Boolean isAutoProvisioned) { /** * 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/AzureActiveDirectoryLogin.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryLogin.java index 8f56e461f975..89bc07ad1216 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryLogin.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryLogin.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The configuration settings of the Azure Active Directory login flow. */ +/** + * The configuration settings of the Azure Active Directory login flow. + */ @Fluent public final class AzureActiveDirectoryLogin { /* @@ -25,14 +27,16 @@ public final class AzureActiveDirectoryLogin { @JsonProperty(value = "disableWWWAuthenticate") private Boolean disableWwwAuthenticate; - /** Creates an instance of AzureActiveDirectoryLogin class. */ + /** + * Creates an instance of AzureActiveDirectoryLogin class. + */ public AzureActiveDirectoryLogin() { } /** - * Get the loginParameters property: Login parameters to send to the OpenID Connect authorization endpoint when a - * user logs in. Each parameter must be in the form "key=value". - * + * Get the loginParameters property: Login parameters to send to the OpenID Connect authorization endpoint when + * a user logs in. Each parameter must be in the form "key=value". + * * @return the loginParameters value. */ public List loginParameters() { @@ -40,9 +44,9 @@ public List loginParameters() { } /** - * Set the loginParameters property: Login parameters to send to the OpenID Connect authorization endpoint when a - * user logs in. Each parameter must be in the form "key=value". - * + * Set the loginParameters property: Login parameters to send to the OpenID Connect authorization endpoint when + * a user logs in. Each parameter must be in the form "key=value". + * * @param loginParameters the loginParameters value to set. * @return the AzureActiveDirectoryLogin object itself. */ @@ -52,9 +56,9 @@ public AzureActiveDirectoryLogin withLoginParameters(List loginParameter } /** - * Get the disableWwwAuthenticate property: <code>true</code> if the www-authenticate provider should be - * omitted from the request; otherwise, <code>false</code>. - * + * Get the disableWwwAuthenticate property: <code>true</code> if the www-authenticate provider should + * be omitted from the request; otherwise, <code>false</code>. + * * @return the disableWwwAuthenticate value. */ public Boolean disableWwwAuthenticate() { @@ -62,9 +66,9 @@ public Boolean disableWwwAuthenticate() { } /** - * Set the disableWwwAuthenticate property: <code>true</code> if the www-authenticate provider should be - * omitted from the request; otherwise, <code>false</code>. - * + * Set the disableWwwAuthenticate property: <code>true</code> if the www-authenticate provider should + * be omitted from the request; otherwise, <code>false</code>. + * * @param disableWwwAuthenticate the disableWwwAuthenticate value to set. * @return the AzureActiveDirectoryLogin object itself. */ @@ -75,7 +79,7 @@ public AzureActiveDirectoryLogin withDisableWwwAuthenticate(Boolean disableWwwAu /** * 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/AzureActiveDirectoryRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryRegistration.java index 4ce29639d257..12c0102dc6d8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryRegistration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryRegistration.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The configuration settings of the Azure Active Directory app registration. */ +/** + * The configuration settings of the Azure Active Directory app registration. + */ @Fluent public final class AzureActiveDirectoryRegistration { /* @@ -59,16 +61,20 @@ public final class AzureActiveDirectoryRegistration { @JsonProperty(value = "clientSecretCertificateIssuer") private String clientSecretCertificateIssuer; - /** Creates an instance of AzureActiveDirectoryRegistration class. */ + /** + * Creates an instance of AzureActiveDirectoryRegistration class. + */ public AzureActiveDirectoryRegistration() { } /** * Get the openIdIssuer property: The OpenID Connect Issuer URI that represents the entity which issues access - * tokens for this application. When using Azure Active Directory, this value is the URI of the directory tenant, - * e.g. https://login.microsoftonline.com/v2.0/{tenant-guid}/. This URI is a case-sensitive identifier for the token - * issuer. More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html. - * + * tokens for this application. + * When using Azure Active Directory, this value is the URI of the directory tenant, e.g. + * https://login.microsoftonline.com/v2.0/{tenant-guid}/. + * This URI is a case-sensitive identifier for the token issuer. + * More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html. + * * @return the openIdIssuer value. */ public String openIdIssuer() { @@ -77,10 +83,12 @@ public String openIdIssuer() { /** * Set the openIdIssuer property: The OpenID Connect Issuer URI that represents the entity which issues access - * tokens for this application. When using Azure Active Directory, this value is the URI of the directory tenant, - * e.g. https://login.microsoftonline.com/v2.0/{tenant-guid}/. This URI is a case-sensitive identifier for the token - * issuer. More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html. - * + * tokens for this application. + * When using Azure Active Directory, this value is the URI of the directory tenant, e.g. + * https://login.microsoftonline.com/v2.0/{tenant-guid}/. + * This URI is a case-sensitive identifier for the token issuer. + * More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html. + * * @param openIdIssuer the openIdIssuer value to set. * @return the AzureActiveDirectoryRegistration object itself. */ @@ -90,10 +98,11 @@ public AzureActiveDirectoryRegistration withOpenIdIssuer(String openIdIssuer) { } /** - * Get the clientId property: The Client ID of this relying party application, known as the client_id. This setting - * is required for enabling OpenID Connection authentication with Azure Active Directory or other 3rd party OpenID - * Connect providers. More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html. - * + * Get the clientId property: The Client ID of this relying party application, known as the client_id. + * This setting is required for enabling OpenID Connection authentication with Azure Active Directory or + * other 3rd party OpenID Connect providers. + * More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html. + * * @return the clientId value. */ public String clientId() { @@ -101,10 +110,11 @@ public String clientId() { } /** - * Set the clientId property: The Client ID of this relying party application, known as the client_id. This setting - * is required for enabling OpenID Connection authentication with Azure Active Directory or other 3rd party OpenID - * Connect providers. More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html. - * + * Set the clientId property: The Client ID of this relying party application, known as the client_id. + * This setting is required for enabling OpenID Connection authentication with Azure Active Directory or + * other 3rd party OpenID Connect providers. + * More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html. + * * @param clientId the clientId value to set. * @return the AzureActiveDirectoryRegistration object itself. */ @@ -116,7 +126,7 @@ public AzureActiveDirectoryRegistration withClientId(String clientId) { /** * Get the clientSecretSettingName property: The app setting name that contains the client secret of the relying * party application. - * + * * @return the clientSecretSettingName value. */ public String clientSecretSettingName() { @@ -126,7 +136,7 @@ public String clientSecretSettingName() { /** * Set the clientSecretSettingName property: The app setting name that contains the client secret of the relying * party application. - * + * * @param clientSecretSettingName the clientSecretSettingName value to set. * @return the AzureActiveDirectoryRegistration object itself. */ @@ -137,9 +147,9 @@ public AzureActiveDirectoryRegistration withClientSecretSettingName(String clien /** * Get the clientSecretCertificateThumbprint property: An alternative to the client secret, that is the thumbprint - * of a certificate used for signing purposes. This property acts as a replacement for the Client Secret. It is also - * optional. - * + * of a certificate used for signing purposes. This property acts as + * a replacement for the Client Secret. It is also optional. + * * @return the clientSecretCertificateThumbprint value. */ public String clientSecretCertificateThumbprint() { @@ -148,23 +158,23 @@ public String clientSecretCertificateThumbprint() { /** * Set the clientSecretCertificateThumbprint property: An alternative to the client secret, that is the thumbprint - * of a certificate used for signing purposes. This property acts as a replacement for the Client Secret. It is also - * optional. - * + * of a certificate used for signing purposes. This property acts as + * a replacement for the Client Secret. It is also optional. + * * @param clientSecretCertificateThumbprint the clientSecretCertificateThumbprint value to set. * @return the AzureActiveDirectoryRegistration object itself. */ - public AzureActiveDirectoryRegistration withClientSecretCertificateThumbprint( - String clientSecretCertificateThumbprint) { + public AzureActiveDirectoryRegistration + withClientSecretCertificateThumbprint(String clientSecretCertificateThumbprint) { this.clientSecretCertificateThumbprint = clientSecretCertificateThumbprint; return this; } /** * Get the clientSecretCertificateSubjectAlternativeName property: An alternative to the client secret thumbprint, - * that is the subject alternative name of a certificate used for signing purposes. This property acts as a - * replacement for the Client Secret Certificate Thumbprint. It is also optional. - * + * that is the subject alternative name of a certificate used for signing purposes. This property acts as + * a replacement for the Client Secret Certificate Thumbprint. It is also optional. + * * @return the clientSecretCertificateSubjectAlternativeName value. */ public String clientSecretCertificateSubjectAlternativeName() { @@ -173,24 +183,24 @@ public String clientSecretCertificateSubjectAlternativeName() { /** * Set the clientSecretCertificateSubjectAlternativeName property: An alternative to the client secret thumbprint, - * that is the subject alternative name of a certificate used for signing purposes. This property acts as a - * replacement for the Client Secret Certificate Thumbprint. It is also optional. - * + * that is the subject alternative name of a certificate used for signing purposes. This property acts as + * a replacement for the Client Secret Certificate Thumbprint. It is also optional. + * * @param clientSecretCertificateSubjectAlternativeName the clientSecretCertificateSubjectAlternativeName value to - * set. + * set. * @return the AzureActiveDirectoryRegistration object itself. */ - public AzureActiveDirectoryRegistration withClientSecretCertificateSubjectAlternativeName( - String clientSecretCertificateSubjectAlternativeName) { + public AzureActiveDirectoryRegistration + withClientSecretCertificateSubjectAlternativeName(String clientSecretCertificateSubjectAlternativeName) { this.clientSecretCertificateSubjectAlternativeName = clientSecretCertificateSubjectAlternativeName; return this; } /** * Get the clientSecretCertificateIssuer property: An alternative to the client secret thumbprint, that is the - * issuer of a certificate used for signing purposes. This property acts as a replacement for the Client Secret - * Certificate Thumbprint. It is also optional. - * + * issuer of a certificate used for signing purposes. This property acts as + * a replacement for the Client Secret Certificate Thumbprint. It is also optional. + * * @return the clientSecretCertificateIssuer value. */ public String clientSecretCertificateIssuer() { @@ -199,9 +209,9 @@ public String clientSecretCertificateIssuer() { /** * Set the clientSecretCertificateIssuer property: An alternative to the client secret thumbprint, that is the - * issuer of a certificate used for signing purposes. This property acts as a replacement for the Client Secret - * Certificate Thumbprint. It is also optional. - * + * issuer of a certificate used for signing purposes. This property acts as + * a replacement for the Client Secret Certificate Thumbprint. It is also optional. + * * @param clientSecretCertificateIssuer the clientSecretCertificateIssuer value to set. * @return the AzureActiveDirectoryRegistration object itself. */ @@ -212,7 +222,7 @@ public AzureActiveDirectoryRegistration withClientSecretCertificateIssuer(String /** * 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/AzureActiveDirectoryValidation.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryValidation.java index 8b67f4fdf715..173ceeab4e9c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryValidation.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureActiveDirectoryValidation.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The configuration settings of the Azure Active Directory token validation flow. */ +/** + * The configuration settings of the Azure Active Directory token validation flow. + */ @Fluent public final class AzureActiveDirectoryValidation { /* @@ -29,14 +31,16 @@ public final class AzureActiveDirectoryValidation { @JsonProperty(value = "defaultAuthorizationPolicy") private DefaultAuthorizationPolicy defaultAuthorizationPolicy; - /** Creates an instance of AzureActiveDirectoryValidation class. */ + /** + * Creates an instance of AzureActiveDirectoryValidation class. + */ public AzureActiveDirectoryValidation() { } /** * Get the jwtClaimChecks property: The configuration settings of the checks that should be made while validating * the JWT Claims. - * + * * @return the jwtClaimChecks value. */ public JwtClaimChecks jwtClaimChecks() { @@ -46,7 +50,7 @@ public JwtClaimChecks jwtClaimChecks() { /** * Set the jwtClaimChecks property: The configuration settings of the checks that should be made while validating * the JWT Claims. - * + * * @param jwtClaimChecks the jwtClaimChecks value to set. * @return the AzureActiveDirectoryValidation object itself. */ @@ -58,7 +62,7 @@ public AzureActiveDirectoryValidation withJwtClaimChecks(JwtClaimChecks jwtClaim /** * Get the allowedAudiences property: The list of audiences that can make successful authentication/authorization * requests. - * + * * @return the allowedAudiences value. */ public List allowedAudiences() { @@ -68,7 +72,7 @@ public List allowedAudiences() { /** * Set the allowedAudiences property: The list of audiences that can make successful authentication/authorization * requests. - * + * * @param allowedAudiences the allowedAudiences value to set. * @return the AzureActiveDirectoryValidation object itself. */ @@ -79,7 +83,7 @@ public AzureActiveDirectoryValidation withAllowedAudiences(List allowedA /** * Get the defaultAuthorizationPolicy property: The configuration settings of the default authorization policy. - * + * * @return the defaultAuthorizationPolicy value. */ public DefaultAuthorizationPolicy defaultAuthorizationPolicy() { @@ -88,19 +92,19 @@ public DefaultAuthorizationPolicy defaultAuthorizationPolicy() { /** * Set the defaultAuthorizationPolicy property: The configuration settings of the default authorization policy. - * + * * @param defaultAuthorizationPolicy the defaultAuthorizationPolicy value to set. * @return the AzureActiveDirectoryValidation object itself. */ - public AzureActiveDirectoryValidation withDefaultAuthorizationPolicy( - DefaultAuthorizationPolicy defaultAuthorizationPolicy) { + public AzureActiveDirectoryValidation + withDefaultAuthorizationPolicy(DefaultAuthorizationPolicy defaultAuthorizationPolicy) { this.defaultAuthorizationPolicy = defaultAuthorizationPolicy; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureCredentials.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureCredentials.java index b2c689859bc0..6e6c7219119e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureCredentials.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureCredentials.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Container App credentials. */ +/** + * Container App credentials. + */ @Fluent public final class AzureCredentials { /* @@ -40,13 +42,15 @@ public final class AzureCredentials { @JsonProperty(value = "subscriptionId") private String subscriptionId; - /** Creates an instance of AzureCredentials class. */ + /** + * Creates an instance of AzureCredentials class. + */ public AzureCredentials() { } /** * Get the clientId property: Client Id. - * + * * @return the clientId value. */ public String clientId() { @@ -55,7 +59,7 @@ public String clientId() { /** * Set the clientId property: Client Id. - * + * * @param clientId the clientId value to set. * @return the AzureCredentials object itself. */ @@ -66,7 +70,7 @@ public AzureCredentials withClientId(String clientId) { /** * Get the clientSecret property: Client Secret. - * + * * @return the clientSecret value. */ public String clientSecret() { @@ -75,7 +79,7 @@ public String clientSecret() { /** * Set the clientSecret property: Client Secret. - * + * * @param clientSecret the clientSecret value to set. * @return the AzureCredentials object itself. */ @@ -86,7 +90,7 @@ public AzureCredentials withClientSecret(String clientSecret) { /** * Get the tenantId property: Tenant Id. - * + * * @return the tenantId value. */ public String tenantId() { @@ -95,7 +99,7 @@ public String tenantId() { /** * Set the tenantId property: Tenant Id. - * + * * @param tenantId the tenantId value to set. * @return the AzureCredentials object itself. */ @@ -106,7 +110,7 @@ public AzureCredentials withTenantId(String tenantId) { /** * Get the kind property: Kind of auth github does for deploying the template. - * + * * @return the kind value. */ public String kind() { @@ -115,7 +119,7 @@ public String kind() { /** * Set the kind property: Kind of auth github does for deploying the template. - * + * * @param kind the kind value to set. * @return the AzureCredentials object itself. */ @@ -126,7 +130,7 @@ public AzureCredentials withKind(String kind) { /** * Get the subscriptionId property: Subscription Id. - * + * * @return the subscriptionId value. */ public String subscriptionId() { @@ -135,7 +139,7 @@ public String subscriptionId() { /** * Set the subscriptionId property: Subscription Id. - * + * * @param subscriptionId the subscriptionId value to set. * @return the AzureCredentials object itself. */ @@ -146,7 +150,7 @@ public AzureCredentials withSubscriptionId(String subscriptionId) { /** * 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/AzureFileProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureFileProperties.java index a5aa32a2dc53..5e5551a79238 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureFileProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureFileProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Azure File Properties. */ +/** + * Azure File Properties. + */ @Fluent public final class AzureFileProperties { /* @@ -34,13 +36,15 @@ public final class AzureFileProperties { @JsonProperty(value = "shareName") private String shareName; - /** Creates an instance of AzureFileProperties class. */ + /** + * Creates an instance of AzureFileProperties class. + */ public AzureFileProperties() { } /** * Get the accountName property: Storage account name for azure file. - * + * * @return the accountName value. */ public String accountName() { @@ -49,7 +53,7 @@ public String accountName() { /** * Set the accountName property: Storage account name for azure file. - * + * * @param accountName the accountName value to set. * @return the AzureFileProperties object itself. */ @@ -60,7 +64,7 @@ public AzureFileProperties withAccountName(String accountName) { /** * Get the accountKey property: Storage account key for azure file. - * + * * @return the accountKey value. */ public String accountKey() { @@ -69,7 +73,7 @@ public String accountKey() { /** * Set the accountKey property: Storage account key for azure file. - * + * * @param accountKey the accountKey value to set. * @return the AzureFileProperties object itself. */ @@ -80,7 +84,7 @@ public AzureFileProperties withAccountKey(String accountKey) { /** * Get the accessMode property: Access mode for storage. - * + * * @return the accessMode value. */ public AccessMode accessMode() { @@ -89,7 +93,7 @@ public AccessMode accessMode() { /** * Set the accessMode property: Access mode for storage. - * + * * @param accessMode the accessMode value to set. * @return the AzureFileProperties object itself. */ @@ -100,7 +104,7 @@ public AzureFileProperties withAccessMode(AccessMode accessMode) { /** * Get the shareName property: Azure file share name. - * + * * @return the shareName value. */ public String shareName() { @@ -109,7 +113,7 @@ public String shareName() { /** * Set the shareName property: Azure file share name. - * + * * @param shareName the shareName value to set. * @return the AzureFileProperties object itself. */ @@ -120,7 +124,7 @@ public AzureFileProperties withShareName(String shareName) { /** * 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/AzureStaticWebApps.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebApps.java index 8d4937e08dc4..42132f4fac68 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebApps.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebApps.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The configuration settings of the Azure Static Web Apps provider. */ +/** + * The configuration settings of the Azure Static Web Apps provider. + */ @Fluent public final class AzureStaticWebApps { /* @@ -23,14 +25,16 @@ public final class AzureStaticWebApps { @JsonProperty(value = "registration") private AzureStaticWebAppsRegistration registration; - /** Creates an instance of AzureStaticWebApps class. */ + /** + * Creates an instance of AzureStaticWebApps class. + */ public AzureStaticWebApps() { } /** * Get the enabled property: <code>false</code> if the Azure Static Web Apps provider should not be * enabled despite the set registration; otherwise, <code>true</code>. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -40,7 +44,7 @@ public Boolean enabled() { /** * Set the enabled property: <code>false</code> if the Azure Static Web Apps provider should not be * enabled despite the set registration; otherwise, <code>true</code>. - * + * * @param enabled the enabled value to set. * @return the AzureStaticWebApps object itself. */ @@ -51,7 +55,7 @@ public AzureStaticWebApps withEnabled(Boolean enabled) { /** * Get the registration property: The configuration settings of the Azure Static Web Apps registration. - * + * * @return the registration value. */ public AzureStaticWebAppsRegistration registration() { @@ -60,7 +64,7 @@ public AzureStaticWebAppsRegistration registration() { /** * Set the registration property: The configuration settings of the Azure Static Web Apps registration. - * + * * @param registration the registration value to set. * @return the AzureStaticWebApps object itself. */ @@ -71,7 +75,7 @@ public AzureStaticWebApps withRegistration(AzureStaticWebAppsRegistration regist /** * 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/AzureStaticWebAppsRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebAppsRegistration.java index cdb01ec16a07..1d8651ab2d1e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebAppsRegistration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebAppsRegistration.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The configuration settings of the registration for the Azure Static Web Apps provider. */ +/** + * The configuration settings of the registration for the Azure Static Web Apps provider. + */ @Fluent public final class AzureStaticWebAppsRegistration { /* @@ -16,13 +18,15 @@ public final class AzureStaticWebAppsRegistration { @JsonProperty(value = "clientId") private String clientId; - /** Creates an instance of AzureStaticWebAppsRegistration class. */ + /** + * Creates an instance of AzureStaticWebAppsRegistration class. + */ public AzureStaticWebAppsRegistration() { } /** * Get the clientId property: The Client ID of the app used for login. - * + * * @return the clientId value. */ public String clientId() { @@ -31,7 +35,7 @@ public String clientId() { /** * Set the clientId property: The Client ID of the app used for login. - * + * * @param clientId the clientId value to set. * @return the AzureStaticWebAppsRegistration object itself. */ @@ -42,7 +46,7 @@ public AzureStaticWebAppsRegistration withClientId(String clientId) { /** * 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/BaseContainer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java index d82e18e74af1..541432d9b2af 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Container App base container definition. */ +/** + * Container App base container definition. + */ @Fluent public class BaseContainer { /* @@ -53,13 +55,15 @@ public class BaseContainer { @JsonProperty(value = "volumeMounts") private List volumeMounts; - /** Creates an instance of BaseContainer class. */ + /** + * Creates an instance of BaseContainer class. + */ public BaseContainer() { } /** * Get the image property: Container image tag. - * + * * @return the image value. */ public String image() { @@ -68,7 +72,7 @@ public String image() { /** * Set the image property: Container image tag. - * + * * @param image the image value to set. * @return the BaseContainer object itself. */ @@ -79,7 +83,7 @@ public BaseContainer withImage(String image) { /** * Get the name property: Custom container name. - * + * * @return the name value. */ public String name() { @@ -88,7 +92,7 @@ public String name() { /** * Set the name property: Custom container name. - * + * * @param name the name value to set. * @return the BaseContainer object itself. */ @@ -99,7 +103,7 @@ public BaseContainer withName(String name) { /** * Get the command property: Container start command. - * + * * @return the command value. */ public List command() { @@ -108,7 +112,7 @@ public List command() { /** * Set the command property: Container start command. - * + * * @param command the command value to set. * @return the BaseContainer object itself. */ @@ -119,7 +123,7 @@ public BaseContainer withCommand(List command) { /** * Get the args property: Container start command arguments. - * + * * @return the args value. */ public List args() { @@ -128,7 +132,7 @@ public List args() { /** * Set the args property: Container start command arguments. - * + * * @param args the args value to set. * @return the BaseContainer object itself. */ @@ -139,7 +143,7 @@ public BaseContainer withArgs(List args) { /** * Get the env property: Container environment variables. - * + * * @return the env value. */ public List env() { @@ -148,7 +152,7 @@ public List env() { /** * Set the env property: Container environment variables. - * + * * @param env the env value to set. * @return the BaseContainer object itself. */ @@ -159,7 +163,7 @@ public BaseContainer withEnv(List env) { /** * Get the resources property: Container resource requirements. - * + * * @return the resources value. */ public ContainerResources resources() { @@ -168,7 +172,7 @@ public ContainerResources resources() { /** * Set the resources property: Container resource requirements. - * + * * @param resources the resources value to set. * @return the BaseContainer object itself. */ @@ -179,7 +183,7 @@ public BaseContainer withResources(ContainerResources resources) { /** * Get the volumeMounts property: Container volume mounts. - * + * * @return the volumeMounts value. */ public List volumeMounts() { @@ -188,7 +192,7 @@ public List volumeMounts() { /** * Set the volumeMounts property: Container volume mounts. - * + * * @param volumeMounts the volumeMounts value to set. * @return the BaseContainer object itself. */ @@ -199,7 +203,7 @@ public BaseContainer withVolumeMounts(List volumeMounts) { /** * 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/BillingMeter.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeter.java index 6e78ff421016..21e8e061d4b8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeter.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeter.java @@ -6,9 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.fasterxml.jackson.annotation.JsonProperty; -/** Billing meter. */ +/** + * Billing meter. + */ @Fluent public final class BillingMeter extends ProxyResource { /* @@ -23,13 +26,21 @@ public final class BillingMeter extends ProxyResource { @JsonProperty(value = "properties") private BillingMeterProperties properties; - /** Creates an instance of BillingMeter class. */ + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Creates an instance of BillingMeter class. + */ public BillingMeter() { } /** * Get the location property: Region for the billing meter. - * + * * @return the location value. */ public String location() { @@ -38,7 +49,7 @@ public String location() { /** * Set the location property: Region for the billing meter. - * + * * @param location the location value to set. * @return the BillingMeter object itself. */ @@ -49,7 +60,7 @@ public BillingMeter withLocation(String location) { /** * Get the properties property: Revision resource specific properties. - * + * * @return the properties value. */ public BillingMeterProperties properties() { @@ -58,7 +69,7 @@ public BillingMeterProperties properties() { /** * Set the properties property: Revision resource specific properties. - * + * * @param properties the properties value to set. * @return the BillingMeter object itself. */ @@ -67,9 +78,18 @@ public BillingMeter withProperties(BillingMeterProperties properties) { return this; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * 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/BillingMeterCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterCollection.java index 167deef302ed..7a5c5cf99169 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterCollection.java @@ -7,18 +7,20 @@ import com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner; import java.util.List; -/** An immutable client-side representation of BillingMeterCollection. */ +/** + * An immutable client-side representation of BillingMeterCollection. + */ public interface BillingMeterCollection { /** * Gets the value property: Collection of billing meters. - * + * * @return the value value. */ List value(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner object. - * + * * @return the inner object. */ BillingMeterCollectionInner innerModel(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterProperties.java index 00e2c5d0fed5..e8ab0e0c1fcc 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Revision resource specific properties. */ +/** + * Revision resource specific properties. + */ @Fluent public final class BillingMeterProperties { /* @@ -28,13 +30,15 @@ public final class BillingMeterProperties { @JsonProperty(value = "displayName") private String displayName; - /** Creates an instance of BillingMeterProperties class. */ + /** + * Creates an instance of BillingMeterProperties class. + */ public BillingMeterProperties() { } /** * Get the category property: Used to categorize billing meters. - * + * * @return the category value. */ public String category() { @@ -43,7 +47,7 @@ public String category() { /** * Set the category property: Used to categorize billing meters. - * + * * @param category the category value to set. * @return the BillingMeterProperties object itself. */ @@ -54,7 +58,7 @@ public BillingMeterProperties withCategory(String category) { /** * Get the meterType property: Billing meter type. - * + * * @return the meterType value. */ public String meterType() { @@ -63,7 +67,7 @@ public String meterType() { /** * Set the meterType property: Billing meter type. - * + * * @param meterType the meterType value to set. * @return the BillingMeterProperties object itself. */ @@ -74,7 +78,7 @@ public BillingMeterProperties withMeterType(String meterType) { /** * Get the displayName property: The everyday name of the billing meter. - * + * * @return the displayName value. */ public String displayName() { @@ -83,7 +87,7 @@ public String displayName() { /** * Set the displayName property: The everyday name of the billing meter. - * + * * @param displayName the displayName value to set. * @return the BillingMeterProperties object itself. */ @@ -94,7 +98,7 @@ public BillingMeterProperties withDisplayName(String displayName) { /** * 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/BillingMeters.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeters.java index c67c45e0e69d..a993eeac3855 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeters.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeters.java @@ -7,18 +7,20 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of BillingMeters. */ +/** + * Resource collection API of BillingMeters. + */ public interface BillingMeters { /** * Get billing meters by location. - * - *

Get all billingMeters for a location. - * + * + * Get all billingMeters for a location. + * * @param location The name of Azure region. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all billingMeters for a location along with {@link Response}. */ @@ -26,13 +28,13 @@ public interface BillingMeters { /** * Get billing meters by location. - * - *

Get all billingMeters for a location. - * + * + * Get all billingMeters for a location. + * * @param location The name of Azure region. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all billingMeters for a location. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BindingType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BindingType.java index 8e207dccbd68..6683cd637112 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BindingType.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BindingType.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Custom Domain binding type. */ +/** + * Custom Domain binding type. + */ public final class BindingType extends ExpandableStringEnum { - /** Static value Disabled for BindingType. */ + /** + * Static value Disabled for BindingType. + */ public static final BindingType DISABLED = fromString("Disabled"); - /** Static value SniEnabled for BindingType. */ + /** + * Static value SniEnabled for BindingType. + */ public static final BindingType SNI_ENABLED = fromString("SniEnabled"); /** * Creates a new instance of BindingType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public BindingType() { /** * Creates or finds a BindingType from its string representation. - * + * * @param name a name to look for. * @return the corresponding BindingType. */ @@ -38,7 +44,7 @@ public static BindingType fromString(String name) { /** * Gets known BindingType values. - * + * * @return known BindingType values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BlobStorageTokenStore.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BlobStorageTokenStore.java new file mode 100644 index 000000000000..ff9b6b4d46bc --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BlobStorageTokenStore.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The configuration settings of the storage of the tokens if blob storage is used. + */ +@Fluent +public final class BlobStorageTokenStore { + /* + * The name of the app secrets containing the SAS URL of the blob storage containing the tokens. + */ + @JsonProperty(value = "sasUrlSettingName", required = true) + private String sasUrlSettingName; + + /** + * Creates an instance of BlobStorageTokenStore class. + */ + public BlobStorageTokenStore() { + } + + /** + * Get the sasUrlSettingName property: The name of the app secrets containing the SAS URL of the blob storage + * containing the tokens. + * + * @return the sasUrlSettingName value. + */ + public String sasUrlSettingName() { + return this.sasUrlSettingName; + } + + /** + * Set the sasUrlSettingName property: The name of the app secrets containing the SAS URL of the blob storage + * containing the tokens. + * + * @param sasUrlSettingName the sasUrlSettingName value to set. + * @return the BlobStorageTokenStore object itself. + */ + public BlobStorageTokenStore withSasUrlSettingName(String sasUrlSettingName) { + this.sasUrlSettingName = sasUrlSettingName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (sasUrlSettingName() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property sasUrlSettingName in model BlobStorageTokenStore")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(BlobStorageTokenStore.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildAuthTokens.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildAuthTokens.java new file mode 100644 index 000000000000..ac5dd37d1d4b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildAuthTokens.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of BuildAuthTokens. + */ +public interface BuildAuthTokens { + /** + * Gets the token used to connect to the endpoint where source code can be uploaded for a build. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the token used to connect to the endpoint where source code can be uploaded for a build along with + * {@link Response}. + */ + Response listWithResponse(String resourceGroupName, String builderName, String buildName, + Context context); + + /** + * Gets the token used to connect to the endpoint where source code can be uploaded for a build. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the token used to connect to the endpoint where source code can be uploaded for a build. + */ + BuildToken list(String resourceGroupName, String builderName, String buildName); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildCollection.java new file mode 100644 index 000000000000..bb7e4f45c623 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildCollection.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a BuildResource list operation. + */ +@Fluent +public final class BuildCollection { + /* + * The BuildResource items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of BuildCollection class. + */ + public BuildCollection() { + } + + /** + * Get the value property: The BuildResource items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The BuildResource items on this page. + * + * @param value the value value to set. + * @return the BuildCollection object itself. + */ + public BuildCollection withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the BuildCollection object itself. + */ + public BuildCollection withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model BuildCollection")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(BuildCollection.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildConfiguration.java new file mode 100644 index 000000000000..20aa5a04a517 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildConfiguration.java @@ -0,0 +1,167 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Configuration of the build. + */ +@Fluent +public final class BuildConfiguration { + /* + * Base OS used to build and run the app. + */ + @JsonProperty(value = "baseOs") + private String baseOs; + + /* + * Platform to be used to build and run the app. + */ + @JsonProperty(value = "platform") + private String platform; + + /* + * Platform version to be used to build and run the app. + */ + @JsonProperty(value = "platformVersion") + private String platformVersion; + + /* + * List of environment variables to be passed to the build, secrets should not be used in environment variable. + */ + @JsonProperty(value = "environmentVariables") + private List environmentVariables; + + /* + * List of steps to perform before the build. + */ + @JsonProperty(value = "preBuildSteps") + private List preBuildSteps; + + /** + * Creates an instance of BuildConfiguration class. + */ + public BuildConfiguration() { + } + + /** + * Get the baseOs property: Base OS used to build and run the app. + * + * @return the baseOs value. + */ + public String baseOs() { + return this.baseOs; + } + + /** + * Set the baseOs property: Base OS used to build and run the app. + * + * @param baseOs the baseOs value to set. + * @return the BuildConfiguration object itself. + */ + public BuildConfiguration withBaseOs(String baseOs) { + this.baseOs = baseOs; + return this; + } + + /** + * Get the platform property: Platform to be used to build and run the app. + * + * @return the platform value. + */ + public String platform() { + return this.platform; + } + + /** + * Set the platform property: Platform to be used to build and run the app. + * + * @param platform the platform value to set. + * @return the BuildConfiguration object itself. + */ + public BuildConfiguration withPlatform(String platform) { + this.platform = platform; + return this; + } + + /** + * Get the platformVersion property: Platform version to be used to build and run the app. + * + * @return the platformVersion value. + */ + public String platformVersion() { + return this.platformVersion; + } + + /** + * Set the platformVersion property: Platform version to be used to build and run the app. + * + * @param platformVersion the platformVersion value to set. + * @return the BuildConfiguration object itself. + */ + public BuildConfiguration withPlatformVersion(String platformVersion) { + this.platformVersion = platformVersion; + return this; + } + + /** + * Get the environmentVariables property: List of environment variables to be passed to the build, secrets should + * not be used in environment variable. + * + * @return the environmentVariables value. + */ + public List environmentVariables() { + return this.environmentVariables; + } + + /** + * Set the environmentVariables property: List of environment variables to be passed to the build, secrets should + * not be used in environment variable. + * + * @param environmentVariables the environmentVariables value to set. + * @return the BuildConfiguration object itself. + */ + public BuildConfiguration withEnvironmentVariables(List environmentVariables) { + this.environmentVariables = environmentVariables; + return this; + } + + /** + * Get the preBuildSteps property: List of steps to perform before the build. + * + * @return the preBuildSteps value. + */ + public List preBuildSteps() { + return this.preBuildSteps; + } + + /** + * Set the preBuildSteps property: List of steps to perform before the build. + * + * @param preBuildSteps the preBuildSteps value to set. + * @return the BuildConfiguration object itself. + */ + public BuildConfiguration withPreBuildSteps(List preBuildSteps) { + this.preBuildSteps = preBuildSteps; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (environmentVariables() != null) { + environmentVariables().forEach(e -> e.validate()); + } + if (preBuildSteps() != null) { + preBuildSteps().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildProvisioningState.java new file mode 100644 index 000000000000..64fbc890e676 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildProvisioningState.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Resource instance provisioning state. + */ +public final class BuildProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for BuildProvisioningState. + */ + public static final BuildProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for BuildProvisioningState. + */ + public static final BuildProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for BuildProvisioningState. + */ + public static final BuildProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Creating for BuildProvisioningState. + */ + public static final BuildProvisioningState CREATING = fromString("Creating"); + + /** + * Static value Updating for BuildProvisioningState. + */ + public static final BuildProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Deleting for BuildProvisioningState. + */ + public static final BuildProvisioningState DELETING = fromString("Deleting"); + + /** + * Creates a new instance of BuildProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BuildProvisioningState() { + } + + /** + * Creates or finds a BuildProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding BuildProvisioningState. + */ + @JsonCreator + public static BuildProvisioningState fromString(String name) { + return fromString(name, BuildProvisioningState.class); + } + + /** + * Gets known BuildProvisioningState values. + * + * @return known BuildProvisioningState values. + */ + public static Collection values() { + return values(BuildProvisioningState.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildResource.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildResource.java new file mode 100644 index 000000000000..2917c702fa3f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildResource.java @@ -0,0 +1,261 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner; + +/** + * An immutable client-side representation of BuildResource. + */ +public interface BuildResource { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: Build provisioning state. + * + * @return the provisioningState value. + */ + BuildProvisioningState provisioningState(); + + /** + * Gets the buildStatus property: Status of the build once it has been provisioned. + * + * @return the buildStatus value. + */ + BuildStatus buildStatus(); + + /** + * Gets the destinationContainerRegistry property: Container registry that the final image will be uploaded to. + * + * @return the destinationContainerRegistry value. + */ + ContainerRegistryWithCustomImage destinationContainerRegistry(); + + /** + * Gets the configuration property: Configuration of the build. + * + * @return the configuration value. + */ + BuildConfiguration configuration(); + + /** + * Gets the uploadEndpoint property: Endpoint to which the source code should be uploaded. + * + * @return the uploadEndpoint value. + */ + String uploadEndpoint(); + + /** + * Gets the logStreamEndpoint property: Endpoint from which the build logs can be streamed. + * + * @return the logStreamEndpoint value. + */ + String logStreamEndpoint(); + + /** + * Gets the tokenEndpoint property: Endpoint to use to retrieve an authentication token for log streaming and + * uploading source code. + * + * @return the tokenEndpoint value. + */ + String tokenEndpoint(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner object. + * + * @return the inner object. + */ + BuildResourceInner innerModel(); + + /** + * The entirety of the BuildResource definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The BuildResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the BuildResource definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the BuildResource definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, builderName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @return the next definition stage. + */ + WithCreate withExistingBuilder(String resourceGroupName, String builderName); + } + + /** + * The stage of the BuildResource definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate + extends DefinitionStages.WithDestinationContainerRegistry, DefinitionStages.WithConfiguration { + /** + * Executes the create request. + * + * @return the created resource. + */ + BuildResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + BuildResource create(Context context); + } + + /** + * The stage of the BuildResource definition allowing to specify destinationContainerRegistry. + */ + interface WithDestinationContainerRegistry { + /** + * Specifies the destinationContainerRegistry property: Container registry that the final image will be + * uploaded to.. + * + * @param destinationContainerRegistry Container registry that the final image will be uploaded to. + * @return the next definition stage. + */ + WithCreate withDestinationContainerRegistry(ContainerRegistryWithCustomImage destinationContainerRegistry); + } + + /** + * The stage of the BuildResource definition allowing to specify configuration. + */ + interface WithConfiguration { + /** + * Specifies the configuration property: Configuration of the build.. + * + * @param configuration Configuration of the build. + * @return the next definition stage. + */ + WithCreate withConfiguration(BuildConfiguration configuration); + } + } + + /** + * Begins update for the BuildResource resource. + * + * @return the stage of resource update. + */ + BuildResource.Update update(); + + /** + * The template for BuildResource update. + */ + interface Update extends UpdateStages.WithDestinationContainerRegistry, UpdateStages.WithConfiguration { + /** + * Executes the update request. + * + * @return the updated resource. + */ + BuildResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + BuildResource apply(Context context); + } + + /** + * The BuildResource update stages. + */ + interface UpdateStages { + /** + * The stage of the BuildResource update allowing to specify destinationContainerRegistry. + */ + interface WithDestinationContainerRegistry { + /** + * Specifies the destinationContainerRegistry property: Container registry that the final image will be + * uploaded to.. + * + * @param destinationContainerRegistry Container registry that the final image will be uploaded to. + * @return the next definition stage. + */ + Update withDestinationContainerRegistry(ContainerRegistryWithCustomImage destinationContainerRegistry); + } + + /** + * The stage of the BuildResource update allowing to specify configuration. + */ + interface WithConfiguration { + /** + * Specifies the configuration property: Configuration of the build.. + * + * @param configuration Configuration of the build. + * @return the next definition stage. + */ + Update withConfiguration(BuildConfiguration configuration); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + BuildResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + BuildResource refresh(Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildStatus.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildStatus.java new file mode 100644 index 000000000000..77c849cce275 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildStatus.java @@ -0,0 +1,68 @@ +// Copyright (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; + +/** + * Status of the build once it has been provisioned. + */ +public final class BuildStatus extends ExpandableStringEnum { + /** + * Static value NotStarted for BuildStatus. + */ + public static final BuildStatus NOT_STARTED = fromString("NotStarted"); + + /** + * Static value InProgress for BuildStatus. + */ + public static final BuildStatus IN_PROGRESS = fromString("InProgress"); + + /** + * Static value Succeeded for BuildStatus. + */ + public static final BuildStatus SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Canceled for BuildStatus. + */ + public static final BuildStatus CANCELED = fromString("Canceled"); + + /** + * Static value Failed for BuildStatus. + */ + public static final BuildStatus FAILED = fromString("Failed"); + + /** + * Creates a new instance of BuildStatus value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BuildStatus() { + } + + /** + * Creates or finds a BuildStatus from its string representation. + * + * @param name a name to look for. + * @return the corresponding BuildStatus. + */ + @JsonCreator + public static BuildStatus fromString(String name) { + return fromString(name, BuildStatus.class); + } + + /** + * Gets known BuildStatus values. + * + * @return known BuildStatus values. + */ + public static Collection values() { + return values(BuildStatus.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildToken.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildToken.java new file mode 100644 index 000000000000..31786178e9d9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildToken.java @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.resourcemanager.appcontainers.fluent.models.BuildTokenInner; +import java.time.OffsetDateTime; + +/** + * An immutable client-side representation of BuildToken. + */ +public interface BuildToken { + /** + * Gets the token property: Authentication token. + * + * @return the token value. + */ + String token(); + + /** + * Gets the expires property: Token expiration date. + * + * @return the expires value. + */ + OffsetDateTime expires(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.BuildTokenInner object. + * + * @return the inner object. + */ + BuildTokenInner innerModel(); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderCollection.java new file mode 100644 index 000000000000..f82e7ac7e8b6 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderCollection.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The response of a BuilderResource list operation. + */ +@Fluent +public final class BuilderCollection { + /* + * The BuilderResource items on this page + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * The link to the next page of items + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of BuilderCollection class. + */ + public BuilderCollection() { + } + + /** + * Get the value property: The BuilderResource items on this page. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The BuilderResource items on this page. + * + * @param value the value value to set. + * @return the BuilderCollection object itself. + */ + public BuilderCollection withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The link to the next page of items. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The link to the next page of items. + * + * @param nextLink the nextLink value to set. + * @return the BuilderCollection object itself. + */ + public BuilderCollection withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model BuilderCollection")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(BuilderCollection.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderProvisioningState.java new file mode 100644 index 000000000000..2a8293b79a56 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderProvisioningState.java @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Resource instance provisioning state. + */ +public final class BuilderProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for BuilderProvisioningState. + */ + public static final BuilderProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for BuilderProvisioningState. + */ + public static final BuilderProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for BuilderProvisioningState. + */ + public static final BuilderProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Creating for BuilderProvisioningState. + */ + public static final BuilderProvisioningState CREATING = fromString("Creating"); + + /** + * Static value Updating for BuilderProvisioningState. + */ + public static final BuilderProvisioningState UPDATING = fromString("Updating"); + + /** + * Static value Deleting for BuilderProvisioningState. + */ + public static final BuilderProvisioningState DELETING = fromString("Deleting"); + + /** + * Creates a new instance of BuilderProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public BuilderProvisioningState() { + } + + /** + * Creates or finds a BuilderProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding BuilderProvisioningState. + */ + @JsonCreator + public static BuilderProvisioningState fromString(String name) { + return fromString(name, BuilderProvisioningState.class); + } + + /** + * Gets known BuilderProvisioningState values. + * + * @return known BuilderProvisioningState values. + */ + public static Collection values() { + return values(BuilderProvisioningState.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResource.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResource.java new file mode 100644 index 000000000000..1d81dcc8f511 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResource.java @@ -0,0 +1,333 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.management.Region; +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of BuilderResource. + */ +public interface BuilderResource { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the provisioningState property: Provisioning state of a builder resource. + * + * @return the provisioningState value. + */ + BuilderProvisioningState provisioningState(); + + /** + * Gets the environmentId property: Resource ID of the container apps environment that the builder is associated + * with. + * + * @return the environmentId value. + */ + String environmentId(); + + /** + * Gets the containerRegistries property: List of mappings of container registries and the managed identity used to + * connect to it. + * + * @return the containerRegistries value. + */ + List containerRegistries(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner object. + * + * @return the inner object. + */ + BuilderResourceInner innerModel(); + + /** + * The entirety of the BuilderResource definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { + } + + /** + * The BuilderResource definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the BuilderResource definition. + */ + interface Blank extends WithLocation { + } + + /** + * The stage of the BuilderResource definition allowing to specify location. + */ + interface WithLocation { + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(Region location); + + /** + * Specifies the region for the resource. + * + * @param location The geo-location where the resource lives. + * @return the next definition stage. + */ + WithResourceGroup withRegion(String location); + } + + /** + * The stage of the BuilderResource definition allowing to specify parent resource. + */ + interface WithResourceGroup { + /** + * Specifies resourceGroupName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @return the next definition stage. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + + /** + * The stage of the BuilderResource definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithIdentity, + DefinitionStages.WithEnvironmentId, DefinitionStages.WithContainerRegistries { + /** + * Executes the create request. + * + * @return the created resource. + */ + BuilderResource create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + BuilderResource create(Context context); + } + + /** + * The stage of the BuilderResource definition allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + WithCreate withTags(Map tags); + } + + /** + * The stage of the BuilderResource definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the BuilderResource definition allowing to specify environmentId. + */ + interface WithEnvironmentId { + /** + * Specifies the environmentId property: Resource ID of the container apps environment that the builder is + * associated with.. + * + * @param environmentId Resource ID of the container apps environment that the builder is associated with. + * @return the next definition stage. + */ + WithCreate withEnvironmentId(String environmentId); + } + + /** + * The stage of the BuilderResource definition allowing to specify containerRegistries. + */ + interface WithContainerRegistries { + /** + * Specifies the containerRegistries property: List of mappings of container registries and the managed + * identity used to connect to it.. + * + * @param containerRegistries List of mappings of container registries and the managed identity used to + * connect to it. + * @return the next definition stage. + */ + WithCreate withContainerRegistries(List containerRegistries); + } + } + + /** + * Begins update for the BuilderResource resource. + * + * @return the stage of resource update. + */ + BuilderResource.Update update(); + + /** + * The template for BuilderResource update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithEnvironmentId { + /** + * Executes the update request. + * + * @return the updated resource. + */ + BuilderResource apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + BuilderResource apply(Context context); + } + + /** + * The BuilderResource update stages. + */ + interface UpdateStages { + /** + * The stage of the BuilderResource update allowing to specify tags. + */ + interface WithTags { + /** + * Specifies the tags property: Resource tags.. + * + * @param tags Resource tags. + * @return the next definition stage. + */ + Update withTags(Map tags); + } + + /** + * The stage of the BuilderResource update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: The managed service identities assigned to this resource.. + * + * @param identity The managed service identities assigned to this resource. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the BuilderResource update allowing to specify environmentId. + */ + interface WithEnvironmentId { + /** + * Specifies the environmentId property: Resource ID of the container apps environment that the builder is + * associated with.. + * + * @param environmentId Resource ID of the container apps environment that the builder is associated with. + * @return the next definition stage. + */ + Update withEnvironmentId(String environmentId); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + BuilderResource refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + BuilderResource refresh(Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResourceUpdate.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResourceUpdate.java new file mode 100644 index 000000000000..32c3b8c07a3e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuilderResourceUpdate.java @@ -0,0 +1,130 @@ +// Copyright (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.resourcemanager.appcontainers.fluent.models.BuilderResourceUpdateProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** + * The type used for update operations of the BuilderResource. + */ +@Fluent +public final class BuilderResourceUpdate { + /* + * The managed service identities assigned to this resource. + */ + @JsonProperty(value = "identity") + private ManagedServiceIdentity identity; + + /* + * Resource tags. + */ + @JsonProperty(value = "tags") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map tags; + + /* + * The updatable properties of the BuilderResource. + */ + @JsonProperty(value = "properties") + private BuilderResourceUpdateProperties innerProperties; + + /** + * Creates an instance of BuilderResourceUpdate class. + */ + public BuilderResourceUpdate() { + } + + /** + * Get the identity property: The managed service identities assigned to this resource. + * + * @return the identity value. + */ + public ManagedServiceIdentity identity() { + return this.identity; + } + + /** + * Set the identity property: The managed service identities assigned to this resource. + * + * @param identity the identity value to set. + * @return the BuilderResourceUpdate object itself. + */ + public BuilderResourceUpdate withIdentity(ManagedServiceIdentity identity) { + this.identity = identity; + return this; + } + + /** + * Get the tags property: Resource tags. + * + * @return the tags value. + */ + public Map tags() { + return this.tags; + } + + /** + * Set the tags property: Resource tags. + * + * @param tags the tags value to set. + * @return the BuilderResourceUpdate object itself. + */ + public BuilderResourceUpdate withTags(Map tags) { + this.tags = tags; + return this; + } + + /** + * Get the innerProperties property: The updatable properties of the BuilderResource. + * + * @return the innerProperties value. + */ + private BuilderResourceUpdateProperties innerProperties() { + return this.innerProperties; + } + + /** + * Get the environmentId property: Resource ID of the container apps environment that the builder is associated + * with. + * + * @return the environmentId value. + */ + public String environmentId() { + return this.innerProperties() == null ? null : this.innerProperties().environmentId(); + } + + /** + * Set the environmentId property: Resource ID of the container apps environment that the builder is associated + * with. + * + * @param environmentId the environmentId value to set. + * @return the BuilderResourceUpdate object itself. + */ + public BuilderResourceUpdate withEnvironmentId(String environmentId) { + if (this.innerProperties() == null) { + this.innerProperties = new BuilderResourceUpdateProperties(); + } + this.innerProperties().withEnvironmentId(environmentId); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (identity() != null) { + identity().validate(); + } + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builders.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builders.java new file mode 100644 index 000000000000..d91007741556 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builders.java @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Builders. + */ +public interface Builders { + /** + * List BuilderResource resources by subscription ID. + * + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(); + + /** + * List BuilderResource resources by subscription ID. + * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(Context context); + + /** + * List BuilderResource resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * List BuilderResource resources by resource group. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuilderResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, Context context); + + /** + * Get a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuilderResource along with {@link Response}. + */ + Response getByResourceGroupWithResponse(String resourceGroupName, String builderName, + Context context); + + /** + * Get a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuilderResource. + */ + BuilderResource getByResourceGroup(String resourceGroupName, String builderName); + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByResourceGroup(String resourceGroupName, String builderName); + + /** + * Delete a BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String builderName, Context context); + + /** + * Get a BuilderResource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuilderResource along with {@link Response}. + */ + BuilderResource getById(String id); + + /** + * Get a BuilderResource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuilderResource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a BuilderResource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a BuilderResource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new BuilderResource resource. + * + * @param name resource name. + * @return the first stage of the new BuilderResource definition. + */ + BuilderResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builds.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builds.java new file mode 100644 index 000000000000..e00e51a76b57 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Builds.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of Builds. + */ +public interface Builds { + /** + * Get a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuildResource along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String builderName, String buildName, + Context context); + + /** + * Get a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuildResource. + */ + BuildResource get(String resourceGroupName, String builderName, String buildName); + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String builderName, String buildName); + + /** + * Delete a BuildResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param buildName The name of a build. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String builderName, String buildName, Context context); + + /** + * Get a BuildResource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuildResource along with {@link Response}. + */ + BuildResource getById(String id); + + /** + * Get a BuildResource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a BuildResource along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a BuildResource. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a BuildResource. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new BuildResource resource. + * + * @param name resource name. + * @return the first stage of the new BuildResource definition. + */ + BuildResource.DefinitionStages.Blank define(String name); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildsByBuilderResources.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildsByBuilderResources.java new file mode 100644 index 000000000000..f0ff7e81d704 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BuildsByBuilderResources.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of BuildsByBuilderResources. + */ +public interface BuildsByBuilderResources { + /** + * List BuildResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuildResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String builderName); + + /** + * List BuildResource resources by BuilderResource. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param builderName The name of the builder. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response of a BuildResource list operation as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String builderName, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificate.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificate.java index e25331db625d..1407efe1b244 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 @@ -10,104 +10,111 @@ import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; import java.util.Map; -/** An immutable client-side representation of Certificate. */ +/** + * An immutable client-side representation of Certificate. + */ public interface Certificate { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); /** * Gets the properties property: Certificate resource specific properties. - * + * * @return the properties value. */ CertificateProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner object. - * + * * @return the inner object. */ CertificateInner innerModel(); - /** The entirety of the Certificate definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithCreate { + /** + * The entirety of the Certificate definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The Certificate definition stages. */ + /** + * The Certificate definition stages. + */ interface DefinitionStages { - /** The first stage of the Certificate definition. */ + /** + * The first stage of the Certificate definition. + */ interface Blank extends WithLocation { } - /** The stage of the Certificate definition allowing to specify location. */ + /** + * The stage of the Certificate definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -115,18 +122,20 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithParentResource withRegion(String location); } - /** The stage of the Certificate definition allowing to specify parent resource. */ + /** + * The stage of the Certificate definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, connectedEnvironmentName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Connected Environment. * @return the next definition stage. @@ -141,36 +150,40 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ Certificate create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Certificate create(Context context); } - /** The stage of the Certificate definition allowing to specify tags. */ + /** + * The stage of the Certificate definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the Certificate definition allowing to specify properties. */ + /** + * The stage of the Certificate definition allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: Certificate resource specific properties. - * + * * @param properties Certificate resource specific properties. * @return the next definition stage. */ @@ -180,36 +193,42 @@ interface WithProperties { /** * Begins update for the Certificate resource. - * + * * @return the stage of resource update. */ Certificate.Update update(); - /** The template for Certificate update. */ + /** + * The template for Certificate update. + */ interface Update extends UpdateStages.WithTags { /** * Executes the update request. - * + * * @return the updated resource. */ Certificate apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Certificate apply(Context context); } - /** The Certificate update stages. */ + /** + * The Certificate update stages. + */ interface UpdateStages { - /** The stage of the Certificate update allowing to specify tags. */ + /** + * The stage of the Certificate update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Application-specific metadata in the form of key-value pairs.. - * + * * @param tags Application-specific metadata in the form of key-value pairs. * @return the next definition stage. */ @@ -219,14 +238,14 @@ interface WithTags { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Certificate refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateCollection.java index b2d35859d852..4b2427f101cc 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateCollection.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Collection of Certificates. */ +/** + * Collection of Certificates. + */ @Fluent public final class CertificateCollection { /* @@ -25,13 +27,15 @@ public final class CertificateCollection { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of CertificateCollection class. */ + /** + * Creates an instance of CertificateCollection class. + */ public CertificateCollection() { } /** * Get the value property: Collection of resources. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: Collection of resources. - * + * * @param value the value value to set. * @return the CertificateCollection object itself. */ @@ -51,7 +55,7 @@ public CertificateCollection withValue(List value) { /** * Get the nextLink property: Link to next page of resources. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,14 +64,13 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model CertificateCollection")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model CertificateCollection")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateKeyVaultProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateKeyVaultProperties.java new file mode 100644 index 000000000000..77c3a421c24d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateKeyVaultProperties.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Properties for a certificate stored in a Key Vault. + */ +@Fluent +public final class CertificateKeyVaultProperties { + /* + * Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a system-assigned + * identity. + */ + @JsonProperty(value = "identity") + private String identity; + + /* + * URL pointing to the Azure Key Vault secret that holds the certificate. + */ + @JsonProperty(value = "keyVaultUrl") + private String keyVaultUrl; + + /** + * Creates an instance of CertificateKeyVaultProperties class. + */ + public CertificateKeyVaultProperties() { + } + + /** + * Get the identity property: Resource ID of a managed identity to authenticate with Azure Key Vault, or System to + * use a system-assigned identity. + * + * @return the identity value. + */ + public String identity() { + return this.identity; + } + + /** + * Set the identity property: Resource ID of a managed identity to authenticate with Azure Key Vault, or System to + * use a system-assigned identity. + * + * @param identity the identity value to set. + * @return the CertificateKeyVaultProperties object itself. + */ + public CertificateKeyVaultProperties withIdentity(String identity) { + this.identity = identity; + return this; + } + + /** + * Get the keyVaultUrl property: URL pointing to the Azure Key Vault secret that holds the certificate. + * + * @return the keyVaultUrl value. + */ + public String keyVaultUrl() { + return this.keyVaultUrl; + } + + /** + * Set the keyVaultUrl property: URL pointing to the Azure Key Vault secret that holds the certificate. + * + * @param keyVaultUrl the keyVaultUrl value to set. + * @return the CertificateKeyVaultProperties object itself. + */ + public CertificateKeyVaultProperties withKeyVaultUrl(String keyVaultUrl) { + this.keyVaultUrl = keyVaultUrl; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificatePatch.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificatePatch.java index f567a5f4f7d8..d1be80c2c81d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificatePatch.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificatePatch.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** A certificate to update. */ +/** + * A certificate to update. + */ @Fluent public final class CertificatePatch { /* @@ -19,13 +21,15 @@ public final class CertificatePatch { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of CertificatePatch class. */ + /** + * Creates an instance of CertificatePatch class. + */ public CertificatePatch() { } /** * Get the tags property: Application-specific metadata in the form of key-value pairs. - * + * * @return the tags value. */ public Map tags() { @@ -34,7 +38,7 @@ public Map tags() { /** * Set the tags property: Application-specific metadata in the form of key-value pairs. - * + * * @param tags the tags value to set. * @return the CertificatePatch object itself. */ @@ -45,7 +49,7 @@ public CertificatePatch withTags(Map tags) { /** * 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/CertificateProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java index efc126b11fcb..ef82a7bb28b5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProperties.java @@ -10,7 +10,9 @@ import java.time.OffsetDateTime; import java.util.List; -/** Certificate resource specific properties. */ +/** + * Certificate resource specific properties. + */ @Fluent public final class CertificateProperties { /* @@ -19,6 +21,12 @@ public final class CertificateProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private CertificateProvisioningState provisioningState; + /* + * Properties for a certificate stored in a Key Vault. + */ + @JsonProperty(value = "certificateKeyVaultProperties") + private CertificateKeyVaultProperties certificateKeyVaultProperties; + /* * Certificate password. */ @@ -79,22 +87,51 @@ public final class CertificateProperties { @JsonProperty(value = "publicKeyHash", access = JsonProperty.Access.WRITE_ONLY) private String publicKeyHash; - /** Creates an instance of CertificateProperties class. */ + /* + * The type of the certificate. Allowed values are `ServerSSLCertificate` and `ImagePullTrustedCA` + */ + @JsonProperty(value = "certificateType") + private CertificateType certificateType; + + /** + * Creates an instance of CertificateProperties class. + */ public CertificateProperties() { } /** * Get the provisioningState property: Provisioning state of the certificate. - * + * * @return the provisioningState value. */ public CertificateProvisioningState provisioningState() { return this.provisioningState; } + /** + * Get the certificateKeyVaultProperties property: Properties for a certificate stored in a Key Vault. + * + * @return the certificateKeyVaultProperties value. + */ + public CertificateKeyVaultProperties certificateKeyVaultProperties() { + return this.certificateKeyVaultProperties; + } + + /** + * Set the certificateKeyVaultProperties property: Properties for a certificate stored in a Key Vault. + * + * @param certificateKeyVaultProperties the certificateKeyVaultProperties value to set. + * @return the CertificateProperties object itself. + */ + public CertificateProperties + withCertificateKeyVaultProperties(CertificateKeyVaultProperties certificateKeyVaultProperties) { + this.certificateKeyVaultProperties = certificateKeyVaultProperties; + return this; + } + /** * Get the password property: Certificate password. - * + * * @return the password value. */ public String password() { @@ -103,7 +140,7 @@ public String password() { /** * Set the password property: Certificate password. - * + * * @param password the password value to set. * @return the CertificateProperties object itself. */ @@ -114,7 +151,7 @@ public CertificateProperties withPassword(String password) { /** * Get the subjectName property: Subject name of the certificate. - * + * * @return the subjectName value. */ public String subjectName() { @@ -123,7 +160,7 @@ public String subjectName() { /** * Get the subjectAlternativeNames property: Subject alternative names the certificate applies to. - * + * * @return the subjectAlternativeNames value. */ public List subjectAlternativeNames() { @@ -132,7 +169,7 @@ public List subjectAlternativeNames() { /** * Get the value property: PFX or PEM blob. - * + * * @return the value value. */ public byte[] value() { @@ -141,7 +178,7 @@ public byte[] value() { /** * Set the value property: PFX or PEM blob. - * + * * @param value the value value to set. * @return the CertificateProperties object itself. */ @@ -152,7 +189,7 @@ public CertificateProperties withValue(byte[] value) { /** * Get the issuer property: Certificate issuer. - * + * * @return the issuer value. */ public String issuer() { @@ -161,7 +198,7 @@ public String issuer() { /** * Get the issueDate property: Certificate issue Date. - * + * * @return the issueDate value. */ public OffsetDateTime issueDate() { @@ -170,7 +207,7 @@ public OffsetDateTime issueDate() { /** * Get the expirationDate property: Certificate expiration date. - * + * * @return the expirationDate value. */ public OffsetDateTime expirationDate() { @@ -179,7 +216,7 @@ public OffsetDateTime expirationDate() { /** * Get the thumbprint property: Certificate thumbprint. - * + * * @return the thumbprint value. */ public String thumbprint() { @@ -188,7 +225,7 @@ public String thumbprint() { /** * Get the valid property: Is the certificate valid?. - * + * * @return the valid value. */ public Boolean valid() { @@ -197,18 +234,43 @@ public Boolean valid() { /** * Get the publicKeyHash property: Public key hash. - * + * * @return the publicKeyHash value. */ public String publicKeyHash() { return this.publicKeyHash; } + /** + * Get the certificateType property: The type of the certificate. Allowed values are `ServerSSLCertificate` and + * `ImagePullTrustedCA`. + * + * @return the certificateType value. + */ + public CertificateType certificateType() { + return this.certificateType; + } + + /** + * Set the certificateType property: The type of the certificate. Allowed values are `ServerSSLCertificate` and + * `ImagePullTrustedCA`. + * + * @param certificateType the certificateType value to set. + * @return the CertificateProperties object itself. + */ + public CertificateProperties withCertificateType(CertificateType certificateType) { + this.certificateType = certificateType; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (certificateKeyVaultProperties() != null) { + certificateKeyVaultProperties().validate(); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProvisioningState.java index 65e92aa12643..74cae6f86cc9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProvisioningState.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProvisioningState.java @@ -8,26 +8,38 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Provisioning state of the certificate. */ +/** + * Provisioning state of the certificate. + */ public final class CertificateProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for CertificateProvisioningState. */ + /** + * Static value Succeeded for CertificateProvisioningState. + */ public static final CertificateProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for CertificateProvisioningState. */ + /** + * Static value Failed for CertificateProvisioningState. + */ public static final CertificateProvisioningState FAILED = fromString("Failed"); - /** Static value Canceled for CertificateProvisioningState. */ + /** + * Static value Canceled for CertificateProvisioningState. + */ public static final CertificateProvisioningState CANCELED = fromString("Canceled"); - /** Static value DeleteFailed for CertificateProvisioningState. */ + /** + * Static value DeleteFailed for CertificateProvisioningState. + */ public static final CertificateProvisioningState DELETE_FAILED = fromString("DeleteFailed"); - /** Static value Pending for CertificateProvisioningState. */ + /** + * Static value Pending for CertificateProvisioningState. + */ public static final CertificateProvisioningState PENDING = fromString("Pending"); /** * Creates a new instance of CertificateProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +48,7 @@ public CertificateProvisioningState() { /** * Creates or finds a CertificateProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding CertificateProvisioningState. */ @@ -47,7 +59,7 @@ public static CertificateProvisioningState fromString(String name) { /** * Gets known CertificateProvisioningState values. - * + * * @return known CertificateProvisioningState values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateType.java new file mode 100644 index 000000000000..93d70629eeb9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * The type of the certificate. Allowed values are `ServerSSLCertificate` and `ImagePullTrustedCA`. + */ +public final class CertificateType extends ExpandableStringEnum { + /** + * Static value ServerSSLCertificate for CertificateType. + */ + public static final CertificateType SERVER_SSLCERTIFICATE = fromString("ServerSSLCertificate"); + + /** + * Static value ImagePullTrustedCA for CertificateType. + */ + public static final CertificateType IMAGE_PULL_TRUSTED_CA = fromString("ImagePullTrustedCA"); + + /** + * Creates a new instance of CertificateType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public CertificateType() { + } + + /** + * Creates or finds a CertificateType from its string representation. + * + * @param name a name to look for. + * @return the corresponding CertificateType. + */ + @JsonCreator + public static CertificateType fromString(String name) { + return fromString(name, CertificateType.class); + } + + /** + * Gets known CertificateType values. + * + * @return known CertificateType values. + */ + public static Collection values() { + return values(CertificateType.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificates.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificates.java index 3604ca25aca7..8f33ff0d5d1c 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 @@ -9,16 +9,18 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; -/** Resource collection API of Certificates. */ +/** + * Resource collection API of Certificates. + */ public interface Certificates { /** * Get the Certificates in a given managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Certificates in a given managed environment as paginated response with {@link PagedIterable}. */ @@ -26,13 +28,13 @@ public interface Certificates { /** * Get the Certificates in a given managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Certificates in a given managed environment as paginated response with {@link PagedIterable}. */ @@ -40,29 +42,29 @@ public interface Certificates { /** * Get the specified 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 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. + * 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 getWithResponse( - String resourceGroupName, String environmentName, String certificateName, Context context); + Response getWithResponse(String resourceGroupName, String environmentName, String certificateName, + Context context); /** * Get the specified 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specified Certificate. */ @@ -70,7 +72,7 @@ Response getWithResponse( /** * 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. @@ -78,27 +80,23 @@ Response getWithResponse( * @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. + * 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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with + * {@link Response}. */ - Response createOrUpdateWithResponse( - String resourceGroupName, - String environmentName, - String certificateName, - CertificateInner certificateEnvelope, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String environmentName, + String certificateName, CertificateInner certificateEnvelope, Context context); /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * 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. */ @@ -106,38 +104,38 @@ Response createOrUpdateWithResponse( /** * Deletes the specified 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 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String environmentName, String certificateName, Context context); + Response deleteWithResponse(String resourceGroupName, String environmentName, String certificateName, + Context context); /** * Deletes the specified 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void delete(String resourceGroupName, String environmentName, String certificateName); /** * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * + * + * 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. @@ -145,33 +143,29 @@ Response deleteWithResponse( * @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. + * 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 certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with + * {@link Response}. */ - Response updateWithResponse( - String resourceGroupName, - String environmentName, - String certificateName, - CertificatePatch certificateEnvelope, - Context context); + Response updateWithResponse(String resourceGroupName, String environmentName, String certificateName, + CertificatePatch certificateEnvelope, Context context); /** * Update properties of a certificate - * - *

Patches a certificate. Currently only patching of tags is supported. - * + * + * 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. + * 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 update( - String resourceGroupName, String environmentName, String certificateName, CertificatePatch certificateEnvelope); + 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/CheckNameAvailabilityReason.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityReason.java index 3913496c6504..e499c606fcab 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityReason.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityReason.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The reason why the given name is not available. */ +/** + * The reason why the given name is not available. + */ public final class CheckNameAvailabilityReason extends ExpandableStringEnum { - /** Static value Invalid for CheckNameAvailabilityReason. */ + /** + * Static value Invalid for CheckNameAvailabilityReason. + */ public static final CheckNameAvailabilityReason INVALID = fromString("Invalid"); - /** Static value AlreadyExists for CheckNameAvailabilityReason. */ + /** + * Static value AlreadyExists for CheckNameAvailabilityReason. + */ public static final CheckNameAvailabilityReason ALREADY_EXISTS = fromString("AlreadyExists"); /** * Creates a new instance of CheckNameAvailabilityReason value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public CheckNameAvailabilityReason() { /** * Creates or finds a CheckNameAvailabilityReason from its string representation. - * + * * @param name a name to look for. * @return the corresponding CheckNameAvailabilityReason. */ @@ -38,7 +44,7 @@ public static CheckNameAvailabilityReason fromString(String name) { /** * Gets known CheckNameAvailabilityReason values. - * + * * @return known CheckNameAvailabilityReason values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityRequest.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityRequest.java index ebdac57ca900..51361d97bdd9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityRequest.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityRequest.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The check availability request body. */ +/** + * The check availability request body. + */ @Fluent public final class CheckNameAvailabilityRequest { /* @@ -22,13 +24,15 @@ public final class CheckNameAvailabilityRequest { @JsonProperty(value = "type") private String type; - /** Creates an instance of CheckNameAvailabilityRequest class. */ + /** + * Creates an instance of CheckNameAvailabilityRequest class. + */ public CheckNameAvailabilityRequest() { } /** * Get the name property: The name of the resource for which availability needs to be checked. - * + * * @return the name value. */ public String name() { @@ -37,7 +41,7 @@ public String name() { /** * Set the name property: The name of the resource for which availability needs to be checked. - * + * * @param name the name value to set. * @return the CheckNameAvailabilityRequest object itself. */ @@ -48,7 +52,7 @@ public CheckNameAvailabilityRequest withName(String name) { /** * Get the type property: The resource type. - * + * * @return the type value. */ public String type() { @@ -57,7 +61,7 @@ public String type() { /** * Set the type property: The resource type. - * + * * @param type the type value to set. * @return the CheckNameAvailabilityRequest object itself. */ @@ -68,7 +72,7 @@ public CheckNameAvailabilityRequest withType(String type) { /** * 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/CheckNameAvailabilityResponse.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityResponse.java index 7f61f59cc2a3..306acb1e1ff8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityResponse.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityResponse.java @@ -6,32 +6,34 @@ import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; -/** An immutable client-side representation of CheckNameAvailabilityResponse. */ +/** + * An immutable client-side representation of CheckNameAvailabilityResponse. + */ public interface CheckNameAvailabilityResponse { /** * Gets the nameAvailable property: Indicates if the resource name is available. - * + * * @return the nameAvailable value. */ Boolean nameAvailable(); /** * Gets the reason property: The reason why the given name is not available. - * + * * @return the reason value. */ CheckNameAvailabilityReason reason(); /** * Gets the message property: Detailed reason why the given name is available. - * + * * @return the message value. */ String message(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner object. - * + * * @return the inner object. */ CheckNameAvailabilityResponseInner innerModel(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CircuitBreakerPolicy.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CircuitBreakerPolicy.java new file mode 100644 index 000000000000..15fa7600e32b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CircuitBreakerPolicy.java @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Policy that defines circuit breaker conditions. + */ +@Fluent +public final class CircuitBreakerPolicy { + /* + * Number of consecutive errors before the circuit breaker opens + */ + @JsonProperty(value = "consecutiveErrors") + private Integer consecutiveErrors; + + /* + * The time interval, in seconds, between endpoint checks. This can result in opening the circuit breaker if the + * check fails as well as closing the circuit breaker if the check succeeds. Defaults to 10s. + */ + @JsonProperty(value = "intervalInSeconds") + private Integer intervalInSeconds; + + /* + * Maximum percentage of hosts that will be ejected after failure threshold has been met + */ + @JsonProperty(value = "maxEjectionPercent") + private Integer maxEjectionPercent; + + /** + * Creates an instance of CircuitBreakerPolicy class. + */ + public CircuitBreakerPolicy() { + } + + /** + * Get the consecutiveErrors property: Number of consecutive errors before the circuit breaker opens. + * + * @return the consecutiveErrors value. + */ + public Integer consecutiveErrors() { + return this.consecutiveErrors; + } + + /** + * Set the consecutiveErrors property: Number of consecutive errors before the circuit breaker opens. + * + * @param consecutiveErrors the consecutiveErrors value to set. + * @return the CircuitBreakerPolicy object itself. + */ + public CircuitBreakerPolicy withConsecutiveErrors(Integer consecutiveErrors) { + this.consecutiveErrors = consecutiveErrors; + return this; + } + + /** + * Get the intervalInSeconds property: The time interval, in seconds, between endpoint checks. This can result in + * opening the circuit breaker if the check fails as well as closing the circuit breaker if the check succeeds. + * Defaults to 10s. + * + * @return the intervalInSeconds value. + */ + public Integer intervalInSeconds() { + return this.intervalInSeconds; + } + + /** + * Set the intervalInSeconds property: The time interval, in seconds, between endpoint checks. This can result in + * opening the circuit breaker if the check fails as well as closing the circuit breaker if the check succeeds. + * Defaults to 10s. + * + * @param intervalInSeconds the intervalInSeconds value to set. + * @return the CircuitBreakerPolicy object itself. + */ + public CircuitBreakerPolicy withIntervalInSeconds(Integer intervalInSeconds) { + this.intervalInSeconds = intervalInSeconds; + return this; + } + + /** + * Get the maxEjectionPercent property: Maximum percentage of hosts that will be ejected after failure threshold + * has been met. + * + * @return the maxEjectionPercent value. + */ + public Integer maxEjectionPercent() { + return this.maxEjectionPercent; + } + + /** + * Set the maxEjectionPercent property: Maximum percentage of hosts that will be ejected after failure threshold + * has been met. + * + * @param maxEjectionPercent the maxEjectionPercent value to set. + * @return the CircuitBreakerPolicy object itself. + */ + public CircuitBreakerPolicy withMaxEjectionPercent(Integer maxEjectionPercent) { + this.maxEjectionPercent = maxEjectionPercent; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientCredentialMethod.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientCredentialMethod.java index 9486ee8854e0..c2dc3e9ab038 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientCredentialMethod.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientCredentialMethod.java @@ -7,12 +7,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** The method that should be used to authenticate the user. */ +/** + * The method that should be used to authenticate the user. + */ public enum ClientCredentialMethod { - /** Enum value ClientSecretPost. */ + /** + * Enum value ClientSecretPost. + */ CLIENT_SECRET_POST("ClientSecretPost"); - /** The actual serialized value for a ClientCredentialMethod instance. */ + /** + * The actual serialized value for a ClientCredentialMethod instance. + */ private final String value; ClientCredentialMethod(String value) { @@ -21,7 +27,7 @@ public enum ClientCredentialMethod { /** * Parses a serialized value to a ClientCredentialMethod instance. - * + * * @param value the serialized value to parse. * @return the parsed ClientCredentialMethod object, or null if unable to parse. */ @@ -39,7 +45,9 @@ public static ClientCredentialMethod fromString(String value) { return null; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @JsonValue @Override public String toString() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientRegistration.java index d8d3cdfcf9ba..c016c58d4bc3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientRegistration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientRegistration.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The configuration settings of the app registration for providers that have client ids and client secrets. */ +/** + * The configuration settings of the app registration for providers that have client ids and client secrets. + */ @Fluent public final class ClientRegistration { /* @@ -22,13 +24,15 @@ public final class ClientRegistration { @JsonProperty(value = "clientSecretSettingName") private String clientSecretSettingName; - /** Creates an instance of ClientRegistration class. */ + /** + * Creates an instance of ClientRegistration class. + */ public ClientRegistration() { } /** * Get the clientId property: The Client ID of the app used for login. - * + * * @return the clientId value. */ public String clientId() { @@ -37,7 +41,7 @@ public String clientId() { /** * Set the clientId property: The Client ID of the app used for login. - * + * * @param clientId the clientId value to set. * @return the ClientRegistration object itself. */ @@ -48,7 +52,7 @@ public ClientRegistration withClientId(String clientId) { /** * Get the clientSecretSettingName property: The app setting name that contains the client secret. - * + * * @return the clientSecretSettingName value. */ public String clientSecretSettingName() { @@ -57,7 +61,7 @@ public String clientSecretSettingName() { /** * Set the clientSecretSettingName property: The app setting name that contains the client secret. - * + * * @param clientSecretSettingName the clientSecretSettingName value to set. * @return the ClientRegistration object itself. */ @@ -68,7 +72,7 @@ public ClientRegistration withClientSecretSettingName(String clientSecretSetting /** * 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/Configuration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Configuration.java index 98f0b1ad7b07..6dfc985960d6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Configuration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Configuration.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Non versioned Container App configuration properties that define the mutable settings of a Container app. */ +/** + * Non versioned Container App configuration properties that define the mutable settings of a Container app. + */ @Fluent public final class Configuration { /* @@ -43,6 +45,12 @@ public final class Configuration { @JsonProperty(value = "dapr") private Dapr dapr; + /* + * App runtime configuration for the Container App. + */ + @JsonProperty(value = "runtime") + private Runtime runtime; + /* * Optional. Max inactive revisions a Container App can have. */ @@ -55,13 +63,15 @@ public final class Configuration { @JsonProperty(value = "service") private Service service; - /** Creates an instance of Configuration class. */ + /** + * Creates an instance of Configuration class. + */ public Configuration() { } /** * Get the secrets property: Collection of secrets used by a Container app. - * + * * @return the secrets value. */ public List secrets() { @@ -70,7 +80,7 @@ public List secrets() { /** * Set the secrets property: Collection of secrets used by a Container app. - * + * * @param secrets the secrets value to set. * @return the Configuration object itself. */ @@ -81,10 +91,11 @@ public Configuration withSecrets(List secrets) { /** * Get the activeRevisionsMode property: ActiveRevisionsMode controls how active revisions are handled for the - * Container app: <list><item>Multiple: multiple revisions can be - * active.</item><item>Single: Only one revision can be active at a time. Revision weights can not be - * used in this mode. If no value if provided, this is the default.</item></list>. - * + * Container app: + * <list><item>Multiple: multiple revisions can be active.</item><item>Single: Only one + * revision can be active at a time. Revision weights can not be used in this mode. If no value if provided, this + * is the default.</item></list>. + * * @return the activeRevisionsMode value. */ public ActiveRevisionsMode activeRevisionsMode() { @@ -93,10 +104,11 @@ public ActiveRevisionsMode activeRevisionsMode() { /** * Set the activeRevisionsMode property: ActiveRevisionsMode controls how active revisions are handled for the - * Container app: <list><item>Multiple: multiple revisions can be - * active.</item><item>Single: Only one revision can be active at a time. Revision weights can not be - * used in this mode. If no value if provided, this is the default.</item></list>. - * + * Container app: + * <list><item>Multiple: multiple revisions can be active.</item><item>Single: Only one + * revision can be active at a time. Revision weights can not be used in this mode. If no value if provided, this + * is the default.</item></list>. + * * @param activeRevisionsMode the activeRevisionsMode value to set. * @return the Configuration object itself. */ @@ -107,7 +119,7 @@ public Configuration withActiveRevisionsMode(ActiveRevisionsMode activeRevisions /** * Get the ingress property: Ingress configurations. - * + * * @return the ingress value. */ public Ingress ingress() { @@ -116,7 +128,7 @@ public Ingress ingress() { /** * Set the ingress property: Ingress configurations. - * + * * @param ingress the ingress value to set. * @return the Configuration object itself. */ @@ -128,7 +140,7 @@ public Configuration withIngress(Ingress ingress) { /** * Get the registries property: Collection of private container registry credentials for containers used by the * Container app. - * + * * @return the registries value. */ public List registries() { @@ -138,7 +150,7 @@ public List registries() { /** * Set the registries property: Collection of private container registry credentials for containers used by the * Container app. - * + * * @param registries the registries value to set. * @return the Configuration object itself. */ @@ -149,7 +161,7 @@ public Configuration withRegistries(List registries) { /** * Get the dapr property: Dapr configuration for the Container App. - * + * * @return the dapr value. */ public Dapr dapr() { @@ -158,7 +170,7 @@ public Dapr dapr() { /** * Set the dapr property: Dapr configuration for the Container App. - * + * * @param dapr the dapr value to set. * @return the Configuration object itself. */ @@ -167,9 +179,29 @@ public Configuration withDapr(Dapr dapr) { return this; } + /** + * Get the runtime property: App runtime configuration for the Container App. + * + * @return the runtime value. + */ + public Runtime runtime() { + return this.runtime; + } + + /** + * Set the runtime property: App runtime configuration for the Container App. + * + * @param runtime the runtime value to set. + * @return the Configuration object itself. + */ + public Configuration withRuntime(Runtime runtime) { + this.runtime = runtime; + return this; + } + /** * Get the maxInactiveRevisions property: Optional. Max inactive revisions a Container App can have. - * + * * @return the maxInactiveRevisions value. */ public Integer maxInactiveRevisions() { @@ -178,7 +210,7 @@ public Integer maxInactiveRevisions() { /** * Set the maxInactiveRevisions property: Optional. Max inactive revisions a Container App can have. - * + * * @param maxInactiveRevisions the maxInactiveRevisions value to set. * @return the Configuration object itself. */ @@ -189,7 +221,7 @@ public Configuration withMaxInactiveRevisions(Integer maxInactiveRevisions) { /** * Get the service property: Container App to be a dev Container App Service. - * + * * @return the service value. */ public Service service() { @@ -198,7 +230,7 @@ public Service service() { /** * Set the service property: Container App to be a dev Container App Service. - * + * * @param service the service value to set. * @return the Configuration object itself. */ @@ -209,7 +241,7 @@ public Configuration withService(Service service) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -225,6 +257,9 @@ public void validate() { if (dapr() != null) { dapr().validate(); } + if (runtime() != null) { + runtime().validate(); + } if (service() != null) { service().validate(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironment.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironment.java index 7cd325e26c16..a389b68a3941 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironment.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironment.java @@ -11,81 +11,83 @@ import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner; import java.util.Map; -/** An immutable client-side representation of ConnectedEnvironment. */ +/** + * An immutable client-side representation of ConnectedEnvironment. + */ public interface ConnectedEnvironment { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); /** * Gets the extendedLocation property: The complex type of the extended location. - * + * * @return the extendedLocation value. */ ExtendedLocation extendedLocation(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the provisioningState property: Provisioning state of the Kubernetes Environment. - * + * * @return the provisioningState value. */ ConnectedEnvironmentProvisioningState provisioningState(); /** * Gets the deploymentErrors property: Any errors that occurred during deployment or deployment validation. - * + * * @return the deploymentErrors value. */ String deploymentErrors(); /** * Gets the defaultDomain property: Default Domain Name for the cluster. - * + * * @return the defaultDomain value. */ String defaultDomain(); /** * Gets the staticIp property: Static IP of the connectedEnvironment. - * + * * @return the staticIp value. */ String staticIp(); @@ -93,65 +95,70 @@ public interface ConnectedEnvironment { /** * Gets the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service * to Service communication telemetry. - * + * * @return the daprAIConnectionString value. */ String daprAIConnectionString(); /** * Gets the customDomainConfiguration property: Custom domain configuration for the environment. - * + * * @return the customDomainConfiguration value. */ CustomDomainConfiguration customDomainConfiguration(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner object. - * + * * @return the inner object. */ ConnectedEnvironmentInner innerModel(); - /** The entirety of the ConnectedEnvironment definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the ConnectedEnvironment definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The ConnectedEnvironment definition stages. */ + /** + * The ConnectedEnvironment definition stages. + */ interface DefinitionStages { - /** The first stage of the ConnectedEnvironment definition. */ + /** + * The first stage of the ConnectedEnvironment definition. + */ interface Blank extends WithLocation { } - /** The stage of the ConnectedEnvironment definition allowing to specify location. */ + /** + * The stage of the ConnectedEnvironment definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -159,18 +166,20 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the ConnectedEnvironment definition allowing to specify parent resource. */ + /** + * The stage of the ConnectedEnvironment definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ @@ -182,78 +191,85 @@ interface WithResourceGroup { * resource to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithExtendedLocation, - DefinitionStages.WithStaticIp, - DefinitionStages.WithDaprAIConnectionString, - DefinitionStages.WithCustomDomainConfiguration { + extends DefinitionStages.WithTags, DefinitionStages.WithExtendedLocation, DefinitionStages.WithStaticIp, + DefinitionStages.WithDaprAIConnectionString, DefinitionStages.WithCustomDomainConfiguration { /** * Executes the create request. - * + * * @return the created resource. */ ConnectedEnvironment create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ ConnectedEnvironment create(Context context); } - /** The stage of the ConnectedEnvironment definition allowing to specify tags. */ + /** + * The stage of the ConnectedEnvironment definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the ConnectedEnvironment definition allowing to specify extendedLocation. */ + /** + * The stage of the ConnectedEnvironment definition allowing to specify extendedLocation. + */ interface WithExtendedLocation { /** * Specifies the extendedLocation property: The complex type of the extended location.. - * + * * @param extendedLocation The complex type of the extended location. * @return the next definition stage. */ WithCreate withExtendedLocation(ExtendedLocation extendedLocation); } - /** The stage of the ConnectedEnvironment definition allowing to specify staticIp. */ + /** + * The stage of the ConnectedEnvironment definition allowing to specify staticIp. + */ interface WithStaticIp { /** * Specifies the staticIp property: Static IP of the connectedEnvironment. - * + * * @param staticIp Static IP of the connectedEnvironment. * @return the next definition stage. */ WithCreate withStaticIp(String staticIp); } - /** The stage of the ConnectedEnvironment definition allowing to specify daprAIConnectionString. */ + /** + * The stage of the ConnectedEnvironment definition allowing to specify daprAIConnectionString. + */ interface WithDaprAIConnectionString { /** * Specifies the daprAIConnectionString property: Application Insights connection string used by Dapr to * export Service to Service communication telemetry. - * + * * @param daprAIConnectionString Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. + * Service communication telemetry. * @return the next definition stage. */ WithCreate withDaprAIConnectionString(String daprAIConnectionString); } - /** The stage of the ConnectedEnvironment definition allowing to specify customDomainConfiguration. */ + /** + * The stage of the ConnectedEnvironment definition allowing to specify customDomainConfiguration. + */ interface WithCustomDomainConfiguration { /** * Specifies the customDomainConfiguration property: Custom domain configuration for the environment. - * + * * @param customDomainConfiguration Custom domain configuration for the environment. * @return the next definition stage. */ @@ -263,87 +279,97 @@ interface WithCustomDomainConfiguration { /** * Begins update for the ConnectedEnvironment resource. - * + * * @return the stage of resource update. */ ConnectedEnvironment.Update update(); - /** The template for ConnectedEnvironment update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithExtendedLocation, - UpdateStages.WithStaticIp, - UpdateStages.WithDaprAIConnectionString, - UpdateStages.WithCustomDomainConfiguration { + /** + * The template for ConnectedEnvironment update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithExtendedLocation, UpdateStages.WithStaticIp, + UpdateStages.WithDaprAIConnectionString, UpdateStages.WithCustomDomainConfiguration { /** * Executes the update request. - * + * * @return the updated resource. */ ConnectedEnvironment apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ ConnectedEnvironment apply(Context context); } - /** The ConnectedEnvironment update stages. */ + /** + * The ConnectedEnvironment update stages. + */ interface UpdateStages { - /** The stage of the ConnectedEnvironment update allowing to specify tags. */ + /** + * The stage of the ConnectedEnvironment update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); } - /** The stage of the ConnectedEnvironment update allowing to specify extendedLocation. */ + /** + * The stage of the ConnectedEnvironment update allowing to specify extendedLocation. + */ interface WithExtendedLocation { /** * Specifies the extendedLocation property: The complex type of the extended location.. - * + * * @param extendedLocation The complex type of the extended location. * @return the next definition stage. */ Update withExtendedLocation(ExtendedLocation extendedLocation); } - /** The stage of the ConnectedEnvironment update allowing to specify staticIp. */ + /** + * The stage of the ConnectedEnvironment update allowing to specify staticIp. + */ interface WithStaticIp { /** * Specifies the staticIp property: Static IP of the connectedEnvironment. - * + * * @param staticIp Static IP of the connectedEnvironment. * @return the next definition stage. */ Update withStaticIp(String staticIp); } - /** The stage of the ConnectedEnvironment update allowing to specify daprAIConnectionString. */ + /** + * The stage of the ConnectedEnvironment update allowing to specify daprAIConnectionString. + */ interface WithDaprAIConnectionString { /** * Specifies the daprAIConnectionString property: Application Insights connection string used by Dapr to * export Service to Service communication telemetry. - * + * * @param daprAIConnectionString Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. + * Service communication telemetry. * @return the next definition stage. */ Update withDaprAIConnectionString(String daprAIConnectionString); } - /** The stage of the ConnectedEnvironment update allowing to specify customDomainConfiguration. */ + /** + * The stage of the ConnectedEnvironment update allowing to specify customDomainConfiguration. + */ interface WithCustomDomainConfiguration { /** * Specifies the customDomainConfiguration property: Custom domain configuration for the environment. - * + * * @param customDomainConfiguration Custom domain configuration for the environment. * @return the next definition stage. */ @@ -353,14 +379,14 @@ interface WithCustomDomainConfiguration { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ ConnectedEnvironment refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -368,29 +394,29 @@ interface WithCustomDomainConfiguration { /** * Checks the resource connectedEnvironmentName availability. - * - *

Checks if resource connectedEnvironmentName is available. - * + * + * Checks if resource connectedEnvironmentName is available. + * * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the check availability result along with {@link Response}. */ - Response checkNameAvailabilityWithResponse( - CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context); + Response + checkNameAvailabilityWithResponse(CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context); /** * Checks the resource connectedEnvironmentName availability. - * - *

Checks if resource connectedEnvironmentName is available. - * + * + * Checks if resource connectedEnvironmentName is available. + * * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the check availability result. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentCollection.java index 7b7e7fcb9144..f95c515f5c0f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentCollection.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Collection of connectedEnvironments. */ +/** + * Collection of connectedEnvironments. + */ @Fluent public final class ConnectedEnvironmentCollection { /* @@ -24,13 +26,15 @@ public final class ConnectedEnvironmentCollection { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ConnectedEnvironmentCollection class. */ + /** + * Creates an instance of ConnectedEnvironmentCollection class. + */ public ConnectedEnvironmentCollection() { } /** * Get the value property: Collection of resources. - * + * * @return the value value. */ public List value() { @@ -39,7 +43,7 @@ public List value() { /** * Set the value property: Collection of resources. - * + * * @param value the value value to set. * @return the ConnectedEnvironmentCollection object itself. */ @@ -50,7 +54,7 @@ public ConnectedEnvironmentCollection withValue(List /** * Get the nextLink property: Link to next page of resources. - * + * * @return the nextLink value. */ public String nextLink() { @@ -59,7 +63,7 @@ public String nextLink() { /** * 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/ConnectedEnvironmentProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentProvisioningState.java index 19364fb05e73..5655b3a8691f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentProvisioningState.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentProvisioningState.java @@ -8,39 +8,57 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Provisioning state of the Kubernetes Environment. */ +/** + * Provisioning state of the Kubernetes Environment. + */ public final class ConnectedEnvironmentProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for ConnectedEnvironmentProvisioningState. */ + /** + * Static value Succeeded for ConnectedEnvironmentProvisioningState. + */ public static final ConnectedEnvironmentProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for ConnectedEnvironmentProvisioningState. */ + /** + * Static value Failed for ConnectedEnvironmentProvisioningState. + */ public static final ConnectedEnvironmentProvisioningState FAILED = fromString("Failed"); - /** Static value Canceled for ConnectedEnvironmentProvisioningState. */ + /** + * Static value Canceled for ConnectedEnvironmentProvisioningState. + */ public static final ConnectedEnvironmentProvisioningState CANCELED = fromString("Canceled"); - /** Static value Waiting for ConnectedEnvironmentProvisioningState. */ + /** + * Static value Waiting for ConnectedEnvironmentProvisioningState. + */ public static final ConnectedEnvironmentProvisioningState WAITING = fromString("Waiting"); - /** Static value InitializationInProgress for ConnectedEnvironmentProvisioningState. */ - public static final ConnectedEnvironmentProvisioningState INITIALIZATION_IN_PROGRESS = - fromString("InitializationInProgress"); + /** + * Static value InitializationInProgress for ConnectedEnvironmentProvisioningState. + */ + public static final ConnectedEnvironmentProvisioningState INITIALIZATION_IN_PROGRESS + = fromString("InitializationInProgress"); - /** Static value InfrastructureSetupInProgress for ConnectedEnvironmentProvisioningState. */ - public static final ConnectedEnvironmentProvisioningState INFRASTRUCTURE_SETUP_IN_PROGRESS = - fromString("InfrastructureSetupInProgress"); + /** + * Static value InfrastructureSetupInProgress for ConnectedEnvironmentProvisioningState. + */ + public static final ConnectedEnvironmentProvisioningState INFRASTRUCTURE_SETUP_IN_PROGRESS + = fromString("InfrastructureSetupInProgress"); - /** Static value InfrastructureSetupComplete for ConnectedEnvironmentProvisioningState. */ - public static final ConnectedEnvironmentProvisioningState INFRASTRUCTURE_SETUP_COMPLETE = - fromString("InfrastructureSetupComplete"); + /** + * Static value InfrastructureSetupComplete for ConnectedEnvironmentProvisioningState. + */ + public static final ConnectedEnvironmentProvisioningState INFRASTRUCTURE_SETUP_COMPLETE + = fromString("InfrastructureSetupComplete"); - /** Static value ScheduledForDelete for ConnectedEnvironmentProvisioningState. */ + /** + * Static value ScheduledForDelete for ConnectedEnvironmentProvisioningState. + */ public static final ConnectedEnvironmentProvisioningState SCHEDULED_FOR_DELETE = fromString("ScheduledForDelete"); /** * Creates a new instance of ConnectedEnvironmentProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -49,7 +67,7 @@ public ConnectedEnvironmentProvisioningState() { /** * Creates or finds a ConnectedEnvironmentProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ConnectedEnvironmentProvisioningState. */ @@ -60,7 +78,7 @@ public static ConnectedEnvironmentProvisioningState fromString(String name) { /** * Gets known ConnectedEnvironmentProvisioningState values. - * + * * @return known ConnectedEnvironmentProvisioningState values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorage.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorage.java index c413cde7c5f1..861b0c8c0339 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorage.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorage.java @@ -4,69 +4,87 @@ package com.azure.resourcemanager.appcontainers.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner; -/** An immutable client-side representation of ConnectedEnvironmentStorage. */ +/** + * An immutable client-side representation of ConnectedEnvironmentStorage. + */ public interface ConnectedEnvironmentStorage { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the properties property: Storage properties. - * + * * @return the properties value. */ ConnectedEnvironmentStorageProperties properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner object. - * + * * @return the inner object. */ ConnectedEnvironmentStorageInner innerModel(); - /** The entirety of the ConnectedEnvironmentStorage definition. */ + /** + * The entirety of the ConnectedEnvironmentStorage definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The ConnectedEnvironmentStorage definition stages. */ + /** + * The ConnectedEnvironmentStorage definition stages. + */ interface DefinitionStages { - /** The first stage of the ConnectedEnvironmentStorage definition. */ + /** + * The first stage of the ConnectedEnvironmentStorage definition. + */ interface Blank extends WithParentResource { } - /** The stage of the ConnectedEnvironmentStorage definition allowing to specify parent resource. */ + /** + * The stage of the ConnectedEnvironmentStorage definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, connectedEnvironmentName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @return the next definition stage. @@ -81,25 +99,27 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ ConnectedEnvironmentStorage create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ ConnectedEnvironmentStorage create(Context context); } - /** The stage of the ConnectedEnvironmentStorage definition allowing to specify properties. */ + /** + * The stage of the ConnectedEnvironmentStorage definition allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: Storage properties. - * + * * @param properties Storage properties. * @return the next definition stage. */ @@ -109,36 +129,42 @@ interface WithProperties { /** * Begins update for the ConnectedEnvironmentStorage resource. - * + * * @return the stage of resource update. */ ConnectedEnvironmentStorage.Update update(); - /** The template for ConnectedEnvironmentStorage update. */ + /** + * The template for ConnectedEnvironmentStorage update. + */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ ConnectedEnvironmentStorage apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ ConnectedEnvironmentStorage apply(Context context); } - /** The ConnectedEnvironmentStorage update stages. */ + /** + * The ConnectedEnvironmentStorage update stages. + */ interface UpdateStages { - /** The stage of the ConnectedEnvironmentStorage update allowing to specify properties. */ + /** + * The stage of the ConnectedEnvironmentStorage update allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: Storage properties. - * + * * @param properties Storage properties. * @return the next definition stage. */ @@ -148,14 +174,14 @@ interface WithProperties { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ ConnectedEnvironmentStorage refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProperties.java index 199d8dd7ab4f..9715cc8bc3cb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Storage properties. */ +/** + * Storage properties. + */ @Fluent public final class ConnectedEnvironmentStorageProperties { /* @@ -16,13 +18,15 @@ public final class ConnectedEnvironmentStorageProperties { @JsonProperty(value = "azureFile") private AzureFileProperties azureFile; - /** Creates an instance of ConnectedEnvironmentStorageProperties class. */ + /** + * Creates an instance of ConnectedEnvironmentStorageProperties class. + */ public ConnectedEnvironmentStorageProperties() { } /** * Get the azureFile property: Azure file properties. - * + * * @return the azureFile value. */ public AzureFileProperties azureFile() { @@ -31,7 +35,7 @@ public AzureFileProperties azureFile() { /** * Set the azureFile property: Azure file properties. - * + * * @param azureFile the azureFile value to set. * @return the ConnectedEnvironmentStorageProperties object itself. */ @@ -42,7 +46,7 @@ public ConnectedEnvironmentStorageProperties withAzureFile(AzureFileProperties a /** * 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/ConnectedEnvironmentStoragesCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStoragesCollection.java index 1177335e4438..4493ee7e11dc 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStoragesCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStoragesCollection.java @@ -7,11 +7,13 @@ import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner; import java.util.List; -/** An immutable client-side representation of ConnectedEnvironmentStoragesCollection. */ +/** + * An immutable client-side representation of ConnectedEnvironmentStoragesCollection. + */ public interface ConnectedEnvironmentStoragesCollection { /** * Gets the value property: Collection of storage resources. - * + * * @return the value value. */ List value(); @@ -19,7 +21,7 @@ public interface ConnectedEnvironmentStoragesCollection { /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner * object. - * + * * @return the inner object. */ ConnectedEnvironmentStoragesCollectionInner innerModel(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironments.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironments.java index 74729069dd72..e8cef8647f81 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironments.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironments.java @@ -8,13 +8,15 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ConnectedEnvironments. */ +/** + * Resource collection API of ConnectedEnvironments. + */ public interface ConnectedEnvironments { /** * Get all connectedEnvironments for a subscription. - * + * * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all connectedEnvironments for a subscription as paginated response with {@link PagedIterable}. */ @@ -22,11 +24,11 @@ public interface ConnectedEnvironments { /** * Get all connectedEnvironments for a subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all connectedEnvironments for a subscription as paginated response with {@link PagedIterable}. */ @@ -34,11 +36,11 @@ public interface ConnectedEnvironments { /** * Get all connectedEnvironments in a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all connectedEnvironments in a resource group as paginated response with {@link PagedIterable}. */ @@ -46,12 +48,12 @@ public interface ConnectedEnvironments { /** * Get all connectedEnvironments in a resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all connectedEnvironments in a resource group as paginated response with {@link PagedIterable}. */ @@ -59,27 +61,27 @@ public interface ConnectedEnvironments { /** * Get the properties of an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of an connectedEnvironment along with {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String connectedEnvironmentName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, + String connectedEnvironmentName, Context context); /** * Get the properties of an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of an connectedEnvironment. */ @@ -87,57 +89,57 @@ Response getByResourceGroupWithResponse( /** * Delete an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteByResourceGroup(String resourceGroupName, String connectedEnvironmentName); /** * Delete an connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void delete(String resourceGroupName, String connectedEnvironmentName, Context context); /** * Update connected Environment's properties. - * - *

Patches a Managed Environment. Only patching of tags is supported currently. - * + * + * Patches a Managed Environment. Only patching of tags is supported currently. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service along with - * {@link Response}. + * {@link Response}. */ - Response updateWithResponse( - String resourceGroupName, String connectedEnvironmentName, Context context); + Response updateWithResponse(String resourceGroupName, String connectedEnvironmentName, + Context context); /** * Update connected Environment's properties. - * - *

Patches a Managed Environment. Only patching of tags is supported currently. - * + * + * Patches a Managed Environment. Only patching of tags is supported currently. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connectedEnvironment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return an environment for Kubernetes cluster specialized for web workloads by Azure App Service. */ @@ -145,51 +147,46 @@ Response updateWithResponse( /** * Checks the resource connectedEnvironmentName availability. - * - *

Checks if resource connectedEnvironmentName is available. - * + * + * Checks if resource connectedEnvironmentName is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Managed Environment. * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the check availability result along with {@link Response}. */ - Response checkNameAvailabilityWithResponse( - String resourceGroupName, - String connectedEnvironmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest, - Context context); + Response checkNameAvailabilityWithResponse(String resourceGroupName, + String connectedEnvironmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context); /** * Checks the resource connectedEnvironmentName availability. - * - *

Checks if resource connectedEnvironmentName is available. - * + * + * Checks if resource connectedEnvironmentName is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Managed Environment. * @param checkNameAvailabilityRequest The check connectedEnvironmentName availability request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the check availability result. */ - CheckNameAvailabilityResponse checkNameAvailability( - String resourceGroupName, - String connectedEnvironmentName, + CheckNameAvailabilityResponse checkNameAvailability(String resourceGroupName, String connectedEnvironmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest); /** * Get the properties of an connectedEnvironment. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of an connectedEnvironment along with {@link Response}. */ @@ -197,12 +194,12 @@ CheckNameAvailabilityResponse checkNameAvailability( /** * Get the properties of an connectedEnvironment. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of an connectedEnvironment along with {@link Response}. */ @@ -210,30 +207,30 @@ CheckNameAvailabilityResponse checkNameAvailability( /** * Delete an connectedEnvironment. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteById(String id); /** * Delete an connectedEnvironment. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteByIdWithResponse(String id, Context context); /** * Begins definition for a new ConnectedEnvironment resource. - * + * * @param name resource name. * @return the first stage of the new ConnectedEnvironment definition. */ 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 86b766493166..58a536c24fb9 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 @@ -8,16 +8,18 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ConnectedEnvironmentsCertificates. */ +/** + * Resource collection API of ConnectedEnvironmentsCertificates. + */ public interface ConnectedEnvironmentsCertificates { /** * Get the Certificates in a given connected environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Connected Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Certificates in a given connected environment as paginated response with {@link PagedIterable}. */ @@ -25,13 +27,13 @@ public interface ConnectedEnvironmentsCertificates { /** * Get the Certificates in a given connected environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Connected 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Certificates in a given connected environment as paginated response with {@link PagedIterable}. */ @@ -39,29 +41,29 @@ public interface ConnectedEnvironmentsCertificates { /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * 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 getWithResponse( - String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context); + Response getWithResponse(String resourceGroupName, String connectedEnvironmentName, + String certificateName, Context context); /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specified Certificate. */ @@ -69,40 +71,40 @@ Response getWithResponse( /** * 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 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context); + Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, String certificateName, + Context context); /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void delete(String resourceGroupName, String connectedEnvironmentName, String certificateName); /** * Get the specified Certificate. - * + * * @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. + * 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}. */ @@ -110,12 +112,12 @@ Response deleteWithResponse( /** * Get the specified 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. + * 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}. */ @@ -123,23 +125,23 @@ Response deleteWithResponse( /** * Deletes the specified Certificate. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteById(String id); /** * Deletes the specified 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ @@ -147,7 +149,7 @@ Response deleteWithResponse( /** * Begins definition for a new Certificate resource. - * + * * @param name resource name. * @return the first stage of the new Certificate definition. */ 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 4e4afa80120f..f02d74ed7226 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 @@ -8,16 +8,18 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ConnectedEnvironmentsDaprComponents. */ +/** + * Resource collection API of ConnectedEnvironmentsDaprComponents. + */ public interface ConnectedEnvironmentsDaprComponents { /** * Get the Dapr Components for a connected environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connected environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Dapr Components for a connected environment as paginated response with {@link PagedIterable}. */ @@ -25,13 +27,13 @@ public interface ConnectedEnvironmentsDaprComponents { /** * Get the Dapr Components for a connected environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connected 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Dapr Components for a connected environment as paginated response with {@link PagedIterable}. */ @@ -39,29 +41,29 @@ public interface ConnectedEnvironmentsDaprComponents { /** * 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 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. + * 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 getWithResponse( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); + Response getWithResponse(String resourceGroupName, String connectedEnvironmentName, + String componentName, Context context); /** * 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a dapr component. */ @@ -69,62 +71,62 @@ Response getWithResponse( /** * Delete a Dapr Component. - * - *

Delete a Dapr Component from 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 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); + Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, String componentName, + Context context); /** * Delete a Dapr Component. - * - *

Delete a Dapr Component from 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. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void delete(String resourceGroupName, String connectedEnvironmentName, String componentName); /** * 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. * @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. + * 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}. */ - Response listSecretsWithResponse( - String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); + Response listSecretsWithResponse(String resourceGroupName, String connectedEnvironmentName, + String componentName, Context context); /** * 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. * @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. + * 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. */ @@ -132,11 +134,11 @@ Response listSecretsWithResponse( /** * 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. + * 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}. */ @@ -144,12 +146,12 @@ Response listSecretsWithResponse( /** * 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. + * 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}. */ @@ -157,27 +159,27 @@ Response listSecretsWithResponse( /** * Delete a Dapr Component. - * - *

Delete a Dapr Component from a connected environment. - * + * + * 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteById(String id); /** * Delete a Dapr Component. - * - *

Delete a Dapr Component from a connected environment. - * + * + * 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ @@ -185,7 +187,7 @@ Response listSecretsWithResponse( /** * Begins definition for a new DaprComponent resource. - * + * * @param name resource name. * @return the first stage of the new DaprComponent definition. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsStorages.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsStorages.java index 0a7d28221974..3b4ba9cde372 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsStorages.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsStorages.java @@ -7,31 +7,33 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ConnectedEnvironmentsStorages. */ +/** + * Resource collection API of ConnectedEnvironmentsStorages. + */ public interface ConnectedEnvironmentsStorages { /** * Get all storages for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all storages for a connectedEnvironment along with {@link Response}. */ - Response listWithResponse( - String resourceGroupName, String connectedEnvironmentName, Context context); + Response listWithResponse(String resourceGroupName, + String connectedEnvironmentName, Context context); /** * Get all storages for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all storages for a connectedEnvironment. */ @@ -39,29 +41,29 @@ Response listWithResponse( /** * Get storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return storage for a connectedEnvironment along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String connectedEnvironmentName, String storageName, Context context); + Response getWithResponse(String resourceGroupName, String connectedEnvironmentName, + String storageName, Context context); /** * Get storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return storage for a connectedEnvironment. */ @@ -69,40 +71,40 @@ Response getWithResponse( /** * Delete storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String connectedEnvironmentName, String storageName, Context context); + Response deleteWithResponse(String resourceGroupName, String connectedEnvironmentName, String storageName, + Context context); /** * Delete storage for a connectedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the Environment. * @param storageName Name of the storage. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void delete(String resourceGroupName, String connectedEnvironmentName, String storageName); /** * Get storage for a connectedEnvironment. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return storage for a connectedEnvironment along with {@link Response}. */ @@ -110,12 +112,12 @@ Response deleteWithResponse( /** * Get storage for a connectedEnvironment. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return storage for a connectedEnvironment along with {@link Response}. */ @@ -123,23 +125,23 @@ Response deleteWithResponse( /** * Delete storage for a connectedEnvironment. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteById(String id); /** * Delete storage for a connectedEnvironment. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ @@ -147,7 +149,7 @@ Response deleteWithResponse( /** * Begins definition for a new ConnectedEnvironmentStorage resource. - * + * * @param name resource name. * @return the first stage of the new ConnectedEnvironmentStorage definition. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java index 24556e20cbe2..b1f4d676514c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Container App container definition. */ +/** + * Container App container definition. + */ @Fluent public final class Container extends BaseContainer { /* @@ -17,13 +19,15 @@ public final class Container extends BaseContainer { @JsonProperty(value = "probes") private List probes; - /** Creates an instance of Container class. */ + /** + * Creates an instance of Container class. + */ public Container() { } /** * Get the probes property: List of probes for the container. - * + * * @return the probes value. */ public List probes() { @@ -32,7 +36,7 @@ public List probes() { /** * Set the probes property: List of probes for the container. - * + * * @param probes the probes value to set. * @return the Container object itself. */ @@ -41,49 +45,63 @@ public Container withProbes(List probes) { return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Container withImage(String image) { super.withImage(image); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Container withName(String name) { super.withName(name); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Container withCommand(List command) { super.withCommand(command); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Container withArgs(List args) { super.withArgs(args); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Container withEnv(List env) { super.withEnv(env); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Container withResources(ContainerResources resources) { super.withResources(resources); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public Container withVolumeMounts(List volumeMounts) { super.withVolumeMounts(volumeMounts); @@ -92,7 +110,7 @@ public Container withVolumeMounts(List volumeMounts) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override 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 6b2c89375c65..45488a9f26c9 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 @@ -12,46 +12,48 @@ import java.util.List; import java.util.Map; -/** An immutable client-side representation of ContainerApp. */ +/** + * An immutable client-side representation of ContainerApp. + */ public interface ContainerApp { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); /** * Gets the extendedLocation property: The complex type of the extended location. - * + * * @return the extendedLocation value. */ ExtendedLocation extendedLocation(); @@ -59,7 +61,7 @@ public interface ContainerApp { /** * Gets the identity property: managed identities for the Container App to interact with other Azure services * without maintaining any secrets or credentials in code. - * + * * @return the identity value. */ ManagedServiceIdentity identity(); @@ -68,149 +70,154 @@ public interface ContainerApp { * Gets the managedBy property: The fully qualified resource ID of the resource that manages this resource. * Indicates if this resource is managed by another Azure resource. If this is present, complete mode deployment * will not delete the resource if it is removed from the template since it is managed by another resource. - * + * * @return the managedBy value. */ String managedBy(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the provisioningState property: Provisioning state of the Container App. - * + * * @return the provisioningState value. */ ContainerAppProvisioningState provisioningState(); /** * Gets the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment. - * + * * @return the managedEnvironmentId value. */ String managedEnvironmentId(); /** * Gets the environmentId property: Resource ID of environment. - * + * * @return the environmentId value. */ String environmentId(); /** * Gets the workloadProfileName property: Workload profile name to pin for container app execution. - * + * * @return the workloadProfileName value. */ String workloadProfileName(); /** * Gets the latestRevisionName property: Name of the latest revision of the Container App. - * + * * @return the latestRevisionName value. */ 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. - * + * * @return the latestRevisionFqdn value. */ String latestRevisionFqdn(); /** * Gets the customDomainVerificationId property: Id used to verify domain name ownership. - * + * * @return the customDomainVerificationId value. */ String customDomainVerificationId(); /** * Gets the configuration property: Non versioned Container App configuration properties. - * + * * @return the configuration value. */ Configuration configuration(); /** * Gets the template property: Container App versioned application definition. - * + * * @return the template value. */ Template template(); /** * Gets the outboundIpAddresses property: Outbound IP Addresses for container app. - * + * * @return the outboundIpAddresses value. */ List outboundIpAddresses(); /** * Gets the eventStreamEndpoint property: The endpoint of the eventstream of the container app. - * + * * @return the eventStreamEndpoint value. */ String eventStreamEndpoint(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner object. - * + * * @return the inner object. */ ContainerAppInner innerModel(); - /** The entirety of the ContainerApp definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the ContainerApp definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The ContainerApp definition stages. */ + /** + * The ContainerApp definition stages. + */ interface DefinitionStages { - /** The first stage of the ContainerApp definition. */ + /** + * The first stage of the ContainerApp definition. + */ interface Blank extends WithLocation { } - /** The stage of the ContainerApp definition allowing to specify location. */ + /** + * The stage of the ContainerApp definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -218,18 +225,20 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the ContainerApp definition allowing to specify parent resource. */ + /** + * The stage of the ContainerApp definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ @@ -240,132 +249,144 @@ interface WithResourceGroup { * The stage of the ContainerApp definition which contains all the minimum required properties for the resource * to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithExtendedLocation, - DefinitionStages.WithIdentity, - DefinitionStages.WithManagedBy, - DefinitionStages.WithManagedEnvironmentId, - DefinitionStages.WithEnvironmentId, - DefinitionStages.WithWorkloadProfileName, - DefinitionStages.WithConfiguration, - DefinitionStages.WithTemplate { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithExtendedLocation, + DefinitionStages.WithIdentity, DefinitionStages.WithManagedBy, DefinitionStages.WithManagedEnvironmentId, + DefinitionStages.WithEnvironmentId, DefinitionStages.WithWorkloadProfileName, + DefinitionStages.WithConfiguration, DefinitionStages.WithTemplate { /** * Executes the create request. - * + * * @return the created resource. */ ContainerApp create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ ContainerApp create(Context context); } - /** The stage of the ContainerApp definition allowing to specify tags. */ + /** + * The stage of the ContainerApp definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the ContainerApp definition allowing to specify extendedLocation. */ + /** + * The stage of the ContainerApp definition allowing to specify extendedLocation. + */ interface WithExtendedLocation { /** * Specifies the extendedLocation property: The complex type of the extended location.. - * + * * @param extendedLocation The complex type of the extended location. * @return the next definition stage. */ WithCreate withExtendedLocation(ExtendedLocation extendedLocation); } - /** The stage of the ContainerApp definition allowing to specify identity. */ + /** + * The stage of the ContainerApp definition allowing to specify identity. + */ interface WithIdentity { /** * Specifies the identity property: managed identities for the Container App to interact with other Azure * services without maintaining any secrets or credentials in code.. - * + * * @param identity managed identities for the Container App to interact with other Azure services without - * maintaining any secrets or credentials in code. + * maintaining any secrets or credentials in code. * @return the next definition stage. */ WithCreate withIdentity(ManagedServiceIdentity identity); } - /** The stage of the ContainerApp definition allowing to specify managedBy. */ + /** + * The stage of the ContainerApp definition allowing to specify managedBy. + */ interface WithManagedBy { /** * Specifies the managedBy property: The fully qualified resource ID of the resource that manages this * resource. Indicates if this resource is managed by another Azure resource. If this is present, complete * mode deployment will not delete the resource if it is removed from the template since it is managed by * another resource.. - * + * * @param managedBy The fully qualified resource ID of the resource that manages this resource. Indicates if - * this resource is managed by another Azure resource. If this is present, complete mode deployment will - * not delete the resource if it is removed from the template since it is managed by another resource. + * this resource is managed by another Azure resource. If this is present, complete mode deployment will not + * delete the resource if it is removed from the template since it is managed by another resource. * @return the next definition stage. */ WithCreate withManagedBy(String managedBy); } - /** The stage of the ContainerApp definition allowing to specify managedEnvironmentId. */ + /** + * The stage of the ContainerApp definition allowing to specify managedEnvironmentId. + */ interface WithManagedEnvironmentId { /** * Specifies the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment.. - * + * * @param managedEnvironmentId Deprecated. Resource ID of the Container App's environment. * @return the next definition stage. */ WithCreate withManagedEnvironmentId(String managedEnvironmentId); } - /** The stage of the ContainerApp definition allowing to specify environmentId. */ + /** + * The stage of the ContainerApp definition allowing to specify environmentId. + */ interface WithEnvironmentId { /** * Specifies the environmentId property: Resource ID of environment.. - * + * * @param environmentId Resource ID of environment. * @return the next definition stage. */ WithCreate withEnvironmentId(String environmentId); } - /** The stage of the ContainerApp definition allowing to specify workloadProfileName. */ + /** + * The stage of the ContainerApp definition allowing to specify workloadProfileName. + */ interface WithWorkloadProfileName { /** * Specifies the workloadProfileName property: Workload profile name to pin for container app execution.. - * + * * @param workloadProfileName Workload profile name to pin for container app execution. * @return the next definition stage. */ WithCreate withWorkloadProfileName(String workloadProfileName); } - /** The stage of the ContainerApp definition allowing to specify configuration. */ + /** + * The stage of the ContainerApp definition allowing to specify configuration. + */ interface WithConfiguration { /** * Specifies the configuration property: Non versioned Container App configuration properties.. - * + * * @param configuration Non versioned Container App configuration properties. * @return the next definition stage. */ WithCreate withConfiguration(Configuration configuration); } - /** The stage of the ContainerApp definition allowing to specify template. */ + /** + * The stage of the ContainerApp definition allowing to specify template. + */ interface WithTemplate { /** * Specifies the template property: Container App versioned application definition.. - * + * * @param template Container App versioned application definition. * @return the next definition stage. */ @@ -375,116 +396,129 @@ interface WithTemplate { /** * Begins update for the ContainerApp resource. - * + * * @return the stage of resource update. */ ContainerApp.Update update(); - /** The template for ContainerApp update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithExtendedLocation, - UpdateStages.WithIdentity, - UpdateStages.WithManagedBy, - UpdateStages.WithWorkloadProfileName, - UpdateStages.WithConfiguration, - UpdateStages.WithTemplate { + /** + * The template for ContainerApp update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithExtendedLocation, UpdateStages.WithIdentity, + UpdateStages.WithManagedBy, UpdateStages.WithWorkloadProfileName, UpdateStages.WithConfiguration, + UpdateStages.WithTemplate { /** * Executes the update request. - * + * * @return the updated resource. */ ContainerApp apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ ContainerApp apply(Context context); } - /** The ContainerApp update stages. */ + /** + * The ContainerApp update stages. + */ interface UpdateStages { - /** The stage of the ContainerApp update allowing to specify tags. */ + /** + * The stage of the ContainerApp update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); } - /** The stage of the ContainerApp update allowing to specify extendedLocation. */ + /** + * The stage of the ContainerApp update allowing to specify extendedLocation. + */ interface WithExtendedLocation { /** * Specifies the extendedLocation property: The complex type of the extended location.. - * + * * @param extendedLocation The complex type of the extended location. * @return the next definition stage. */ Update withExtendedLocation(ExtendedLocation extendedLocation); } - /** The stage of the ContainerApp update allowing to specify identity. */ + /** + * The stage of the ContainerApp update allowing to specify identity. + */ interface WithIdentity { /** * Specifies the identity property: managed identities for the Container App to interact with other Azure * services without maintaining any secrets or credentials in code.. - * + * * @param identity managed identities for the Container App to interact with other Azure services without - * maintaining any secrets or credentials in code. + * maintaining any secrets or credentials in code. * @return the next definition stage. */ Update withIdentity(ManagedServiceIdentity identity); } - /** The stage of the ContainerApp update allowing to specify managedBy. */ + /** + * The stage of the ContainerApp update allowing to specify managedBy. + */ interface WithManagedBy { /** * Specifies the managedBy property: The fully qualified resource ID of the resource that manages this * resource. Indicates if this resource is managed by another Azure resource. If this is present, complete * mode deployment will not delete the resource if it is removed from the template since it is managed by * another resource.. - * + * * @param managedBy The fully qualified resource ID of the resource that manages this resource. Indicates if - * this resource is managed by another Azure resource. If this is present, complete mode deployment will - * not delete the resource if it is removed from the template since it is managed by another resource. + * this resource is managed by another Azure resource. If this is present, complete mode deployment will not + * delete the resource if it is removed from the template since it is managed by another resource. * @return the next definition stage. */ Update withManagedBy(String managedBy); } - /** The stage of the ContainerApp update allowing to specify workloadProfileName. */ + /** + * The stage of the ContainerApp update allowing to specify workloadProfileName. + */ interface WithWorkloadProfileName { /** * Specifies the workloadProfileName property: Workload profile name to pin for container app execution.. - * + * * @param workloadProfileName Workload profile name to pin for container app execution. * @return the next definition stage. */ Update withWorkloadProfileName(String workloadProfileName); } - /** The stage of the ContainerApp update allowing to specify configuration. */ + /** + * The stage of the ContainerApp update allowing to specify configuration. + */ interface WithConfiguration { /** * Specifies the configuration property: Non versioned Container App configuration properties.. - * + * * @param configuration Non versioned Container App configuration properties. * @return the next definition stage. */ Update withConfiguration(Configuration configuration); } - /** The stage of the ContainerApp update allowing to specify template. */ + /** + * The stage of the ContainerApp update allowing to specify template. + */ interface WithTemplate { /** * Specifies the template property: Container App versioned application definition.. - * + * * @param template Container App versioned application definition. * @return the next definition stage. */ @@ -494,14 +528,14 @@ interface WithTemplate { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ ContainerApp refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -509,23 +543,23 @@ interface WithTemplate { /** * Analyzes a custom hostname for a Container App. - * + * * @param customHostname Custom hostname. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return custom domain analysis along with {@link Response}. */ - Response listCustomHostnameAnalysisWithResponse( - String customHostname, Context context); + Response listCustomHostnameAnalysisWithResponse(String customHostname, + Context context); /** * Analyzes a custom hostname for a Container App. - * + * * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return custom domain analysis. */ @@ -533,11 +567,11 @@ Response listCustomHostnameAnalysisWithResponse( /** * List secrets for a container app. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App Secrets Collection ARM resource along with {@link Response}. */ @@ -545,9 +579,9 @@ Response listCustomHostnameAnalysisWithResponse( /** * List secrets for a container app. - * + * * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App Secrets Collection ARM resource. */ @@ -555,13 +589,13 @@ Response listCustomHostnameAnalysisWithResponse( /** * Get auth token for a container app. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return auth token for a container app along with {@link Response}. */ @@ -569,11 +603,11 @@ Response listCustomHostnameAnalysisWithResponse( /** * Get auth token for a container app. - * + * * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return auth token for a container app. */ @@ -581,9 +615,9 @@ Response listCustomHostnameAnalysisWithResponse( /** * Start a container app. - * + * * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App. */ @@ -591,11 +625,11 @@ Response listCustomHostnameAnalysisWithResponse( /** * Start a container app. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App. */ @@ -603,9 +637,9 @@ Response listCustomHostnameAnalysisWithResponse( /** * Stop a container app. - * + * * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App. */ @@ -613,11 +647,11 @@ Response listCustomHostnameAnalysisWithResponse( /** * Stop a container app. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppAuthToken.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppAuthToken.java index 8b00db3906e5..48faf0c045db 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppAuthToken.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppAuthToken.java @@ -9,67 +9,69 @@ import java.time.OffsetDateTime; import java.util.Map; -/** An immutable client-side representation of ContainerAppAuthToken. */ +/** + * An immutable client-side representation of ContainerAppAuthToken. + */ public interface ContainerAppAuthToken { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the token property: Auth token value. - * + * * @return the token value. */ String token(); /** * Gets the expires property: Token expiration date. - * + * * @return the expires value. */ OffsetDateTime expires(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppAuthTokenInner object. - * + * * @return the inner object. */ ContainerAppAuthTokenInner innerModel(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppCollection.java index a84d9ec65676..5a225b40667c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppCollection.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Container App collection ARM resource. */ +/** + * Container App collection ARM resource. + */ @Fluent public final class ContainerAppCollection { /* @@ -25,13 +27,15 @@ public final class ContainerAppCollection { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ContainerAppCollection class. */ + /** + * Creates an instance of ContainerAppCollection class. + */ public ContainerAppCollection() { } /** * Get the value property: Collection of resources. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: Collection of resources. - * + * * @param value the value value to set. * @return the ContainerAppCollection object itself. */ @@ -51,7 +55,7 @@ public ContainerAppCollection withValue(List value) { /** * Get the nextLink property: Link to next page of resources. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,14 +64,13 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model ContainerAppCollection")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model ContainerAppCollection")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppContainerRunningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppContainerRunningState.java index e70047c56873..861d6514b3b4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppContainerRunningState.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppContainerRunningState.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Current running state of the container. */ +/** + * Current running state of the container. + */ public final class ContainerAppContainerRunningState extends ExpandableStringEnum { - /** Static value Running for ContainerAppContainerRunningState. */ + /** + * Static value Running for ContainerAppContainerRunningState. + */ public static final ContainerAppContainerRunningState RUNNING = fromString("Running"); - /** Static value Terminated for ContainerAppContainerRunningState. */ + /** + * Static value Terminated for ContainerAppContainerRunningState. + */ public static final ContainerAppContainerRunningState TERMINATED = fromString("Terminated"); - /** Static value Waiting for ContainerAppContainerRunningState. */ + /** + * Static value Waiting for ContainerAppContainerRunningState. + */ public static final ContainerAppContainerRunningState WAITING = fromString("Waiting"); /** * Creates a new instance of ContainerAppContainerRunningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public ContainerAppContainerRunningState() { /** * Creates or finds a ContainerAppContainerRunningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ContainerAppContainerRunningState. */ @@ -41,7 +49,7 @@ public static ContainerAppContainerRunningState fromString(String name) { /** * Gets known ContainerAppContainerRunningState values. - * + * * @return known ContainerAppContainerRunningState values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppJobExecutions.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppJobExecutions.java index 126c8b090543..2ff642890419 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppJobExecutions.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppJobExecutions.java @@ -7,25 +7,27 @@ import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppJobExecutionsInner; import java.util.List; -/** An immutable client-side representation of ContainerAppJobExecutions. */ +/** + * An immutable client-side representation of ContainerAppJobExecutions. + */ public interface ContainerAppJobExecutions { /** * Gets the value property: Collection of resources. - * + * * @return the value value. */ List value(); /** * Gets the nextLink property: Link to next page of resources. - * + * * @return the nextLink value. */ String nextLink(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppJobExecutionsInner object. - * + * * @return the inner object. */ ContainerAppJobExecutionsInner innerModel(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbe.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbe.java index 7b275d050e03..907cf9dd9aae 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbe.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbe.java @@ -77,14 +77,16 @@ public final class ContainerAppProbe { @JsonProperty(value = "type") private Type type; - /** Creates an instance of ContainerAppProbe class. */ + /** + * Creates an instance of ContainerAppProbe class. + */ public ContainerAppProbe() { } /** * Get the failureThreshold property: Minimum consecutive failures for the probe to be considered failed after * having succeeded. Defaults to 3. Minimum value is 1. Maximum value is 10. - * + * * @return the failureThreshold value. */ public Integer failureThreshold() { @@ -94,7 +96,7 @@ public Integer failureThreshold() { /** * Set the failureThreshold property: Minimum consecutive failures for the probe to be considered failed after * having succeeded. Defaults to 3. Minimum value is 1. Maximum value is 10. - * + * * @param failureThreshold the failureThreshold value to set. * @return the ContainerAppProbe object itself. */ @@ -105,7 +107,7 @@ public ContainerAppProbe withFailureThreshold(Integer failureThreshold) { /** * Get the httpGet property: HTTPGet specifies the http request to perform. - * + * * @return the httpGet value. */ public ContainerAppProbeHttpGet httpGet() { @@ -114,7 +116,7 @@ public ContainerAppProbeHttpGet httpGet() { /** * Set the httpGet property: HTTPGet specifies the http request to perform. - * + * * @param httpGet the httpGet value to set. * @return the ContainerAppProbe object itself. */ @@ -126,7 +128,7 @@ public ContainerAppProbe withHttpGet(ContainerAppProbeHttpGet httpGet) { /** * Get the initialDelaySeconds property: Number of seconds after the container has started before liveness probes * are initiated. Minimum value is 1. Maximum value is 60. - * + * * @return the initialDelaySeconds value. */ public Integer initialDelaySeconds() { @@ -136,7 +138,7 @@ public Integer initialDelaySeconds() { /** * Set the initialDelaySeconds property: Number of seconds after the container has started before liveness probes * are initiated. Minimum value is 1. Maximum value is 60. - * + * * @param initialDelaySeconds the initialDelaySeconds value to set. * @return the ContainerAppProbe object itself. */ @@ -146,9 +148,9 @@ public ContainerAppProbe withInitialDelaySeconds(Integer initialDelaySeconds) { } /** - * Get the periodSeconds property: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value - * is 1. Maximum value is 240. - * + * Get the periodSeconds property: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum + * value is 1. Maximum value is 240. + * * @return the periodSeconds value. */ public Integer periodSeconds() { @@ -156,9 +158,9 @@ public Integer periodSeconds() { } /** - * Set the periodSeconds property: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value - * is 1. Maximum value is 240. - * + * Set the periodSeconds property: How often (in seconds) to perform the probe. Default to 10 seconds. Minimum + * value is 1. Maximum value is 240. + * * @param periodSeconds the periodSeconds value to set. * @return the ContainerAppProbe object itself. */ @@ -170,7 +172,7 @@ public ContainerAppProbe withPeriodSeconds(Integer periodSeconds) { /** * Get the successThreshold property: Minimum consecutive successes for the probe to be considered successful after * having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. Maximum value is 10. - * + * * @return the successThreshold value. */ public Integer successThreshold() { @@ -180,7 +182,7 @@ public Integer successThreshold() { /** * Set the successThreshold property: Minimum consecutive successes for the probe to be considered successful after * having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. Maximum value is 10. - * + * * @param successThreshold the successThreshold value to set. * @return the ContainerAppProbe object itself. */ @@ -191,7 +193,7 @@ public ContainerAppProbe withSuccessThreshold(Integer successThreshold) { /** * Get the tcpSocket property: TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. - * + * * @return the tcpSocket value. */ public ContainerAppProbeTcpSocket tcpSocket() { @@ -200,7 +202,7 @@ public ContainerAppProbeTcpSocket tcpSocket() { /** * Set the tcpSocket property: TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. - * + * * @param tcpSocket the tcpSocket value to set. * @return the ContainerAppProbe object itself. */ @@ -211,14 +213,14 @@ public ContainerAppProbe withTcpSocket(ContainerAppProbeTcpSocket tcpSocket) { /** * Get the terminationGracePeriodSeconds property: Optional duration in seconds the pod needs to terminate - * gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod - * are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this - * value longer than the expected cleanup time for your process. If this value is nil, the pod's + * gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the + * pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set + * this value longer than the expected cleanup time for your process. If this value is nil, the pod's * terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. - * Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity - * to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. Maximum - * value is 3600 seconds (1 hour). - * + * Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no + * opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature + * gate. Maximum value is 3600 seconds (1 hour). + * * @return the terminationGracePeriodSeconds value. */ public Long terminationGracePeriodSeconds() { @@ -227,14 +229,14 @@ public Long terminationGracePeriodSeconds() { /** * Set the terminationGracePeriodSeconds property: Optional duration in seconds the pod needs to terminate - * gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod - * are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this - * value longer than the expected cleanup time for your process. If this value is nil, the pod's + * gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the + * pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set + * this value longer than the expected cleanup time for your process. If this value is nil, the pod's * terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. - * Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity - * to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. Maximum - * value is 3600 seconds (1 hour). - * + * Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no + * opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature + * gate. Maximum value is 3600 seconds (1 hour). + * * @param terminationGracePeriodSeconds the terminationGracePeriodSeconds value to set. * @return the ContainerAppProbe object itself. */ @@ -244,9 +246,9 @@ public ContainerAppProbe withTerminationGracePeriodSeconds(Long terminationGrace } /** - * Get the timeoutSeconds property: Number of seconds after which the probe times out. Defaults to 1 second. Minimum - * value is 1. Maximum value is 240. - * + * Get the timeoutSeconds property: Number of seconds after which the probe times out. Defaults to 1 second. + * Minimum value is 1. Maximum value is 240. + * * @return the timeoutSeconds value. */ public Integer timeoutSeconds() { @@ -254,9 +256,9 @@ public Integer timeoutSeconds() { } /** - * Set the timeoutSeconds property: Number of seconds after which the probe times out. Defaults to 1 second. Minimum - * value is 1. Maximum value is 240. - * + * Set the timeoutSeconds property: Number of seconds after which the probe times out. Defaults to 1 second. + * Minimum value is 1. Maximum value is 240. + * * @param timeoutSeconds the timeoutSeconds value to set. * @return the ContainerAppProbe object itself. */ @@ -267,7 +269,7 @@ public ContainerAppProbe withTimeoutSeconds(Integer timeoutSeconds) { /** * Get the type property: The type of probe. - * + * * @return the type value. */ public Type type() { @@ -276,7 +278,7 @@ public Type type() { /** * Set the type property: The type of probe. - * + * * @param type the type value to set. * @return the ContainerAppProbe object itself. */ @@ -287,7 +289,7 @@ public ContainerAppProbe withType(Type type) { /** * 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/ContainerAppProbeHttpGet.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGet.java index e02fc6655783..1de99cf72dbb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGet.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGet.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** HTTPGet specifies the http request to perform. */ +/** + * HTTPGet specifies the http request to perform. + */ @Fluent public final class ContainerAppProbeHttpGet { /* @@ -42,14 +44,16 @@ public final class ContainerAppProbeHttpGet { @JsonProperty(value = "scheme") private Scheme scheme; - /** Creates an instance of ContainerAppProbeHttpGet class. */ + /** + * Creates an instance of ContainerAppProbeHttpGet class. + */ public ContainerAppProbeHttpGet() { } /** * Get the host property: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in * httpHeaders instead. - * + * * @return the host value. */ public String host() { @@ -59,7 +63,7 @@ public String host() { /** * Set the host property: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in * httpHeaders instead. - * + * * @param host the host value to set. * @return the ContainerAppProbeHttpGet object itself. */ @@ -70,7 +74,7 @@ public ContainerAppProbeHttpGet withHost(String host) { /** * Get the httpHeaders property: Custom headers to set in the request. HTTP allows repeated headers. - * + * * @return the httpHeaders value. */ public List httpHeaders() { @@ -79,7 +83,7 @@ public List httpHeaders() { /** * Set the httpHeaders property: Custom headers to set in the request. HTTP allows repeated headers. - * + * * @param httpHeaders the httpHeaders value to set. * @return the ContainerAppProbeHttpGet object itself. */ @@ -90,7 +94,7 @@ public ContainerAppProbeHttpGet withHttpHeaders(List { - /** Static value InProgress for ContainerAppProvisioningState. */ + /** + * Static value InProgress for ContainerAppProvisioningState. + */ public static final ContainerAppProvisioningState IN_PROGRESS = fromString("InProgress"); - /** Static value Succeeded for ContainerAppProvisioningState. */ + /** + * Static value Succeeded for ContainerAppProvisioningState. + */ public static final ContainerAppProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for ContainerAppProvisioningState. */ + /** + * Static value Failed for ContainerAppProvisioningState. + */ public static final ContainerAppProvisioningState FAILED = fromString("Failed"); - /** Static value Canceled for ContainerAppProvisioningState. */ + /** + * Static value Canceled for ContainerAppProvisioningState. + */ public static final ContainerAppProvisioningState CANCELED = fromString("Canceled"); - /** Static value Deleting for ContainerAppProvisioningState. */ + /** + * Static value Deleting for ContainerAppProvisioningState. + */ public static final ContainerAppProvisioningState DELETING = fromString("Deleting"); /** * Creates a new instance of ContainerAppProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +48,7 @@ public ContainerAppProvisioningState() { /** * Creates or finds a ContainerAppProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ContainerAppProvisioningState. */ @@ -47,7 +59,7 @@ public static ContainerAppProvisioningState fromString(String name) { /** * Gets known ContainerAppProvisioningState values. - * + * * @return known ContainerAppProvisioningState values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppReplicaRunningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppReplicaRunningState.java index a480ec43349e..fa8058f0d086 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppReplicaRunningState.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppReplicaRunningState.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Current running state of the replica. */ +/** + * Current running state of the replica. + */ public final class ContainerAppReplicaRunningState extends ExpandableStringEnum { - /** Static value Running for ContainerAppReplicaRunningState. */ + /** + * Static value Running for ContainerAppReplicaRunningState. + */ public static final ContainerAppReplicaRunningState RUNNING = fromString("Running"); - /** Static value NotRunning for ContainerAppReplicaRunningState. */ + /** + * Static value NotRunning for ContainerAppReplicaRunningState. + */ public static final ContainerAppReplicaRunningState NOT_RUNNING = fromString("NotRunning"); - /** Static value Unknown for ContainerAppReplicaRunningState. */ + /** + * Static value Unknown for ContainerAppReplicaRunningState. + */ public static final ContainerAppReplicaRunningState UNKNOWN = fromString("Unknown"); /** * Creates a new instance of ContainerAppReplicaRunningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public ContainerAppReplicaRunningState() { /** * Creates or finds a ContainerAppReplicaRunningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding ContainerAppReplicaRunningState. */ @@ -41,7 +49,7 @@ public static ContainerAppReplicaRunningState fromString(String name) { /** * Gets known ContainerAppReplicaRunningState values. - * + * * @return known ContainerAppReplicaRunningState values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppSecret.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppSecret.java index 9c65dc9389fe..023aaea23ec4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppSecret.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppSecret.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Container App Secret. */ +/** + * Container App Secret. + */ @Immutable public final class ContainerAppSecret { /* @@ -35,13 +37,15 @@ public final class ContainerAppSecret { @JsonProperty(value = "keyVaultUrl", access = JsonProperty.Access.WRITE_ONLY) private String keyVaultUrl; - /** Creates an instance of ContainerAppSecret class. */ + /** + * Creates an instance of ContainerAppSecret class. + */ public ContainerAppSecret() { } /** * Get the name property: Secret Name. - * + * * @return the name value. */ public String name() { @@ -50,7 +54,7 @@ public String name() { /** * Get the value property: Secret Value. - * + * * @return the value value. */ public String value() { @@ -60,7 +64,7 @@ public String value() { /** * Get the identity property: Resource ID of a managed identity to authenticate with Azure Key Vault, or System to * use a system-assigned identity. - * + * * @return the identity value. */ public String identity() { @@ -69,7 +73,7 @@ public String identity() { /** * Get the keyVaultUrl property: Azure Key Vault URL pointing to the secret referenced by the container app. - * + * * @return the keyVaultUrl value. */ public String keyVaultUrl() { @@ -78,7 +82,7 @@ public String keyVaultUrl() { /** * 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/ContainerApps.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApps.java index 2f770f162574..c695056471b9 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 @@ -8,13 +8,15 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ContainerApps. */ +/** + * Resource collection API of ContainerApps. + */ public interface ContainerApps { /** * Get the Container Apps in a given subscription. - * + * * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Container Apps in a given subscription as paginated response with {@link PagedIterable}. */ @@ -22,11 +24,11 @@ public interface ContainerApps { /** * Get the Container Apps in a given subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Container Apps in a given subscription as paginated response with {@link PagedIterable}. */ @@ -34,11 +36,11 @@ public interface ContainerApps { /** * Get the Container Apps in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Container Apps in a given resource group as paginated response with {@link PagedIterable}. */ @@ -46,12 +48,12 @@ public interface ContainerApps { /** * Get the Container Apps in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Container Apps in a given resource group as paginated response with {@link PagedIterable}. */ @@ -59,31 +61,31 @@ public interface ContainerApps { /** * Get the properties of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Container App along with {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String containerAppName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String containerAppName, + Context context); /** * Get the properties of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Container App. */ @@ -91,53 +93,53 @@ Response getByResourceGroupWithResponse( /** * Delete a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteByResourceGroup(String resourceGroupName, String containerAppName); /** * Delete a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void delete(String resourceGroupName, String containerAppName, Context context); /** * Analyzes a custom hostname for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param customHostname Custom hostname. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return custom domain analysis along with {@link Response}. */ - Response listCustomHostnameAnalysisWithResponse( - String resourceGroupName, String containerAppName, String customHostname, Context context); + Response listCustomHostnameAnalysisWithResponse(String resourceGroupName, + String containerAppName, String customHostname, Context context); /** * Analyzes a custom hostname for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return custom domain analysis. */ @@ -145,27 +147,27 @@ Response listCustomHostnameAnalysisWithResponse( /** * List secrets for a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App Secrets Collection ARM resource along with {@link Response}. */ - Response listSecretsWithResponse( - String resourceGroupName, String containerAppName, Context context); + Response listSecretsWithResponse(String resourceGroupName, String containerAppName, + Context context); /** * List secrets for a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App Secrets Collection ARM resource. */ @@ -173,31 +175,31 @@ Response listSecretsWithResponse( /** * Get auth token for a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param 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. + * is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return auth token for a container app along with {@link Response}. */ - Response getAuthTokenWithResponse( - String resourceGroupName, String containerAppName, Context context); + Response getAuthTokenWithResponse(String resourceGroupName, String containerAppName, + Context context); /** * Get auth token for a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return auth token for a container app. */ @@ -205,12 +207,12 @@ Response getAuthTokenWithResponse( /** * Start a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App. */ @@ -218,13 +220,13 @@ Response getAuthTokenWithResponse( /** * Start a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App. */ @@ -232,12 +234,12 @@ Response getAuthTokenWithResponse( /** * Stop a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App. */ @@ -245,13 +247,13 @@ Response getAuthTokenWithResponse( /** * Stop a container app. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App. */ @@ -259,13 +261,13 @@ Response getAuthTokenWithResponse( /** * Get the properties of a Container App. - * + * * @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. + * is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Container App along with {@link Response}. */ @@ -273,14 +275,14 @@ Response getAuthTokenWithResponse( /** * Get the properties of a Container App. - * + * * @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. + * is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Container App along with {@link Response}. */ @@ -288,30 +290,30 @@ Response getAuthTokenWithResponse( /** * Delete a Container App. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteById(String id); /** * Delete a Container App. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteByIdWithResponse(String id, Context context); /** * Begins definition for a new ContainerApp resource. - * + * * @param name resource name. * @return the first stage of the new ContainerApp definition. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsAuthConfigs.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsAuthConfigs.java index 09373e21dca1..1859a1057108 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsAuthConfigs.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsAuthConfigs.java @@ -8,16 +8,18 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ContainerAppsAuthConfigs. */ +/** + * Resource collection API of ContainerAppsAuthConfigs. + */ public interface ContainerAppsAuthConfigs { /** * Get the Container App AuthConfigs in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Container App AuthConfigs in a given resource group as paginated response with {@link PagedIterable}. */ @@ -25,13 +27,13 @@ public interface ContainerAppsAuthConfigs { /** * Get the Container App AuthConfigs in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Container App AuthConfigs in a given resource group as paginated response with {@link PagedIterable}. */ @@ -39,29 +41,29 @@ public interface ContainerAppsAuthConfigs { /** * Get a AuthConfig of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a AuthConfig of a Container App along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String containerAppName, String authConfigName, Context context); + Response getWithResponse(String resourceGroupName, String containerAppName, String authConfigName, + Context context); /** * Get a AuthConfig of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a AuthConfig of a Container App. */ @@ -69,40 +71,40 @@ Response getWithResponse( /** * Delete a Container App AuthConfig. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String containerAppName, String authConfigName, Context context); + Response deleteWithResponse(String resourceGroupName, String containerAppName, String authConfigName, + Context context); /** * Delete a Container App AuthConfig. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void delete(String resourceGroupName, String containerAppName, String authConfigName); /** * Get a AuthConfig of a Container App. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a AuthConfig of a Container App along with {@link Response}. */ @@ -110,12 +112,12 @@ Response deleteWithResponse( /** * Get a AuthConfig of a Container App. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a AuthConfig of a Container App along with {@link Response}. */ @@ -123,23 +125,23 @@ Response deleteWithResponse( /** * Delete a Container App AuthConfig. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteById(String id); /** * Delete a Container App AuthConfig. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ @@ -147,7 +149,7 @@ Response deleteWithResponse( /** * Begins definition for a new AuthConfig resource. - * + * * @param name resource name. * @return the first stage of the new AuthConfig definition. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsDiagnostics.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsDiagnostics.java index 5b4e2d2cbc3a..74e0bd45eb2c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsDiagnostics.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsDiagnostics.java @@ -8,16 +8,18 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ContainerAppsDiagnostics. */ +/** + * Resource collection API of ContainerAppsDiagnostics. + */ public interface ContainerAppsDiagnostics { /** * Get the list of diagnostics for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which detector info is needed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of diagnostics for a given Container App as paginated response with {@link PagedIterable}. */ @@ -25,13 +27,13 @@ public interface ContainerAppsDiagnostics { /** * Get the list of diagnostics for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which detector info is needed. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of diagnostics for a given Container App as paginated response with {@link PagedIterable}. */ @@ -39,29 +41,29 @@ public interface ContainerAppsDiagnostics { /** * Get a diagnostics result of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param detectorName Name of the Container App Detector. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a diagnostics result of a Container App along with {@link Response}. */ - Response getDetectorWithResponse( - String resourceGroupName, String containerAppName, String detectorName, Context context); + Response getDetectorWithResponse(String resourceGroupName, String containerAppName, + String detectorName, Context context); /** * Get a diagnostics result of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param detectorName Name of the Container App Detector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a diagnostics result of a Container App. */ @@ -69,12 +71,12 @@ Response getDetectorWithResponse( /** * Get the Revisions for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which Revisions are needed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. */ @@ -82,45 +84,45 @@ Response getDetectorWithResponse( /** * Get the Revisions for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which Revisions are needed. * @param filter The filter to apply on the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. */ - PagedIterable listRevisions( - String resourceGroupName, String containerAppName, String filter, Context context); + PagedIterable listRevisions(String resourceGroupName, String containerAppName, String filter, + Context context); /** * Get a revision of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a revision of a Container App along with {@link Response}. */ - Response getRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); + Response getRevisionWithResponse(String resourceGroupName, String containerAppName, String revisionName, + Context context); /** * Get a revision of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a revision of a Container App. */ @@ -128,15 +130,15 @@ Response getRevisionWithResponse( /** * Get the properties of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Container App along with {@link Response}. */ @@ -144,14 +146,14 @@ Response getRevisionWithResponse( /** * Get the properties of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server on - * status code 404. + * status code 404. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Container App. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisionReplicas.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisionReplicas.java index 221ffd8e23ce..0bc8de8d41d7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisionReplicas.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisionReplicas.java @@ -7,11 +7,13 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ContainerAppsRevisionReplicas. */ +/** + * Resource collection API of ContainerAppsRevisionReplicas. + */ public interface ContainerAppsRevisionReplicas { /** * Get a replica for a Container App Revision. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. @@ -19,23 +21,23 @@ public interface ContainerAppsRevisionReplicas { * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a replica for a Container App Revision along with {@link Response}. */ - Response getReplicaWithResponse( - String resourceGroupName, String containerAppName, String revisionName, String replicaName, Context context); + Response getReplicaWithResponse(String resourceGroupName, String containerAppName, String revisionName, + String replicaName, Context context); /** * Get a replica for a Container App Revision. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @param replicaName Name of the Container App Revision Replica. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a replica for a Container App Revision. */ @@ -43,29 +45,29 @@ Response getReplicaWithResponse( /** * List replicas for a Container App Revision. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App Revision Replicas collection ARM resource along with {@link Response}. */ - Response listReplicasWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); + Response listReplicasWithResponse(String resourceGroupName, String containerAppName, + String revisionName, Context context); /** * List replicas for a Container App Revision. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App Revision Replicas collection ARM resource. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisions.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisions.java index 4d6a333e6fb6..60cb3b6963f7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisions.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisions.java @@ -8,16 +8,18 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ContainerAppsRevisions. */ +/** + * Resource collection API of ContainerAppsRevisions. + */ public interface ContainerAppsRevisions { /** * Get the Revisions for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which Revisions are needed. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. */ @@ -25,45 +27,45 @@ public interface ContainerAppsRevisions { /** * Get the Revisions for a given Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App for which Revisions are needed. * @param filter The filter to apply on the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Revisions for a given Container App as paginated response with {@link PagedIterable}. */ - PagedIterable listRevisions( - String resourceGroupName, String containerAppName, String filter, Context context); + PagedIterable listRevisions(String resourceGroupName, String containerAppName, String filter, + Context context); /** * Get a revision of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a revision of a Container App along with {@link Response}. */ - Response getRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); + Response getRevisionWithResponse(String resourceGroupName, String containerAppName, String revisionName, + Context context); /** * Get a revision of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a revision of a Container App. */ @@ -71,87 +73,87 @@ Response getRevisionWithResponse( /** * Activates a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response activateRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); + Response activateRevisionWithResponse(String resourceGroupName, String containerAppName, String revisionName, + Context context); /** * Activates a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void activateRevision(String resourceGroupName, String containerAppName, String revisionName); /** * Deactivates a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deactivateRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); + Response deactivateRevisionWithResponse(String resourceGroupName, String containerAppName, + String revisionName, Context context); /** * Deactivates a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deactivateRevision(String resourceGroupName, String containerAppName, String revisionName); /** * Restarts a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response restartRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); + Response restartRevisionWithResponse(String resourceGroupName, String containerAppName, String revisionName, + Context context); /** * Restarts a revision for a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void restartRevision(String resourceGroupName, String containerAppName, String revisionName); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsSourceControls.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsSourceControls.java index 1506120e596a..41cc21d952a2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsSourceControls.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsSourceControls.java @@ -8,62 +8,64 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ContainerAppsSourceControls. */ +/** + * Resource collection API of ContainerAppsSourceControls. + */ public interface ContainerAppsSourceControls { /** * Get the Container App SourceControls in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App SourceControls in a given resource group as paginated response with {@link - * PagedIterable}. + * @return the Container App SourceControls in a given resource group as paginated response with + * {@link PagedIterable}. */ PagedIterable listByContainerApp(String resourceGroupName, String containerAppName); /** * Get the Container App SourceControls in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the Container App SourceControls in a given resource group as paginated response with {@link - * PagedIterable}. + * @return the Container App SourceControls in a given resource group as paginated response with + * {@link PagedIterable}. */ PagedIterable listByContainerApp(String resourceGroupName, String containerAppName, Context context); /** * Get a SourceControl of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. * @param 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a SourceControl of a Container App along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String containerAppName, String sourceControlName, Context context); + Response getWithResponse(String resourceGroupName, String containerAppName, String sourceControlName, + Context context); /** * Get a SourceControl of a Container App. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a SourceControl of a Container App. */ @@ -71,38 +73,38 @@ Response getWithResponse( /** * Delete a Container App SourceControl. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void delete(String resourceGroupName, String containerAppName, String sourceControlName); /** * Delete a Container App SourceControl. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. * @param 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void delete(String resourceGroupName, String containerAppName, String sourceControlName, Context context); /** * Get a SourceControl of a Container App. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a SourceControl of a Container App along with {@link Response}. */ @@ -110,12 +112,12 @@ Response getWithResponse( /** * Get a SourceControl of a Container App. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a SourceControl of a Container App along with {@link Response}. */ @@ -123,30 +125,30 @@ Response getWithResponse( /** * Delete a Container App SourceControl. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteById(String id); /** * Delete a Container App SourceControl. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteByIdWithResponse(String id, Context context); /** * Begins definition for a new SourceControl resource. - * + * * @param name resource name. * @return the first stage of the new SourceControl definition. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistry.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistry.java new file mode 100644 index 000000000000..8c1b99939147 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistry.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Model representing a mapping from a container registry to the identity used to connect to it. + */ +@Fluent +public final class ContainerRegistry { + /* + * Login server of the container registry. + */ + @JsonProperty(value = "containerRegistryServer", required = true) + private String containerRegistryServer; + + /* + * Resource ID of the managed identity. + */ + @JsonProperty(value = "identityResourceId", required = true) + private String identityResourceId; + + /** + * Creates an instance of ContainerRegistry class. + */ + public ContainerRegistry() { + } + + /** + * Get the containerRegistryServer property: Login server of the container registry. + * + * @return the containerRegistryServer value. + */ + public String containerRegistryServer() { + return this.containerRegistryServer; + } + + /** + * Set the containerRegistryServer property: Login server of the container registry. + * + * @param containerRegistryServer the containerRegistryServer value to set. + * @return the ContainerRegistry object itself. + */ + public ContainerRegistry withContainerRegistryServer(String containerRegistryServer) { + this.containerRegistryServer = containerRegistryServer; + return this; + } + + /** + * Get the identityResourceId property: Resource ID of the managed identity. + * + * @return the identityResourceId value. + */ + public String identityResourceId() { + return this.identityResourceId; + } + + /** + * Set the identityResourceId property: Resource ID of the managed identity. + * + * @param identityResourceId the identityResourceId value to set. + * @return the ContainerRegistry object itself. + */ + public ContainerRegistry withIdentityResourceId(String identityResourceId) { + this.identityResourceId = identityResourceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (containerRegistryServer() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property containerRegistryServer in model ContainerRegistry")); + } + if (identityResourceId() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property identityResourceId in model ContainerRegistry")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ContainerRegistry.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistryWithCustomImage.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistryWithCustomImage.java new file mode 100644 index 000000000000..2682fc52cb1f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerRegistryWithCustomImage.java @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Container registry that the final image will be uploaded to. + */ +@Fluent +public final class ContainerRegistryWithCustomImage { + /* + * Login server of the container registry that the final image should be uploaded to. Builder resource needs to + * have this container registry defined along with an identity to use to access it. + */ + @JsonProperty(value = "server", required = true) + private String server; + + /* + * Full name that the final image should be uploaded as, including both image name and tag. + */ + @JsonProperty(value = "image") + private String image; + + /** + * Creates an instance of ContainerRegistryWithCustomImage class. + */ + public ContainerRegistryWithCustomImage() { + } + + /** + * Get the server property: Login server of the container registry that the final image should be uploaded to. + * Builder resource needs to have this container registry defined along with an identity to use to access it. + * + * @return the server value. + */ + public String server() { + return this.server; + } + + /** + * Set the server property: Login server of the container registry that the final image should be uploaded to. + * Builder resource needs to have this container registry defined along with an identity to use to access it. + * + * @param server the server value to set. + * @return the ContainerRegistryWithCustomImage object itself. + */ + public ContainerRegistryWithCustomImage withServer(String server) { + this.server = server; + return this; + } + + /** + * Get the image property: Full name that the final image should be uploaded as, including both image name and tag. + * + * @return the image value. + */ + public String image() { + return this.image; + } + + /** + * Set the image property: Full name that the final image should be uploaded as, including both image name and tag. + * + * @param image the image value to set. + * @return the ContainerRegistryWithCustomImage object itself. + */ + public ContainerRegistryWithCustomImage withImage(String image) { + this.image = image; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (server() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property server in model ContainerRegistryWithCustomImage")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ContainerRegistryWithCustomImage.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerResources.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerResources.java index 2daecab42dbe..eb5ba7e7e19d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerResources.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerResources.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Container App container resource requirements. */ +/** + * Container App container resource requirements. + */ @Fluent public final class ContainerResources { /* @@ -28,13 +30,15 @@ public final class ContainerResources { @JsonProperty(value = "ephemeralStorage", access = JsonProperty.Access.WRITE_ONLY) private String ephemeralStorage; - /** Creates an instance of ContainerResources class. */ + /** + * Creates an instance of ContainerResources class. + */ public ContainerResources() { } /** * Get the cpu property: Required CPU in cores, e.g. 0.5. - * + * * @return the cpu value. */ public Double cpu() { @@ -43,7 +47,7 @@ public Double cpu() { /** * Set the cpu property: Required CPU in cores, e.g. 0.5. - * + * * @param cpu the cpu value to set. * @return the ContainerResources object itself. */ @@ -54,7 +58,7 @@ public ContainerResources withCpu(Double cpu) { /** * Get the memory property: Required memory, e.g. "250Mb". - * + * * @return the memory value. */ public String memory() { @@ -63,7 +67,7 @@ public String memory() { /** * Set the memory property: Required memory, e.g. "250Mb". - * + * * @param memory the memory value to set. * @return the ContainerResources object itself. */ @@ -74,7 +78,7 @@ public ContainerResources withMemory(String memory) { /** * Get the ephemeralStorage property: Ephemeral Storage, e.g. "1Gi". - * + * * @return the ephemeralStorage value. */ public String ephemeralStorage() { @@ -83,7 +87,7 @@ public String ephemeralStorage() { /** * 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/CookieExpiration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CookieExpiration.java index 3eb091b10ed5..5b4454d8e747 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CookieExpiration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CookieExpiration.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The configuration settings of the session cookie's expiration. */ +/** + * The configuration settings of the session cookie's expiration. + */ @Fluent public final class CookieExpiration { /* @@ -22,13 +24,15 @@ public final class CookieExpiration { @JsonProperty(value = "timeToExpiration") private String timeToExpiration; - /** Creates an instance of CookieExpiration class. */ + /** + * Creates an instance of CookieExpiration class. + */ public CookieExpiration() { } /** * Get the convention property: The convention used when determining the session cookie's expiration. - * + * * @return the convention value. */ public CookieExpirationConvention convention() { @@ -37,7 +41,7 @@ public CookieExpirationConvention convention() { /** * Set the convention property: The convention used when determining the session cookie's expiration. - * + * * @param convention the convention value to set. * @return the CookieExpiration object itself. */ @@ -48,7 +52,7 @@ public CookieExpiration withConvention(CookieExpirationConvention convention) { /** * Get the timeToExpiration property: The time after the request is made when the session cookie should expire. - * + * * @return the timeToExpiration value. */ public String timeToExpiration() { @@ -57,7 +61,7 @@ public String timeToExpiration() { /** * Set the timeToExpiration property: The time after the request is made when the session cookie should expire. - * + * * @param timeToExpiration the timeToExpiration value to set. * @return the CookieExpiration object itself. */ @@ -68,7 +72,7 @@ public CookieExpiration withTimeToExpiration(String timeToExpiration) { /** * 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/CookieExpirationConvention.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CookieExpirationConvention.java index defc5483b6e0..8680a3d10e9f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CookieExpirationConvention.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CookieExpirationConvention.java @@ -7,15 +7,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** The convention used when determining the session cookie's expiration. */ +/** + * The convention used when determining the session cookie's expiration. + */ public enum CookieExpirationConvention { - /** Enum value FixedTime. */ + /** + * Enum value FixedTime. + */ FIXED_TIME("FixedTime"), - /** Enum value IdentityProviderDerived. */ + /** + * Enum value IdentityProviderDerived. + */ IDENTITY_PROVIDER_DERIVED("IdentityProviderDerived"); - /** The actual serialized value for a CookieExpirationConvention instance. */ + /** + * The actual serialized value for a CookieExpirationConvention instance. + */ private final String value; CookieExpirationConvention(String value) { @@ -24,7 +32,7 @@ public enum CookieExpirationConvention { /** * Parses a serialized value to a CookieExpirationConvention instance. - * + * * @param value the serialized value to parse. * @return the parsed CookieExpirationConvention object, or null if unable to parse. */ @@ -42,7 +50,9 @@ public static CookieExpirationConvention fromString(String value) { return null; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @JsonValue @Override public String toString() { 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 index c59afb15a75f..9c0a944196c1 100644 --- 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Cross-Origin-Resource-Sharing policy. */ +/** + * Cross-Origin-Resource-Sharing policy. + */ @Fluent public final class CorsPolicy { /* @@ -48,13 +50,15 @@ public final class CorsPolicy { @JsonProperty(value = "allowCredentials") private Boolean allowCredentials; - /** Creates an instance of CorsPolicy class. */ + /** + * Creates an instance of CorsPolicy class. + */ public CorsPolicy() { } /** * Get the allowedOrigins property: Specifies the content for the access-control-allow-origins header. - * + * * @return the allowedOrigins value. */ public List allowedOrigins() { @@ -63,7 +67,7 @@ public List allowedOrigins() { /** * Set the allowedOrigins property: Specifies the content for the access-control-allow-origins header. - * + * * @param allowedOrigins the allowedOrigins value to set. * @return the CorsPolicy object itself. */ @@ -74,7 +78,7 @@ public CorsPolicy withAllowedOrigins(List allowedOrigins) { /** * Get the allowedMethods property: Specifies the content for the access-control-allow-methods header. - * + * * @return the allowedMethods value. */ public List allowedMethods() { @@ -83,7 +87,7 @@ public List allowedMethods() { /** * Set the allowedMethods property: Specifies the content for the access-control-allow-methods header. - * + * * @param allowedMethods the allowedMethods value to set. * @return the CorsPolicy object itself. */ @@ -94,7 +98,7 @@ public CorsPolicy withAllowedMethods(List allowedMethods) { /** * Get the allowedHeaders property: Specifies the content for the access-control-allow-headers header. - * + * * @return the allowedHeaders value. */ public List allowedHeaders() { @@ -103,7 +107,7 @@ public List allowedHeaders() { /** * Set the allowedHeaders property: Specifies the content for the access-control-allow-headers header. - * + * * @param allowedHeaders the allowedHeaders value to set. * @return the CorsPolicy object itself. */ @@ -114,7 +118,7 @@ public CorsPolicy withAllowedHeaders(List allowedHeaders) { /** * Get the exposeHeaders property: Specifies the content for the access-control-expose-headers header. - * + * * @return the exposeHeaders value. */ public List exposeHeaders() { @@ -123,7 +127,7 @@ public List exposeHeaders() { /** * Set the exposeHeaders property: Specifies the content for the access-control-expose-headers header. - * + * * @param exposeHeaders the exposeHeaders value to set. * @return the CorsPolicy object itself. */ @@ -134,7 +138,7 @@ public CorsPolicy withExposeHeaders(List exposeHeaders) { /** * Get the maxAge property: Specifies the content for the access-control-max-age header. - * + * * @return the maxAge value. */ public Integer maxAge() { @@ -143,7 +147,7 @@ public Integer maxAge() { /** * Set the maxAge property: Specifies the content for the access-control-max-age header. - * + * * @param maxAge the maxAge value to set. * @return the CorsPolicy object itself. */ @@ -154,7 +158,7 @@ public CorsPolicy withMaxAge(Integer maxAge) { /** * Get the allowCredentials property: Specifies whether the resource allows credentials. - * + * * @return the allowCredentials value. */ public Boolean allowCredentials() { @@ -163,7 +167,7 @@ public Boolean allowCredentials() { /** * Set the allowCredentials property: Specifies whether the resource allows credentials. - * + * * @param allowCredentials the allowCredentials value to set. * @return the CorsPolicy object itself. */ @@ -174,14 +178,13 @@ public CorsPolicy withAllowCredentials(Boolean allowCredentials) { /** * 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")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property allowedOrigins in model CorsPolicy")); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomain.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomain.java index a57a362a886d..298c01667aba 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomain.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomain.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Custom Domain of a Container App. */ +/** + * Custom Domain of a Container App. + */ @Fluent public final class CustomDomain { /* @@ -29,13 +31,15 @@ public final class CustomDomain { @JsonProperty(value = "certificateId") private String certificateId; - /** Creates an instance of CustomDomain class. */ + /** + * Creates an instance of CustomDomain class. + */ public CustomDomain() { } /** * Get the name property: Hostname. - * + * * @return the name value. */ public String name() { @@ -44,7 +48,7 @@ public String name() { /** * Set the name property: Hostname. - * + * * @param name the name value to set. * @return the CustomDomain object itself. */ @@ -55,7 +59,7 @@ public CustomDomain withName(String name) { /** * Get the bindingType property: Custom Domain binding type. - * + * * @return the bindingType value. */ public BindingType bindingType() { @@ -64,7 +68,7 @@ public BindingType bindingType() { /** * Set the bindingType property: Custom Domain binding type. - * + * * @param bindingType the bindingType value to set. * @return the CustomDomain object itself. */ @@ -76,7 +80,7 @@ public CustomDomain withBindingType(BindingType bindingType) { /** * Get the certificateId property: Resource Id of the Certificate to be bound to this hostname. Must exist in the * Managed Environment. - * + * * @return the certificateId value. */ public String certificateId() { @@ -86,7 +90,7 @@ public String certificateId() { /** * Set the certificateId property: Resource Id of the Certificate to be bound to this hostname. Must exist in the * Managed Environment. - * + * * @param certificateId the certificateId value to set. * @return the CustomDomain object itself. */ @@ -97,14 +101,13 @@ public CustomDomain withCertificateId(String certificateId) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (name() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property name in model CustomDomain")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property name in model CustomDomain")); } } 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 f6d0f7c4eae5..ba53b980ff5e 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 @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; -/** Configuration properties for apps environment custom domain. */ +/** + * Configuration properties for apps environment custom domain. + */ @Fluent public final class CustomDomainConfiguration { /* @@ -24,6 +26,12 @@ public final class CustomDomainConfiguration { @JsonProperty(value = "dnsSuffix") private String dnsSuffix; + /* + * Certificate stored in Azure Key Vault. + */ + @JsonProperty(value = "certificateKeyVaultProperties") + private CertificateKeyVaultProperties certificateKeyVaultProperties; + /* * PFX or PEM blob */ @@ -54,13 +62,15 @@ public final class CustomDomainConfiguration { @JsonProperty(value = "subjectName", access = JsonProperty.Access.WRITE_ONLY) private String subjectName; - /** Creates an instance of CustomDomainConfiguration class. */ + /** + * Creates an instance of CustomDomainConfiguration class. + */ public CustomDomainConfiguration() { } /** * Get the customDomainVerificationId property: Id used to verify domain name ownership. - * + * * @return the customDomainVerificationId value. */ public String customDomainVerificationId() { @@ -69,7 +79,7 @@ public String customDomainVerificationId() { /** * Get the dnsSuffix property: Dns suffix for the environment domain. - * + * * @return the dnsSuffix value. */ public String dnsSuffix() { @@ -78,7 +88,7 @@ public String dnsSuffix() { /** * Set the dnsSuffix property: Dns suffix for the environment domain. - * + * * @param dnsSuffix the dnsSuffix value to set. * @return the CustomDomainConfiguration object itself. */ @@ -87,9 +97,30 @@ public CustomDomainConfiguration withDnsSuffix(String dnsSuffix) { return this; } + /** + * Get the certificateKeyVaultProperties property: Certificate stored in Azure Key Vault. + * + * @return the certificateKeyVaultProperties value. + */ + public CertificateKeyVaultProperties certificateKeyVaultProperties() { + return this.certificateKeyVaultProperties; + } + + /** + * Set the certificateKeyVaultProperties property: Certificate stored in Azure Key Vault. + * + * @param certificateKeyVaultProperties the certificateKeyVaultProperties value to set. + * @return the CustomDomainConfiguration object itself. + */ + public CustomDomainConfiguration + withCertificateKeyVaultProperties(CertificateKeyVaultProperties certificateKeyVaultProperties) { + this.certificateKeyVaultProperties = certificateKeyVaultProperties; + return this; + } + /** * Get the certificateValue property: PFX or PEM blob. - * + * * @return the certificateValue value. */ public byte[] certificateValue() { @@ -98,7 +129,7 @@ public byte[] certificateValue() { /** * Set the certificateValue property: PFX or PEM blob. - * + * * @param certificateValue the certificateValue value to set. * @return the CustomDomainConfiguration object itself. */ @@ -109,7 +140,7 @@ public CustomDomainConfiguration withCertificateValue(byte[] certificateValue) { /** * Get the certificatePassword property: Certificate password. - * + * * @return the certificatePassword value. */ public String certificatePassword() { @@ -118,7 +149,7 @@ public String certificatePassword() { /** * Set the certificatePassword property: Certificate password. - * + * * @param certificatePassword the certificatePassword value to set. * @return the CustomDomainConfiguration object itself. */ @@ -129,7 +160,7 @@ public CustomDomainConfiguration withCertificatePassword(String certificatePassw /** * Get the expirationDate property: Certificate expiration date. - * + * * @return the expirationDate value. */ public OffsetDateTime expirationDate() { @@ -138,7 +169,7 @@ public OffsetDateTime expirationDate() { /** * Get the thumbprint property: Certificate thumbprint. - * + * * @return the thumbprint value. */ public String thumbprint() { @@ -147,7 +178,7 @@ public String thumbprint() { /** * Get the subjectName property: Subject name of the certificate. - * + * * @return the subjectName value. */ public String subjectName() { @@ -156,9 +187,12 @@ public String subjectName() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (certificateKeyVaultProperties() != null) { + certificateKeyVaultProperties().validate(); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResult.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResult.java index e80ffbb899cf..27c48d9aa597 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResult.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResult.java @@ -7,11 +7,13 @@ import com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner; import java.util.List; -/** An immutable client-side representation of CustomHostnameAnalysisResult. */ +/** + * An immutable client-side representation of CustomHostnameAnalysisResult. + */ public interface CustomHostnameAnalysisResult { /** * Gets the hostname property: Host name that was analyzed. - * + * * @return the hostname value. */ String hostname(); @@ -19,21 +21,21 @@ public interface CustomHostnameAnalysisResult { /** * Gets the isHostnameAlreadyVerified property: <code>true</code> if hostname is already verified; * otherwise, <code>false</code>. - * + * * @return the isHostnameAlreadyVerified value. */ Boolean isHostnameAlreadyVerified(); /** * Gets the customDomainVerificationTest property: DNS verification test result. - * + * * @return the customDomainVerificationTest value. */ DnsVerificationTestResult customDomainVerificationTest(); /** * Gets the customDomainVerificationFailureInfo property: Raw failure information if DNS verification fails. - * + * * @return the customDomainVerificationFailureInfo value. */ CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo(); @@ -41,7 +43,7 @@ public interface CustomHostnameAnalysisResult { /** * Gets the hasConflictOnManagedEnvironment property: <code>true</code> if there is a conflict on the * Container App's managed environment; otherwise, <code>false</code>. - * + * * @return the hasConflictOnManagedEnvironment value. */ Boolean hasConflictOnManagedEnvironment(); @@ -49,7 +51,7 @@ public interface CustomHostnameAnalysisResult { /** * Gets the conflictWithEnvironmentCustomDomain property: <code>true</code> if there is a conflict on * the Container App's managed environment level custom domain; otherwise, <code>false</code>. - * + * * @return the conflictWithEnvironmentCustomDomain value. */ Boolean conflictWithEnvironmentCustomDomain(); @@ -57,49 +59,49 @@ public interface CustomHostnameAnalysisResult { /** * Gets the conflictingContainerAppResourceId property: Name of the conflicting Container App on the Managed * Environment if it's within the same subscription. - * + * * @return the conflictingContainerAppResourceId value. */ String conflictingContainerAppResourceId(); /** * Gets the cNameRecords property: CName records visible for this hostname. - * + * * @return the cNameRecords value. */ List cNameRecords(); /** * Gets the txtRecords property: TXT records visible for this hostname. - * + * * @return the txtRecords value. */ List txtRecords(); /** * Gets the aRecords property: A records visible for this hostname. - * + * * @return the aRecords value. */ List aRecords(); /** * Gets the alternateCNameRecords property: Alternate CName records visible for this hostname. - * + * * @return the alternateCNameRecords value. */ List alternateCNameRecords(); /** * Gets the alternateTxtRecords property: Alternate TXT records visible for this hostname. - * + * * @return the alternateTxtRecords value. */ List alternateTxtRecords(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner object. - * + * * @return the inner object. */ CustomHostnameAnalysisResultInner innerModel(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo.java index 981f2943541f..45529ba9c4b5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Raw failure information if DNS verification fails. */ +/** + * Raw failure information if DNS verification fails. + */ @Fluent public final class CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo { /* @@ -35,13 +37,15 @@ public final class CustomHostnameAnalysisResultCustomDomainVerificationFailureIn @JsonProperty(value = "details") private List details; - /** Creates an instance of CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo class. */ + /** + * Creates an instance of CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo class. + */ public CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo() { } /** * Get the code property: Standardized string to programmatically identify the error. - * + * * @return the code value. */ public String code() { @@ -50,7 +54,7 @@ public String code() { /** * Get the message property: Detailed error description and debugging information. - * + * * @return the message value. */ public String message() { @@ -59,7 +63,7 @@ public String message() { /** * Get the target property: Detailed error description and debugging information. - * + * * @return the target value. */ public String target() { @@ -68,7 +72,7 @@ public String target() { /** * Get the details property: Details or the error. - * + * * @return the details value. */ public List details() { @@ -77,19 +81,19 @@ public List details) { + public CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo + withDetails(List details) { this.details = details; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem.java index 8324c64c41af..1f62e74e378d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Detailed errors. */ +/** + * Detailed errors. + */ @Immutable public final class CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem { /* @@ -28,13 +30,15 @@ public final class CustomHostnameAnalysisResultCustomDomainVerificationFailureIn @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY) private String target; - /** Creates an instance of CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem class. */ + /** + * Creates an instance of CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem class. + */ public CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem() { } /** * Get the code property: Standardized string to programmatically identify the error. - * + * * @return the code value. */ public String code() { @@ -43,7 +47,7 @@ public String code() { /** * Get the message property: Detailed error description and debugging information. - * + * * @return the message value. */ public String message() { @@ -52,7 +56,7 @@ public String message() { /** * Get the target property: Detailed error description and debugging information. - * + * * @return the target value. */ public String target() { @@ -61,7 +65,7 @@ public String target() { /** * 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/CustomOpenIdConnectProvider.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomOpenIdConnectProvider.java index 12afd42c402d..042d48d13233 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomOpenIdConnectProvider.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomOpenIdConnectProvider.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The configuration settings of the custom Open ID Connect provider. */ +/** + * The configuration settings of the custom Open ID Connect provider. + */ @Fluent public final class CustomOpenIdConnectProvider { /* @@ -28,14 +30,16 @@ public final class CustomOpenIdConnectProvider { @JsonProperty(value = "login") private OpenIdConnectLogin login; - /** Creates an instance of CustomOpenIdConnectProvider class. */ + /** + * Creates an instance of CustomOpenIdConnectProvider class. + */ public CustomOpenIdConnectProvider() { } /** * Get the enabled property: <code>false</code> if the custom Open ID provider provider should not be * enabled; otherwise, <code>true</code>. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -45,7 +49,7 @@ public Boolean enabled() { /** * Set the enabled property: <code>false</code> if the custom Open ID provider provider should not be * enabled; otherwise, <code>true</code>. - * + * * @param enabled the enabled value to set. * @return the CustomOpenIdConnectProvider object itself. */ @@ -57,7 +61,7 @@ public CustomOpenIdConnectProvider withEnabled(Boolean enabled) { /** * Get the registration property: The configuration settings of the app registration for the custom Open ID Connect * provider. - * + * * @return the registration value. */ public OpenIdConnectRegistration registration() { @@ -67,7 +71,7 @@ public OpenIdConnectRegistration registration() { /** * Set the registration property: The configuration settings of the app registration for the custom Open ID Connect * provider. - * + * * @param registration the registration value to set. * @return the CustomOpenIdConnectProvider object itself. */ @@ -78,7 +82,7 @@ public CustomOpenIdConnectProvider withRegistration(OpenIdConnectRegistration re /** * Get the login property: The configuration settings of the login flow of the custom Open ID Connect provider. - * + * * @return the login value. */ public OpenIdConnectLogin login() { @@ -87,7 +91,7 @@ public OpenIdConnectLogin login() { /** * Set the login property: The configuration settings of the login flow of the custom Open ID Connect provider. - * + * * @param login the login value to set. * @return the CustomOpenIdConnectProvider object itself. */ @@ -98,7 +102,7 @@ public CustomOpenIdConnectProvider withLogin(OpenIdConnectLogin login) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomScaleRule.java index a3adaf102f25..c5b307384859 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomScaleRule.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomScaleRule.java @@ -10,7 +10,9 @@ import java.util.List; import java.util.Map; -/** Container App container Custom scaling rule. */ +/** + * Container App container Custom scaling rule. + */ @Fluent public final class CustomScaleRule { /* @@ -33,13 +35,16 @@ public final class CustomScaleRule { @JsonProperty(value = "auth") private List auth; - /** Creates an instance of CustomScaleRule class. */ + /** + * Creates an instance of CustomScaleRule class. + */ public CustomScaleRule() { } /** - * Get the type property: Type of the custom scale rule eg: azure-servicebus, redis etc. - * + * Get the type property: Type of the custom scale rule + * eg: azure-servicebus, redis etc. + * * @return the type value. */ public String type() { @@ -47,8 +52,9 @@ public String type() { } /** - * Set the type property: Type of the custom scale rule eg: azure-servicebus, redis etc. - * + * Set the type property: Type of the custom scale rule + * eg: azure-servicebus, redis etc. + * * @param type the type value to set. * @return the CustomScaleRule object itself. */ @@ -59,7 +65,7 @@ public CustomScaleRule withType(String type) { /** * Get the metadata property: Metadata properties to describe custom scale rule. - * + * * @return the metadata value. */ public Map metadata() { @@ -68,7 +74,7 @@ public Map metadata() { /** * Set the metadata property: Metadata properties to describe custom scale rule. - * + * * @param metadata the metadata value to set. * @return the CustomScaleRule object itself. */ @@ -79,7 +85,7 @@ public CustomScaleRule withMetadata(Map metadata) { /** * Get the auth property: Authentication secrets for the custom scale rule. - * + * * @return the auth value. */ public List auth() { @@ -88,7 +94,7 @@ public List auth() { /** * Set the auth property: Authentication secrets for the custom scale rule. - * + * * @param auth the auth value to set. * @return the CustomScaleRule object itself. */ @@ -99,7 +105,7 @@ public CustomScaleRule withAuth(List auth) { /** * 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/Dapr.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Dapr.java index 9d378cd0ee73..bd279c80bfc6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Dapr.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Dapr.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Container App Dapr configuration. */ +/** + * Container App Dapr configuration. + */ @Fluent public final class Dapr { /* @@ -59,13 +61,15 @@ public final class Dapr { @JsonProperty(value = "enableApiLogging") private Boolean enableApiLogging; - /** Creates an instance of Dapr class. */ + /** + * Creates an instance of Dapr class. + */ public Dapr() { } /** * Get the enabled property: Boolean indicating if the Dapr side car is enabled. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -74,7 +78,7 @@ public Boolean enabled() { /** * Set the enabled property: Boolean indicating if the Dapr side car is enabled. - * + * * @param enabled the enabled value to set. * @return the Dapr object itself. */ @@ -85,7 +89,7 @@ public Dapr withEnabled(Boolean enabled) { /** * Get the appId property: Dapr application identifier. - * + * * @return the appId value. */ public String appId() { @@ -94,7 +98,7 @@ public String appId() { /** * Set the appId property: Dapr application identifier. - * + * * @param appId the appId value to set. * @return the Dapr object itself. */ @@ -106,7 +110,7 @@ public Dapr withAppId(String appId) { /** * Get the appProtocol property: Tells Dapr which protocol your application is using. Valid options are http and * grpc. Default is http. - * + * * @return the appProtocol value. */ public AppProtocol appProtocol() { @@ -116,7 +120,7 @@ public AppProtocol appProtocol() { /** * Set the appProtocol property: Tells Dapr which protocol your application is using. Valid options are http and * grpc. Default is http. - * + * * @param appProtocol the appProtocol value to set. * @return the Dapr object itself. */ @@ -127,7 +131,7 @@ public Dapr withAppProtocol(AppProtocol appProtocol) { /** * Get the appPort property: Tells Dapr which port your application is listening on. - * + * * @return the appPort value. */ public Integer appPort() { @@ -136,7 +140,7 @@ public Integer appPort() { /** * Set the appPort property: Tells Dapr which port your application is listening on. - * + * * @param appPort the appPort value to set. * @return the Dapr object itself. */ @@ -148,7 +152,7 @@ public Dapr withAppPort(Integer appPort) { /** * Get the httpReadBufferSize property: Dapr max size of http header read buffer in KB to handle when sending * multi-KB headers. Default is 65KB. - * + * * @return the httpReadBufferSize value. */ public Integer httpReadBufferSize() { @@ -158,7 +162,7 @@ public Integer httpReadBufferSize() { /** * Set the httpReadBufferSize property: Dapr max size of http header read buffer in KB to handle when sending * multi-KB headers. Default is 65KB. - * + * * @param httpReadBufferSize the httpReadBufferSize value to set. * @return the Dapr object itself. */ @@ -168,9 +172,9 @@ public Dapr withHttpReadBufferSize(Integer httpReadBufferSize) { } /** - * Get the httpMaxRequestSize property: Increasing max size of request body http and grpc servers parameter in MB to - * handle uploading of big files. Default is 4 MB. - * + * Get the httpMaxRequestSize property: Increasing max size of request body http and grpc servers parameter in MB + * to handle uploading of big files. Default is 4 MB. + * * @return the httpMaxRequestSize value. */ public Integer httpMaxRequestSize() { @@ -178,9 +182,9 @@ public Integer httpMaxRequestSize() { } /** - * Set the httpMaxRequestSize property: Increasing max size of request body http and grpc servers parameter in MB to - * handle uploading of big files. Default is 4 MB. - * + * Set the httpMaxRequestSize property: Increasing max size of request body http and grpc servers parameter in MB + * to handle uploading of big files. Default is 4 MB. + * * @param httpMaxRequestSize the httpMaxRequestSize value to set. * @return the Dapr object itself. */ @@ -192,7 +196,7 @@ public Dapr withHttpMaxRequestSize(Integer httpMaxRequestSize) { /** * Get the logLevel property: Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. * Default is info. - * + * * @return the logLevel value. */ public LogLevel logLevel() { @@ -202,7 +206,7 @@ public LogLevel logLevel() { /** * Set the logLevel property: Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. * Default is info. - * + * * @param logLevel the logLevel value to set. * @return the Dapr object itself. */ @@ -213,7 +217,7 @@ public Dapr withLogLevel(LogLevel logLevel) { /** * Get the enableApiLogging property: Enables API logging for the Dapr sidecar. - * + * * @return the enableApiLogging value. */ public Boolean enableApiLogging() { @@ -222,7 +226,7 @@ public Boolean enableApiLogging() { /** * Set the enableApiLogging property: Enables API logging for the Dapr sidecar. - * + * * @param enableApiLogging the enableApiLogging value to set. * @return the Dapr object itself. */ @@ -233,7 +237,7 @@ public Dapr withEnableApiLogging(Boolean enableApiLogging) { /** * 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/DaprComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java index 5b0052ba06f7..dc79196c9979 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 @@ -5,119 +5,144 @@ package com.azure.resourcemanager.appcontainers.models; import com.azure.core.http.rest.Response; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; import java.util.List; -/** An immutable client-side representation of DaprComponent. */ +/** + * An immutable client-side representation of DaprComponent. + */ public interface DaprComponent { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the componentType property: Component type. - * + * * @return the componentType value. */ String componentType(); /** * Gets the version property: Component version. - * + * * @return the version value. */ String version(); /** * Gets the ignoreErrors property: Boolean describing if the component errors are ignores. - * + * * @return the ignoreErrors value. */ Boolean ignoreErrors(); /** * Gets the initTimeout property: Initialization timeout. - * + * * @return the initTimeout value. */ String initTimeout(); /** * Gets the secrets property: Collection of secrets used by a Dapr component. - * + * * @return the secrets value. */ List secrets(); /** * Gets the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. - * + * * @return the secretStoreComponent value. */ String secretStoreComponent(); /** * Gets the metadata property: Component metadata. - * + * * @return the metadata value. */ List metadata(); /** * Gets the scopes property: Names of container apps that can use this Dapr component. - * + * * @return the scopes value. */ List scopes(); + /** + * Gets the serviceComponentBind property: List of container app services that are bound to the Dapr component. + * + * @return the serviceComponentBind value. + */ + List serviceComponentBind(); + /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner object. - * + * * @return the inner object. */ DaprComponentInner innerModel(); - /** The entirety of the DaprComponent definition. */ + /** + * The entirety of the DaprComponent definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The DaprComponent definition stages. */ + /** + * The DaprComponent definition stages. + */ interface DefinitionStages { - /** The first stage of the DaprComponent definition. */ + /** + * The first stage of the DaprComponent definition. + */ interface Blank extends WithParentResource { } - /** The stage of the DaprComponent definition allowing to specify parent resource. */ + /** + * The stage of the DaprComponent definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, connectedEnvironmentName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param connectedEnvironmentName Name of the connected environment. * @return the next definition stage. @@ -130,253 +155,306 @@ interface WithParentResource { * to be created, but also allows for any other optional properties to be specified. */ interface WithCreate - extends DefinitionStages.WithComponentType, - DefinitionStages.WithVersion, - DefinitionStages.WithIgnoreErrors, - DefinitionStages.WithInitTimeout, - DefinitionStages.WithSecrets, - DefinitionStages.WithSecretStoreComponent, - DefinitionStages.WithMetadata, - DefinitionStages.WithScopes { + extends DefinitionStages.WithComponentType, DefinitionStages.WithVersion, DefinitionStages.WithIgnoreErrors, + DefinitionStages.WithInitTimeout, DefinitionStages.WithSecrets, DefinitionStages.WithSecretStoreComponent, + DefinitionStages.WithMetadata, DefinitionStages.WithScopes, DefinitionStages.WithServiceComponentBind { /** * Executes the create request. - * + * * @return the created resource. */ DaprComponent create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ DaprComponent create(Context context); } - /** The stage of the DaprComponent definition allowing to specify componentType. */ + /** + * The stage of the DaprComponent definition allowing to specify componentType. + */ interface WithComponentType { /** * Specifies the componentType property: Component type. - * + * * @param componentType Component type. * @return the next definition stage. */ WithCreate withComponentType(String componentType); } - /** The stage of the DaprComponent definition allowing to specify version. */ + /** + * The stage of the DaprComponent definition allowing to specify version. + */ interface WithVersion { /** * Specifies the version property: Component version. - * + * * @param version Component version. * @return the next definition stage. */ WithCreate withVersion(String version); } - /** The stage of the DaprComponent definition allowing to specify ignoreErrors. */ + /** + * The stage of the DaprComponent definition allowing to specify ignoreErrors. + */ interface WithIgnoreErrors { /** * Specifies the ignoreErrors property: Boolean describing if the component errors are ignores. - * + * * @param ignoreErrors Boolean describing if the component errors are ignores. * @return the next definition stage. */ WithCreate withIgnoreErrors(Boolean ignoreErrors); } - /** The stage of the DaprComponent definition allowing to specify initTimeout. */ + /** + * The stage of the DaprComponent definition allowing to specify initTimeout. + */ interface WithInitTimeout { /** * Specifies the initTimeout property: Initialization timeout. - * + * * @param initTimeout Initialization timeout. * @return the next definition stage. */ WithCreate withInitTimeout(String initTimeout); } - /** The stage of the DaprComponent definition allowing to specify secrets. */ + /** + * The stage of the DaprComponent definition allowing to specify secrets. + */ interface WithSecrets { /** * Specifies the secrets property: Collection of secrets used by a Dapr component. - * + * * @param secrets Collection of secrets used by a Dapr component. * @return the next definition stage. */ WithCreate withSecrets(List secrets); } - /** The stage of the DaprComponent definition allowing to specify secretStoreComponent. */ + /** + * The stage of the DaprComponent definition allowing to specify secretStoreComponent. + */ interface WithSecretStoreComponent { /** * Specifies the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. - * + * * @param secretStoreComponent Name of a Dapr component to retrieve component secrets from. * @return the next definition stage. */ WithCreate withSecretStoreComponent(String secretStoreComponent); } - /** The stage of the DaprComponent definition allowing to specify metadata. */ + /** + * The stage of the DaprComponent definition allowing to specify metadata. + */ interface WithMetadata { /** * Specifies the metadata property: Component metadata. - * + * * @param metadata Component metadata. * @return the next definition stage. */ WithCreate withMetadata(List metadata); } - /** The stage of the DaprComponent definition allowing to specify scopes. */ + /** + * The stage of the DaprComponent definition allowing to specify scopes. + */ interface WithScopes { /** * Specifies the scopes property: Names of container apps that can use this Dapr component. - * + * * @param scopes Names of container apps that can use this Dapr component. * @return the next definition stage. */ WithCreate withScopes(List scopes); } + + /** + * The stage of the DaprComponent definition allowing to specify serviceComponentBind. + */ + interface WithServiceComponentBind { + /** + * Specifies the serviceComponentBind property: List of container app services that are bound to the Dapr + * component. + * + * @param serviceComponentBind List of container app services that are bound to the Dapr component. + * @return the next definition stage. + */ + WithCreate withServiceComponentBind(List serviceComponentBind); + } } /** * Begins update for the DaprComponent resource. - * + * * @return the stage of resource update. */ DaprComponent.Update update(); - /** The template for DaprComponent update. */ - interface Update - extends UpdateStages.WithComponentType, - UpdateStages.WithVersion, - UpdateStages.WithIgnoreErrors, - UpdateStages.WithInitTimeout, - UpdateStages.WithSecrets, - UpdateStages.WithSecretStoreComponent, - UpdateStages.WithMetadata, - UpdateStages.WithScopes { + /** + * The template for DaprComponent update. + */ + interface Update extends UpdateStages.WithComponentType, UpdateStages.WithVersion, UpdateStages.WithIgnoreErrors, + UpdateStages.WithInitTimeout, UpdateStages.WithSecrets, UpdateStages.WithSecretStoreComponent, + UpdateStages.WithMetadata, UpdateStages.WithScopes, UpdateStages.WithServiceComponentBind { /** * Executes the update request. - * + * * @return the updated resource. */ DaprComponent apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ DaprComponent apply(Context context); } - /** The DaprComponent update stages. */ + /** + * The DaprComponent update stages. + */ interface UpdateStages { - /** The stage of the DaprComponent update allowing to specify componentType. */ + /** + * The stage of the DaprComponent update allowing to specify componentType. + */ interface WithComponentType { /** * Specifies the componentType property: Component type. - * + * * @param componentType Component type. * @return the next definition stage. */ Update withComponentType(String componentType); } - /** The stage of the DaprComponent update allowing to specify version. */ + /** + * The stage of the DaprComponent update allowing to specify version. + */ interface WithVersion { /** * Specifies the version property: Component version. - * + * * @param version Component version. * @return the next definition stage. */ Update withVersion(String version); } - /** The stage of the DaprComponent update allowing to specify ignoreErrors. */ + /** + * The stage of the DaprComponent update allowing to specify ignoreErrors. + */ interface WithIgnoreErrors { /** * Specifies the ignoreErrors property: Boolean describing if the component errors are ignores. - * + * * @param ignoreErrors Boolean describing if the component errors are ignores. * @return the next definition stage. */ Update withIgnoreErrors(Boolean ignoreErrors); } - /** The stage of the DaprComponent update allowing to specify initTimeout. */ + /** + * The stage of the DaprComponent update allowing to specify initTimeout. + */ interface WithInitTimeout { /** * Specifies the initTimeout property: Initialization timeout. - * + * * @param initTimeout Initialization timeout. * @return the next definition stage. */ Update withInitTimeout(String initTimeout); } - /** The stage of the DaprComponent update allowing to specify secrets. */ + /** + * The stage of the DaprComponent update allowing to specify secrets. + */ interface WithSecrets { /** * Specifies the secrets property: Collection of secrets used by a Dapr component. - * + * * @param secrets Collection of secrets used by a Dapr component. * @return the next definition stage. */ Update withSecrets(List secrets); } - /** The stage of the DaprComponent update allowing to specify secretStoreComponent. */ + /** + * The stage of the DaprComponent update allowing to specify secretStoreComponent. + */ interface WithSecretStoreComponent { /** * Specifies the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. - * + * * @param secretStoreComponent Name of a Dapr component to retrieve component secrets from. * @return the next definition stage. */ Update withSecretStoreComponent(String secretStoreComponent); } - /** The stage of the DaprComponent update allowing to specify metadata. */ + /** + * The stage of the DaprComponent update allowing to specify metadata. + */ interface WithMetadata { /** * Specifies the metadata property: Component metadata. - * + * * @param metadata Component metadata. * @return the next definition stage. */ Update withMetadata(List metadata); } - /** The stage of the DaprComponent update allowing to specify scopes. */ + /** + * The stage of the DaprComponent update allowing to specify scopes. + */ interface WithScopes { /** * Specifies the scopes property: Names of container apps that can use this Dapr component. - * + * * @param scopes Names of container apps that can use this Dapr component. * @return the next definition stage. */ Update withScopes(List scopes); } + + /** + * The stage of the DaprComponent update allowing to specify serviceComponentBind. + */ + interface WithServiceComponentBind { + /** + * Specifies the serviceComponentBind property: List of container app services that are bound to the Dapr + * component. + * + * @param serviceComponentBind List of container app services that are bound to the Dapr component. + * @return the next definition stage. + */ + Update withServiceComponentBind(List serviceComponentBind); + } } /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ DaprComponent refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -384,11 +462,11 @@ interface WithScopes { /** * List secrets for a 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. + * 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}. */ @@ -396,9 +474,9 @@ interface WithScopes { /** * List secrets for a dapr component. - * + * * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * 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. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicies.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicies.java new file mode 100644 index 000000000000..5658db8005ad --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicies.java @@ -0,0 +1,174 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of DaprComponentResiliencyPolicies. + */ +public interface DaprComponentResiliencyPolicies { + /** + * Get the resiliency policies for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the resiliency policies for a Dapr component as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String environmentName, + String componentName); + + /** + * Get the resiliency policies for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the resiliency policies for a Dapr component as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String environmentName, + String componentName, Context context); + + /** + * Get a Dapr component resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Dapr component resiliency policy along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String environmentName, + String componentName, String name, Context context); + + /** + * Get a Dapr component resiliency policy. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Dapr component resiliency policy. + */ + DaprComponentResiliencyPolicy get(String resourceGroupName, String environmentName, String componentName, + String name); + + /** + * Delete a Dapr component resiliency policy. + * + * Delete a resiliency policy for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse(String resourceGroupName, String environmentName, String componentName, + String name, Context context); + + /** + * Delete a Dapr component resiliency policy. + * + * Delete a resiliency policy for a Dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @param name Name of the Dapr Component Resiliency Policy. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String environmentName, String componentName, String name); + + /** + * Get a Dapr component resiliency policy. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Dapr component resiliency policy along with {@link Response}. + */ + DaprComponentResiliencyPolicy getById(String id); + + /** + * Get a Dapr component resiliency policy. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Dapr component resiliency policy along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a Dapr component resiliency policy. + * + * Delete a resiliency policy for a Dapr component. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a Dapr component resiliency policy. + * + * Delete a resiliency policy for a Dapr component. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new DaprComponentResiliencyPolicy resource. + * + * @param name resource name. + * @return the first stage of the new DaprComponentResiliencyPolicy definition. + */ + DaprComponentResiliencyPolicy.DefinitionStages.Blank define(String name); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPoliciesCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPoliciesCollection.java new file mode 100644 index 000000000000..d2cd3641ede9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPoliciesCollection.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Dapr Component Resiliency Policies ARM resource. + */ +@Fluent +public final class DaprComponentResiliencyPoliciesCollection { + /* + * Collection of resources. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * Link to next page of resources. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of DaprComponentResiliencyPoliciesCollection class. + */ + public DaprComponentResiliencyPoliciesCollection() { + } + + /** + * Get the value property: Collection of resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Collection of resources. + * + * @param value the value value to set. + * @return the DaprComponentResiliencyPoliciesCollection object itself. + */ + public DaprComponentResiliencyPoliciesCollection withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to next page of resources. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property value in model DaprComponentResiliencyPoliciesCollection")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DaprComponentResiliencyPoliciesCollection.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicy.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicy.java new file mode 100644 index 000000000000..a8322cfe73ff --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicy.java @@ -0,0 +1,224 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyInner; + +/** + * An immutable client-side representation of DaprComponentResiliencyPolicy. + */ +public interface DaprComponentResiliencyPolicy { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inboundPolicy property: The optional inbound component resiliency policy configuration. + * + * @return the inboundPolicy value. + */ + DaprComponentResiliencyPolicyConfiguration inboundPolicy(); + + /** + * Gets the outboundPolicy property: The optional outbound component resiliency policy configuration. + * + * @return the outboundPolicy value. + */ + DaprComponentResiliencyPolicyConfiguration outboundPolicy(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyInner object. + * + * @return the inner object. + */ + DaprComponentResiliencyPolicyInner innerModel(); + + /** + * The entirety of the DaprComponentResiliencyPolicy definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The DaprComponentResiliencyPolicy definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the DaprComponentResiliencyPolicy definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the DaprComponentResiliencyPolicy definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, environmentName, componentName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param componentName Name of the Dapr Component. + * @return the next definition stage. + */ + WithCreate withExistingDaprComponent(String resourceGroupName, String environmentName, + String componentName); + } + + /** + * The stage of the DaprComponentResiliencyPolicy definition which contains all the minimum required properties + * for the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithInboundPolicy, DefinitionStages.WithOutboundPolicy { + /** + * Executes the create request. + * + * @return the created resource. + */ + DaprComponentResiliencyPolicy create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + DaprComponentResiliencyPolicy create(Context context); + } + + /** + * The stage of the DaprComponentResiliencyPolicy definition allowing to specify inboundPolicy. + */ + interface WithInboundPolicy { + /** + * Specifies the inboundPolicy property: The optional inbound component resiliency policy configuration. + * + * @param inboundPolicy The optional inbound component resiliency policy configuration. + * @return the next definition stage. + */ + WithCreate withInboundPolicy(DaprComponentResiliencyPolicyConfiguration inboundPolicy); + } + + /** + * The stage of the DaprComponentResiliencyPolicy definition allowing to specify outboundPolicy. + */ + interface WithOutboundPolicy { + /** + * Specifies the outboundPolicy property: The optional outbound component resiliency policy configuration. + * + * @param outboundPolicy The optional outbound component resiliency policy configuration. + * @return the next definition stage. + */ + WithCreate withOutboundPolicy(DaprComponentResiliencyPolicyConfiguration outboundPolicy); + } + } + + /** + * Begins update for the DaprComponentResiliencyPolicy resource. + * + * @return the stage of resource update. + */ + DaprComponentResiliencyPolicy.Update update(); + + /** + * The template for DaprComponentResiliencyPolicy update. + */ + interface Update extends UpdateStages.WithInboundPolicy, UpdateStages.WithOutboundPolicy { + /** + * Executes the update request. + * + * @return the updated resource. + */ + DaprComponentResiliencyPolicy apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + DaprComponentResiliencyPolicy apply(Context context); + } + + /** + * The DaprComponentResiliencyPolicy update stages. + */ + interface UpdateStages { + /** + * The stage of the DaprComponentResiliencyPolicy update allowing to specify inboundPolicy. + */ + interface WithInboundPolicy { + /** + * Specifies the inboundPolicy property: The optional inbound component resiliency policy configuration. + * + * @param inboundPolicy The optional inbound component resiliency policy configuration. + * @return the next definition stage. + */ + Update withInboundPolicy(DaprComponentResiliencyPolicyConfiguration inboundPolicy); + } + + /** + * The stage of the DaprComponentResiliencyPolicy update allowing to specify outboundPolicy. + */ + interface WithOutboundPolicy { + /** + * Specifies the outboundPolicy property: The optional outbound component resiliency policy configuration. + * + * @param outboundPolicy The optional outbound component resiliency policy configuration. + * @return the next definition stage. + */ + Update withOutboundPolicy(DaprComponentResiliencyPolicyConfiguration outboundPolicy); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + DaprComponentResiliencyPolicy refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + DaprComponentResiliencyPolicy refresh(Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.java new file mode 100644 index 000000000000..00acaa9ac2ce --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration.java @@ -0,0 +1,114 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Dapr Component Resiliency Policy Circuit Breaker Policy Configuration. + */ +@Fluent +public final class DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration { + /* + * The number of consecutive errors before the circuit is opened. + */ + @JsonProperty(value = "consecutiveErrors") + private Integer consecutiveErrors; + + /* + * The interval in seconds until a retry attempt is made after the circuit is opened. + */ + @JsonProperty(value = "timeoutInSeconds") + private Integer timeoutInSeconds; + + /* + * The optional interval in seconds after which the error count resets to 0. An interval of 0 will never reset. If + * not specified, the timeoutInSeconds value will be used. + */ + @JsonProperty(value = "intervalInSeconds") + private Integer intervalInSeconds; + + /** + * Creates an instance of DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration class. + */ + public DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() { + } + + /** + * Get the consecutiveErrors property: The number of consecutive errors before the circuit is opened. + * + * @return the consecutiveErrors value. + */ + public Integer consecutiveErrors() { + return this.consecutiveErrors; + } + + /** + * Set the consecutiveErrors property: The number of consecutive errors before the circuit is opened. + * + * @param consecutiveErrors the consecutiveErrors value to set. + * @return the DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration object itself. + */ + public DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration + withConsecutiveErrors(Integer consecutiveErrors) { + this.consecutiveErrors = consecutiveErrors; + return this; + } + + /** + * Get the timeoutInSeconds property: The interval in seconds until a retry attempt is made after the circuit is + * opened. + * + * @return the timeoutInSeconds value. + */ + public Integer timeoutInSeconds() { + return this.timeoutInSeconds; + } + + /** + * Set the timeoutInSeconds property: The interval in seconds until a retry attempt is made after the circuit is + * opened. + * + * @param timeoutInSeconds the timeoutInSeconds value to set. + * @return the DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration object itself. + */ + public DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration + withTimeoutInSeconds(Integer timeoutInSeconds) { + this.timeoutInSeconds = timeoutInSeconds; + return this; + } + + /** + * Get the intervalInSeconds property: The optional interval in seconds after which the error count resets to 0. An + * interval of 0 will never reset. If not specified, the timeoutInSeconds value will be used. + * + * @return the intervalInSeconds value. + */ + public Integer intervalInSeconds() { + return this.intervalInSeconds; + } + + /** + * Set the intervalInSeconds property: The optional interval in seconds after which the error count resets to 0. An + * interval of 0 will never reset. If not specified, the timeoutInSeconds value will be used. + * + * @param intervalInSeconds the intervalInSeconds value to set. + * @return the DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration object itself. + */ + public DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration + withIntervalInSeconds(Integer intervalInSeconds) { + this.intervalInSeconds = intervalInSeconds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyConfiguration.java new file mode 100644 index 000000000000..de2ba311504e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyConfiguration.java @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Dapr Component Resiliency Policy Configuration. + */ +@Fluent +public final class DaprComponentResiliencyPolicyConfiguration { + /* + * The optional HTTP retry policy configuration + */ + @JsonProperty(value = "httpRetryPolicy") + private DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration httpRetryPolicy; + + /* + * The optional timeout policy configuration + */ + @JsonProperty(value = "timeoutPolicy") + private DaprComponentResiliencyPolicyTimeoutPolicyConfiguration timeoutPolicy; + + /* + * The optional circuit breaker policy configuration + */ + @JsonProperty(value = "circuitBreakerPolicy") + private DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration circuitBreakerPolicy; + + /** + * Creates an instance of DaprComponentResiliencyPolicyConfiguration class. + */ + public DaprComponentResiliencyPolicyConfiguration() { + } + + /** + * Get the httpRetryPolicy property: The optional HTTP retry policy configuration. + * + * @return the httpRetryPolicy value. + */ + public DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration httpRetryPolicy() { + return this.httpRetryPolicy; + } + + /** + * Set the httpRetryPolicy property: The optional HTTP retry policy configuration. + * + * @param httpRetryPolicy the httpRetryPolicy value to set. + * @return the DaprComponentResiliencyPolicyConfiguration object itself. + */ + public DaprComponentResiliencyPolicyConfiguration + withHttpRetryPolicy(DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration httpRetryPolicy) { + this.httpRetryPolicy = httpRetryPolicy; + return this; + } + + /** + * Get the timeoutPolicy property: The optional timeout policy configuration. + * + * @return the timeoutPolicy value. + */ + public DaprComponentResiliencyPolicyTimeoutPolicyConfiguration timeoutPolicy() { + return this.timeoutPolicy; + } + + /** + * Set the timeoutPolicy property: The optional timeout policy configuration. + * + * @param timeoutPolicy the timeoutPolicy value to set. + * @return the DaprComponentResiliencyPolicyConfiguration object itself. + */ + public DaprComponentResiliencyPolicyConfiguration + withTimeoutPolicy(DaprComponentResiliencyPolicyTimeoutPolicyConfiguration timeoutPolicy) { + this.timeoutPolicy = timeoutPolicy; + return this; + } + + /** + * Get the circuitBreakerPolicy property: The optional circuit breaker policy configuration. + * + * @return the circuitBreakerPolicy value. + */ + public DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration circuitBreakerPolicy() { + return this.circuitBreakerPolicy; + } + + /** + * Set the circuitBreakerPolicy property: The optional circuit breaker policy configuration. + * + * @param circuitBreakerPolicy the circuitBreakerPolicy value to set. + * @return the DaprComponentResiliencyPolicyConfiguration object itself. + */ + public DaprComponentResiliencyPolicyConfiguration + withCircuitBreakerPolicy(DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration circuitBreakerPolicy) { + this.circuitBreakerPolicy = circuitBreakerPolicy; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (httpRetryPolicy() != null) { + httpRetryPolicy().validate(); + } + if (timeoutPolicy() != null) { + timeoutPolicy().validate(); + } + if (circuitBreakerPolicy() != null) { + circuitBreakerPolicy().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.java new file mode 100644 index 000000000000..ade23b45f831 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Dapr Component Resiliency Policy HTTP Retry Backoff Configuration. + */ +@Fluent +public final class DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration { + /* + * The optional initial delay in milliseconds before an operation is retried + */ + @JsonProperty(value = "initialDelayInMilliseconds") + private Integer initialDelayInMilliseconds; + + /* + * The optional maximum time interval in milliseconds between retry attempts + */ + @JsonProperty(value = "maxIntervalInMilliseconds") + private Integer maxIntervalInMilliseconds; + + /** + * Creates an instance of DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration class. + */ + public DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() { + } + + /** + * Get the initialDelayInMilliseconds property: The optional initial delay in milliseconds before an operation is + * retried. + * + * @return the initialDelayInMilliseconds value. + */ + public Integer initialDelayInMilliseconds() { + return this.initialDelayInMilliseconds; + } + + /** + * Set the initialDelayInMilliseconds property: The optional initial delay in milliseconds before an operation is + * retried. + * + * @param initialDelayInMilliseconds the initialDelayInMilliseconds value to set. + * @return the DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration object itself. + */ + public DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration + withInitialDelayInMilliseconds(Integer initialDelayInMilliseconds) { + this.initialDelayInMilliseconds = initialDelayInMilliseconds; + return this; + } + + /** + * Get the maxIntervalInMilliseconds property: The optional maximum time interval in milliseconds between retry + * attempts. + * + * @return the maxIntervalInMilliseconds value. + */ + public Integer maxIntervalInMilliseconds() { + return this.maxIntervalInMilliseconds; + } + + /** + * Set the maxIntervalInMilliseconds property: The optional maximum time interval in milliseconds between retry + * attempts. + * + * @param maxIntervalInMilliseconds the maxIntervalInMilliseconds value to set. + * @return the DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration object itself. + */ + public DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration + withMaxIntervalInMilliseconds(Integer maxIntervalInMilliseconds) { + this.maxIntervalInMilliseconds = maxIntervalInMilliseconds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.java new file mode 100644 index 000000000000..da8bf6a03fd4 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Dapr Component Resiliency Policy HTTP Retry Policy Configuration. + */ +@Fluent +public final class DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration { + /* + * The optional maximum number of retries + */ + @JsonProperty(value = "maxRetries") + private Integer maxRetries; + + /* + * The optional retry backoff configuration + */ + @JsonProperty(value = "retryBackOff") + private DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration retryBackOff; + + /** + * Creates an instance of DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration class. + */ + public DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration() { + } + + /** + * Get the maxRetries property: The optional maximum number of retries. + * + * @return the maxRetries value. + */ + public Integer maxRetries() { + return this.maxRetries; + } + + /** + * Set the maxRetries property: The optional maximum number of retries. + * + * @param maxRetries the maxRetries value to set. + * @return the DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration object itself. + */ + public DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration withMaxRetries(Integer maxRetries) { + this.maxRetries = maxRetries; + return this; + } + + /** + * Get the retryBackOff property: The optional retry backoff configuration. + * + * @return the retryBackOff value. + */ + public DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration retryBackOff() { + return this.retryBackOff; + } + + /** + * Set the retryBackOff property: The optional retry backoff configuration. + * + * @param retryBackOff the retryBackOff value to set. + * @return the DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration object itself. + */ + public DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration + withRetryBackOff(DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration retryBackOff) { + this.retryBackOff = retryBackOff; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (retryBackOff() != null) { + retryBackOff().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.java new file mode 100644 index 000000000000..558f96916428 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentResiliencyPolicyTimeoutPolicyConfiguration.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Dapr Component Resiliency Policy Timeout Policy Configuration. + */ +@Fluent +public final class DaprComponentResiliencyPolicyTimeoutPolicyConfiguration { + /* + * The optional response timeout in seconds + */ + @JsonProperty(value = "responseTimeoutInSeconds") + private Integer responseTimeoutInSeconds; + + /** + * Creates an instance of DaprComponentResiliencyPolicyTimeoutPolicyConfiguration class. + */ + public DaprComponentResiliencyPolicyTimeoutPolicyConfiguration() { + } + + /** + * Get the responseTimeoutInSeconds property: The optional response timeout in seconds. + * + * @return the responseTimeoutInSeconds value. + */ + public Integer responseTimeoutInSeconds() { + return this.responseTimeoutInSeconds; + } + + /** + * Set the responseTimeoutInSeconds property: The optional response timeout in seconds. + * + * @param responseTimeoutInSeconds the responseTimeoutInSeconds value to set. + * @return the DaprComponentResiliencyPolicyTimeoutPolicyConfiguration object itself. + */ + public DaprComponentResiliencyPolicyTimeoutPolicyConfiguration + withResponseTimeoutInSeconds(Integer responseTimeoutInSeconds) { + this.responseTimeoutInSeconds = responseTimeoutInSeconds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentServiceBinding.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentServiceBinding.java new file mode 100644 index 000000000000..f2ab867136a4 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentServiceBinding.java @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Configuration to bind a Dapr Component to a dev ContainerApp Service. + */ +@Fluent +public final class DaprComponentServiceBinding { + /* + * Name of the service bind + */ + @JsonProperty(value = "name") + private String name; + + /* + * Resource id of the target service + */ + @JsonProperty(value = "serviceId") + private String serviceId; + + /* + * Service bind metadata + */ + @JsonProperty(value = "metadata") + private DaprServiceBindMetadata metadata; + + /** + * Creates an instance of DaprComponentServiceBinding class. + */ + public DaprComponentServiceBinding() { + } + + /** + * Get the name property: Name of the service bind. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the service bind. + * + * @param name the name value to set. + * @return the DaprComponentServiceBinding object itself. + */ + public DaprComponentServiceBinding withName(String name) { + this.name = name; + return this; + } + + /** + * Get the serviceId property: Resource id of the target service. + * + * @return the serviceId value. + */ + public String serviceId() { + return this.serviceId; + } + + /** + * Set the serviceId property: Resource id of the target service. + * + * @param serviceId the serviceId value to set. + * @return the DaprComponentServiceBinding object itself. + */ + public DaprComponentServiceBinding withServiceId(String serviceId) { + this.serviceId = serviceId; + return this; + } + + /** + * Get the metadata property: Service bind metadata. + * + * @return the metadata value. + */ + public DaprServiceBindMetadata metadata() { + return this.metadata; + } + + /** + * Set the metadata property: Service bind metadata. + * + * @param metadata the metadata value to set. + * @return the DaprComponentServiceBinding object itself. + */ + public DaprComponentServiceBinding withMetadata(DaprServiceBindMetadata metadata) { + this.metadata = metadata; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (metadata() != null) { + metadata().validate(); + } + } +} 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 decfd9343fba..8834ca17b94b 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 @@ -9,16 +9,18 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; -/** Resource collection API of DaprComponents. */ +/** + * Resource collection API of DaprComponents. + */ public interface DaprComponents { /** * Get the Dapr Components for a managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Dapr Components for a managed environment as paginated response with {@link PagedIterable}. */ @@ -26,13 +28,13 @@ public interface DaprComponents { /** * Get the Dapr Components for a managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Dapr Components for a managed environment as paginated response with {@link PagedIterable}. */ @@ -40,29 +42,29 @@ public interface DaprComponents { /** * Get a dapr component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * 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 getWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context); + Response getWithResponse(String resourceGroupName, String environmentName, String componentName, + Context context); /** * Get a dapr component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a dapr component. */ @@ -70,9 +72,9 @@ Response getWithResponse( /** * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in 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. @@ -80,96 +82,89 @@ Response getWithResponse( * @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. + * 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}. */ - Response createOrUpdateWithResponse( - String resourceGroupName, - String environmentName, - String componentName, - DaprComponentInner daprComponentEnvelope, - Context context); + Response createOrUpdateWithResponse(String resourceGroupName, String environmentName, + String componentName, DaprComponentInner daprComponentEnvelope, Context context); /** * Creates or updates a Dapr Component. - * - *

Creates or updates a Dapr Component in 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. + * 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 environmentName, - String componentName, + DaprComponent createOrUpdate(String resourceGroupName, String environmentName, String componentName, DaprComponentInner daprComponentEnvelope); /** * Delete a Dapr Component. - * - *

Delete a Dapr Component from a Managed Environment. - * + * + * 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. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context); + Response deleteWithResponse(String resourceGroupName, String environmentName, String componentName, + Context context); /** * Delete a Dapr Component. - * - *

Delete a Dapr Component from a Managed Environment. - * + * + * 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. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void delete(String resourceGroupName, String environmentName, String componentName); /** * List secrets for a dapr component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * 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}. */ - Response listSecretsWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context); + Response listSecretsWithResponse(String resourceGroupName, String environmentName, + String componentName, Context context); /** * List secrets for a dapr component. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * 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. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentsCollection.java index e3d61a519a55..a61699c74b2b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentsCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentsCollection.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Dapr Components ARM resource. */ +/** + * Dapr Components ARM resource. + */ @Fluent public final class DaprComponentsCollection { /* @@ -25,13 +27,15 @@ public final class DaprComponentsCollection { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of DaprComponentsCollection class. */ + /** + * Creates an instance of DaprComponentsCollection class. + */ public DaprComponentsCollection() { } /** * Get the value property: Collection of resources. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: Collection of resources. - * + * * @param value the value value to set. * @return the DaprComponentsCollection object itself. */ @@ -51,7 +55,7 @@ public DaprComponentsCollection withValue(List value) { /** * Get the nextLink property: Link to next page of resources. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,14 +64,13 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model DaprComponentsCollection")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model DaprComponentsCollection")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprConfiguration.java index f0b9ce6544be..fb4c30f8dfae 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprConfiguration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprConfiguration.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Configuration properties Dapr component. */ +/** + * Configuration properties Dapr component. + */ @Immutable public final class DaprConfiguration { /* @@ -16,13 +18,15 @@ public final class DaprConfiguration { @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) private String version; - /** Creates an instance of DaprConfiguration class. */ + /** + * Creates an instance of DaprConfiguration class. + */ public DaprConfiguration() { } /** * Get the version property: The version of Dapr. - * + * * @return the version value. */ public String version() { @@ -31,7 +35,7 @@ public String version() { /** * 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/DaprMetadata.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprMetadata.java index 41e6d4e7d8b3..4c1ba04e9035 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprMetadata.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprMetadata.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Dapr component metadata. */ +/** + * Dapr component metadata. + */ @Fluent public final class DaprMetadata { /* @@ -28,13 +30,15 @@ public final class DaprMetadata { @JsonProperty(value = "secretRef") private String secretRef; - /** Creates an instance of DaprMetadata class. */ + /** + * Creates an instance of DaprMetadata class. + */ public DaprMetadata() { } /** * Get the name property: Metadata property name. - * + * * @return the name value. */ public String name() { @@ -43,7 +47,7 @@ public String name() { /** * Set the name property: Metadata property name. - * + * * @param name the name value to set. * @return the DaprMetadata object itself. */ @@ -54,7 +58,7 @@ public DaprMetadata withName(String name) { /** * Get the value property: Metadata property value. - * + * * @return the value value. */ public String value() { @@ -63,7 +67,7 @@ public String value() { /** * Set the value property: Metadata property value. - * + * * @param value the value value to set. * @return the DaprMetadata object itself. */ @@ -74,7 +78,7 @@ public DaprMetadata withValue(String value) { /** * Get the secretRef property: Name of the Dapr Component secret from which to pull the metadata property value. - * + * * @return the secretRef value. */ public String secretRef() { @@ -83,7 +87,7 @@ public String secretRef() { /** * Set the secretRef property: Name of the Dapr Component secret from which to pull the metadata property value. - * + * * @param secretRef the secretRef value to set. * @return the DaprMetadata object itself. */ @@ -94,7 +98,7 @@ public DaprMetadata withSecretRef(String secretRef) { /** * 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/DaprSecret.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSecret.java index 54d093bca047..d30582091a86 100644 --- 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 @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Dapr component Secret for ListSecrets Action. */ +/** + * Dapr component Secret for ListSecrets Action. + */ @Immutable public final class DaprSecret { /* @@ -22,13 +24,15 @@ public final class DaprSecret { @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY) private String value; - /** Creates an instance of DaprSecret class. */ + /** + * Creates an instance of DaprSecret class. + */ public DaprSecret() { } /** * Get the name property: Secret Name. - * + * * @return the name value. */ public String name() { @@ -37,7 +41,7 @@ public String name() { /** * Get the value property: Secret Value. - * + * * @return the value value. */ public String value() { @@ -46,7 +50,7 @@ public String 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 de12dbb02434..7a8c0766d80e 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 @@ -7,18 +7,20 @@ import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; import java.util.List; -/** An immutable client-side representation of DaprSecretsCollection. */ +/** + * An immutable client-side representation of DaprSecretsCollection. + */ public interface DaprSecretsCollection { /** * Gets the value property: Collection of secrets used by a Dapr component. - * + * * @return the value value. */ List value(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner object. - * + * * @return the inner object. */ DaprSecretsCollectionInner innerModel(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprServiceBindMetadata.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprServiceBindMetadata.java new file mode 100644 index 000000000000..db50d0768187 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprServiceBindMetadata.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Dapr component metadata. + */ +@Fluent +public final class DaprServiceBindMetadata { + /* + * Service bind metadata property name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Service bind metadata property value. + */ + @JsonProperty(value = "value") + private String value; + + /** + * Creates an instance of DaprServiceBindMetadata class. + */ + public DaprServiceBindMetadata() { + } + + /** + * Get the name property: Service bind metadata property name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Service bind metadata property name. + * + * @param name the name value to set. + * @return the DaprServiceBindMetadata object itself. + */ + public DaprServiceBindMetadata withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value property: Service bind metadata property value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Service bind metadata property value. + * + * @param value the value value to set. + * @return the DaprServiceBindMetadata object itself. + */ + public DaprServiceBindMetadata withValue(String value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscription.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscription.java new file mode 100644 index 000000000000..f5283e5b9ec8 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscription.java @@ -0,0 +1,392 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner; +import java.util.List; +import java.util.Map; + +/** + * An immutable client-side representation of DaprSubscription. + */ +public interface DaprSubscription { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the pubsubName property: Dapr PubSub component name. + * + * @return the pubsubName value. + */ + String pubsubName(); + + /** + * Gets the topic property: Topic name. + * + * @return the topic value. + */ + String topic(); + + /** + * Gets the deadLetterTopic property: Deadletter topic name. + * + * @return the deadLetterTopic value. + */ + String deadLetterTopic(); + + /** + * Gets the routes property: Subscription routes. + * + * @return the routes value. + */ + DaprSubscriptionRoutes routes(); + + /** + * Gets the scopes property: Application scopes to restrict the subscription to specific apps. + * + * @return the scopes value. + */ + List scopes(); + + /** + * Gets the metadata property: Subscription metadata. + * + * @return the metadata value. + */ + Map metadata(); + + /** + * Gets the bulkSubscribe property: Bulk subscription options. + * + * @return the bulkSubscribe value. + */ + DaprSubscriptionBulkSubscribeOptions bulkSubscribe(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner object. + * + * @return the inner object. + */ + DaprSubscriptionInner innerModel(); + + /** + * The entirety of the DaprSubscription definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The DaprSubscription definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the DaprSubscription definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the DaprSubscription definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, environmentName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @return the next definition stage. + */ + WithCreate withExistingManagedEnvironment(String resourceGroupName, String environmentName); + } + + /** + * The stage of the DaprSubscription definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithPubsubName, DefinitionStages.WithTopic, + DefinitionStages.WithDeadLetterTopic, DefinitionStages.WithRoutes, DefinitionStages.WithScopes, + DefinitionStages.WithMetadata, DefinitionStages.WithBulkSubscribe { + /** + * Executes the create request. + * + * @return the created resource. + */ + DaprSubscription create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + DaprSubscription create(Context context); + } + + /** + * The stage of the DaprSubscription definition allowing to specify pubsubName. + */ + interface WithPubsubName { + /** + * Specifies the pubsubName property: Dapr PubSub component name. + * + * @param pubsubName Dapr PubSub component name. + * @return the next definition stage. + */ + WithCreate withPubsubName(String pubsubName); + } + + /** + * The stage of the DaprSubscription definition allowing to specify topic. + */ + interface WithTopic { + /** + * Specifies the topic property: Topic name. + * + * @param topic Topic name. + * @return the next definition stage. + */ + WithCreate withTopic(String topic); + } + + /** + * The stage of the DaprSubscription definition allowing to specify deadLetterTopic. + */ + interface WithDeadLetterTopic { + /** + * Specifies the deadLetterTopic property: Deadletter topic name. + * + * @param deadLetterTopic Deadletter topic name. + * @return the next definition stage. + */ + WithCreate withDeadLetterTopic(String deadLetterTopic); + } + + /** + * The stage of the DaprSubscription definition allowing to specify routes. + */ + interface WithRoutes { + /** + * Specifies the routes property: Subscription routes. + * + * @param routes Subscription routes. + * @return the next definition stage. + */ + WithCreate withRoutes(DaprSubscriptionRoutes routes); + } + + /** + * The stage of the DaprSubscription definition allowing to specify scopes. + */ + interface WithScopes { + /** + * Specifies the scopes property: Application scopes to restrict the subscription to specific apps.. + * + * @param scopes Application scopes to restrict the subscription to specific apps. + * @return the next definition stage. + */ + WithCreate withScopes(List scopes); + } + + /** + * The stage of the DaprSubscription definition allowing to specify metadata. + */ + interface WithMetadata { + /** + * Specifies the metadata property: Subscription metadata. + * + * @param metadata Subscription metadata. + * @return the next definition stage. + */ + WithCreate withMetadata(Map metadata); + } + + /** + * The stage of the DaprSubscription definition allowing to specify bulkSubscribe. + */ + interface WithBulkSubscribe { + /** + * Specifies the bulkSubscribe property: Bulk subscription options. + * + * @param bulkSubscribe Bulk subscription options. + * @return the next definition stage. + */ + WithCreate withBulkSubscribe(DaprSubscriptionBulkSubscribeOptions bulkSubscribe); + } + } + + /** + * Begins update for the DaprSubscription resource. + * + * @return the stage of resource update. + */ + DaprSubscription.Update update(); + + /** + * The template for DaprSubscription update. + */ + interface Update extends UpdateStages.WithPubsubName, UpdateStages.WithTopic, UpdateStages.WithDeadLetterTopic, + UpdateStages.WithRoutes, UpdateStages.WithScopes, UpdateStages.WithMetadata, UpdateStages.WithBulkSubscribe { + /** + * Executes the update request. + * + * @return the updated resource. + */ + DaprSubscription apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + DaprSubscription apply(Context context); + } + + /** + * The DaprSubscription update stages. + */ + interface UpdateStages { + /** + * The stage of the DaprSubscription update allowing to specify pubsubName. + */ + interface WithPubsubName { + /** + * Specifies the pubsubName property: Dapr PubSub component name. + * + * @param pubsubName Dapr PubSub component name. + * @return the next definition stage. + */ + Update withPubsubName(String pubsubName); + } + + /** + * The stage of the DaprSubscription update allowing to specify topic. + */ + interface WithTopic { + /** + * Specifies the topic property: Topic name. + * + * @param topic Topic name. + * @return the next definition stage. + */ + Update withTopic(String topic); + } + + /** + * The stage of the DaprSubscription update allowing to specify deadLetterTopic. + */ + interface WithDeadLetterTopic { + /** + * Specifies the deadLetterTopic property: Deadletter topic name. + * + * @param deadLetterTopic Deadletter topic name. + * @return the next definition stage. + */ + Update withDeadLetterTopic(String deadLetterTopic); + } + + /** + * The stage of the DaprSubscription update allowing to specify routes. + */ + interface WithRoutes { + /** + * Specifies the routes property: Subscription routes. + * + * @param routes Subscription routes. + * @return the next definition stage. + */ + Update withRoutes(DaprSubscriptionRoutes routes); + } + + /** + * The stage of the DaprSubscription update allowing to specify scopes. + */ + interface WithScopes { + /** + * Specifies the scopes property: Application scopes to restrict the subscription to specific apps.. + * + * @param scopes Application scopes to restrict the subscription to specific apps. + * @return the next definition stage. + */ + Update withScopes(List scopes); + } + + /** + * The stage of the DaprSubscription update allowing to specify metadata. + */ + interface WithMetadata { + /** + * Specifies the metadata property: Subscription metadata. + * + * @param metadata Subscription metadata. + * @return the next definition stage. + */ + Update withMetadata(Map metadata); + } + + /** + * The stage of the DaprSubscription update allowing to specify bulkSubscribe. + */ + interface WithBulkSubscribe { + /** + * Specifies the bulkSubscribe property: Bulk subscription options. + * + * @param bulkSubscribe Bulk subscription options. + * @return the next definition stage. + */ + Update withBulkSubscribe(DaprSubscriptionBulkSubscribeOptions bulkSubscribe); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + DaprSubscription refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + DaprSubscription refresh(Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionBulkSubscribeOptions.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionBulkSubscribeOptions.java new file mode 100644 index 000000000000..75faad2981a7 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionBulkSubscribeOptions.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Dapr PubSub Bulk Subscription Options. + */ +@Fluent +public final class DaprSubscriptionBulkSubscribeOptions { + /* + * Enable bulk subscription + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * Maximum number of messages to deliver in a bulk message. + */ + @JsonProperty(value = "maxMessagesCount") + private Integer maxMessagesCount; + + /* + * Maximum duration in milliseconds to wait before a bulk message is sent to the app. + */ + @JsonProperty(value = "maxAwaitDurationMs") + private Integer maxAwaitDurationMs; + + /** + * Creates an instance of DaprSubscriptionBulkSubscribeOptions class. + */ + public DaprSubscriptionBulkSubscribeOptions() { + } + + /** + * Get the enabled property: Enable bulk subscription. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: Enable bulk subscription. + * + * @param enabled the enabled value to set. + * @return the DaprSubscriptionBulkSubscribeOptions object itself. + */ + public DaprSubscriptionBulkSubscribeOptions withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the maxMessagesCount property: Maximum number of messages to deliver in a bulk message. + * + * @return the maxMessagesCount value. + */ + public Integer maxMessagesCount() { + return this.maxMessagesCount; + } + + /** + * Set the maxMessagesCount property: Maximum number of messages to deliver in a bulk message. + * + * @param maxMessagesCount the maxMessagesCount value to set. + * @return the DaprSubscriptionBulkSubscribeOptions object itself. + */ + public DaprSubscriptionBulkSubscribeOptions withMaxMessagesCount(Integer maxMessagesCount) { + this.maxMessagesCount = maxMessagesCount; + return this; + } + + /** + * Get the maxAwaitDurationMs property: Maximum duration in milliseconds to wait before a bulk message is sent to + * the app. + * + * @return the maxAwaitDurationMs value. + */ + public Integer maxAwaitDurationMs() { + return this.maxAwaitDurationMs; + } + + /** + * Set the maxAwaitDurationMs property: Maximum duration in milliseconds to wait before a bulk message is sent to + * the app. + * + * @param maxAwaitDurationMs the maxAwaitDurationMs value to set. + * @return the DaprSubscriptionBulkSubscribeOptions object itself. + */ + public DaprSubscriptionBulkSubscribeOptions withMaxAwaitDurationMs(Integer maxAwaitDurationMs) { + this.maxAwaitDurationMs = maxAwaitDurationMs; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionRouteRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionRouteRule.java new file mode 100644 index 000000000000..d6d2bdcf1338 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionRouteRule.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Dapr Pubsub Event Subscription Route Rule is used to specify the condition for sending a message to a specific path. + */ +@Fluent +public final class DaprSubscriptionRouteRule { + /* + * The optional CEL expression used to match the event. If the match is not specified, then the route is considered + * the default. The rules are tested in the order specified, so they should be define from most-to-least specific. + * The default route should appear last in the list. + */ + @JsonProperty(value = "match") + private String match; + + /* + * The path for events that match this rule + */ + @JsonProperty(value = "path") + private String path; + + /** + * Creates an instance of DaprSubscriptionRouteRule class. + */ + public DaprSubscriptionRouteRule() { + } + + /** + * Get the match property: The optional CEL expression used to match the event. If the match is not specified, then + * the route is considered the default. The rules are tested in the order specified, so they should be define from + * most-to-least specific. The default route should appear last in the list. + * + * @return the match value. + */ + public String match() { + return this.match; + } + + /** + * Set the match property: The optional CEL expression used to match the event. If the match is not specified, then + * the route is considered the default. The rules are tested in the order specified, so they should be define from + * most-to-least specific. The default route should appear last in the list. + * + * @param match the match value to set. + * @return the DaprSubscriptionRouteRule object itself. + */ + public DaprSubscriptionRouteRule withMatch(String match) { + this.match = match; + return this; + } + + /** + * Get the path property: The path for events that match this rule. + * + * @return the path value. + */ + public String path() { + return this.path; + } + + /** + * Set the path property: The path for events that match this rule. + * + * @param path the path value to set. + * @return the DaprSubscriptionRouteRule object itself. + */ + public DaprSubscriptionRouteRule withPath(String path) { + this.path = path; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionRoutes.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionRoutes.java new file mode 100644 index 000000000000..695bdbdb1e29 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionRoutes.java @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Dapr PubSub Event Subscription Routes configuration. + */ +@Fluent +public final class DaprSubscriptionRoutes { + /* + * The list of Dapr PubSub Event Subscription Route Rules. + */ + @JsonProperty(value = "rules") + private List rules; + + /* + * The default path to deliver events that do not match any of the rules. + */ + @JsonProperty(value = "default") + private String defaultProperty; + + /** + * Creates an instance of DaprSubscriptionRoutes class. + */ + public DaprSubscriptionRoutes() { + } + + /** + * Get the rules property: The list of Dapr PubSub Event Subscription Route Rules. + * + * @return the rules value. + */ + public List rules() { + return this.rules; + } + + /** + * Set the rules property: The list of Dapr PubSub Event Subscription Route Rules. + * + * @param rules the rules value to set. + * @return the DaprSubscriptionRoutes object itself. + */ + public DaprSubscriptionRoutes withRules(List rules) { + this.rules = rules; + return this; + } + + /** + * Get the defaultProperty property: The default path to deliver events that do not match any of the rules. + * + * @return the defaultProperty value. + */ + public String defaultProperty() { + return this.defaultProperty; + } + + /** + * Set the defaultProperty property: The default path to deliver events that do not match any of the rules. + * + * @param defaultProperty the defaultProperty value to set. + * @return the DaprSubscriptionRoutes object itself. + */ + public DaprSubscriptionRoutes withDefaultProperty(String defaultProperty) { + this.defaultProperty = defaultProperty; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (rules() != null) { + rules().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptions.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptions.java new file mode 100644 index 000000000000..a7cc8cc87f40 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptions.java @@ -0,0 +1,164 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of DaprSubscriptions. + */ +public interface DaprSubscriptions { + /** + * Get the Dapr subscriptions for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Dapr subscriptions for a managed environment as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String environmentName); + + /** + * Get the Dapr subscriptions for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Dapr subscriptions for a managed environment as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String environmentName, Context context); + + /** + * Get a dapr subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a dapr subscription along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String environmentName, String name, + Context context); + + /** + * Get a dapr subscription. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a dapr subscription. + */ + DaprSubscription get(String resourceGroupName, String environmentName, String name); + + /** + * Delete a Dapr subscription. + * + * Delete a Dapr subscription from a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteWithResponse(String resourceGroupName, String environmentName, String name, Context context); + + /** + * Delete a Dapr subscription. + * + * Delete a Dapr subscription from a Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Dapr subscription. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String environmentName, String name); + + /** + * Get a dapr subscription. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a dapr subscription along with {@link Response}. + */ + DaprSubscription getById(String id); + + /** + * Get a dapr subscription. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a dapr subscription along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a Dapr subscription. + * + * Delete a Dapr subscription from a Managed Environment. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a Dapr subscription. + * + * Delete a Dapr subscription from a Managed Environment. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. + */ + Response deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new DaprSubscription resource. + * + * @param name resource name. + * @return the first stage of the new DaprSubscription definition. + */ + DaprSubscription.DefinitionStages.Blank define(String name); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionsCollection.java new file mode 100644 index 000000000000..e78b2ac2a46c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprSubscriptionsCollection.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Dapr Subscriptions ARM resource. + */ +@Fluent +public final class DaprSubscriptionsCollection { + /* + * Collection of resources. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * Link to next page of resources. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of DaprSubscriptionsCollection class. + */ + public DaprSubscriptionsCollection() { + } + + /** + * Get the value property: Collection of resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Collection of resources. + * + * @param value the value value to set. + * @return the DaprSubscriptionsCollection object itself. + */ + public DaprSubscriptionsCollection withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to next page of resources. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model DaprSubscriptionsCollection")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DaprSubscriptionsCollection.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DataDogConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DataDogConfiguration.java new file mode 100644 index 000000000000..47880887d199 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DataDogConfiguration.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Configuration of datadog. + */ +@Fluent +public final class DataDogConfiguration { + /* + * The data dog site + */ + @JsonProperty(value = "site") + private String site; + + /* + * The data dog api key + */ + @JsonProperty(value = "key") + private String key; + + /** + * Creates an instance of DataDogConfiguration class. + */ + public DataDogConfiguration() { + } + + /** + * Get the site property: The data dog site. + * + * @return the site value. + */ + public String site() { + return this.site; + } + + /** + * Set the site property: The data dog site. + * + * @param site the site value to set. + * @return the DataDogConfiguration object itself. + */ + public DataDogConfiguration withSite(String site) { + this.site = site; + return this; + } + + /** + * Get the key property: The data dog api key. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: The data dog api key. + * + * @param key the key value to set. + * @return the DataDogConfiguration object itself. + */ + public DataDogConfiguration withKey(String key) { + this.key = key; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultAuthorizationPolicy.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultAuthorizationPolicy.java index 701357e0e217..49f7b2b12bbb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultAuthorizationPolicy.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultAuthorizationPolicy.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The configuration settings of the Azure Active Directory default authorization policy. */ +/** + * The configuration settings of the Azure Active Directory default authorization policy. + */ @Fluent public final class DefaultAuthorizationPolicy { /* @@ -23,13 +25,15 @@ public final class DefaultAuthorizationPolicy { @JsonProperty(value = "allowedApplications") private List allowedApplications; - /** Creates an instance of DefaultAuthorizationPolicy class. */ + /** + * Creates an instance of DefaultAuthorizationPolicy class. + */ public DefaultAuthorizationPolicy() { } /** * Get the allowedPrincipals property: The configuration settings of the Azure Active Directory allowed principals. - * + * * @return the allowedPrincipals value. */ public AllowedPrincipals allowedPrincipals() { @@ -38,7 +42,7 @@ public AllowedPrincipals allowedPrincipals() { /** * Set the allowedPrincipals property: The configuration settings of the Azure Active Directory allowed principals. - * + * * @param allowedPrincipals the allowedPrincipals value to set. * @return the DefaultAuthorizationPolicy object itself. */ @@ -50,7 +54,7 @@ public DefaultAuthorizationPolicy withAllowedPrincipals(AllowedPrincipals allowe /** * Get the allowedApplications property: The configuration settings of the Azure Active Directory allowed * applications. - * + * * @return the allowedApplications value. */ public List allowedApplications() { @@ -60,7 +64,7 @@ public List allowedApplications() { /** * Set the allowedApplications property: The configuration settings of the Azure Active Directory allowed * applications. - * + * * @param allowedApplications the allowedApplications value to set. * @return the DefaultAuthorizationPolicy object itself. */ @@ -71,7 +75,7 @@ public DefaultAuthorizationPolicy withAllowedApplications(List allowedAp /** * 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/DefaultErrorResponseError.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseError.java index 0fd4fc04d333..a0d8564a8449 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseError.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseError.java @@ -8,7 +8,9 @@ import com.azure.core.management.exception.ManagementError; import com.fasterxml.jackson.annotation.JsonProperty; -/** App Service error response. */ +/** + * App Service error response. + */ @Immutable public final class DefaultErrorResponseError extends ManagementError { /* @@ -17,13 +19,15 @@ public final class DefaultErrorResponseError extends ManagementError { @JsonProperty(value = "innererror", access = JsonProperty.Access.WRITE_ONLY) private String innererror; - /** Creates an instance of DefaultErrorResponseError class. */ + /** + * Creates an instance of DefaultErrorResponseError class. + */ public DefaultErrorResponseError() { } /** * Get the innererror property: More information to debug error. - * + * * @return the innererror value. */ public String getInnererror() { @@ -32,7 +36,7 @@ public String getInnererror() { /** * 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/DefaultErrorResponseErrorException.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseErrorException.java index 9cfd6edb3258..9b49fecbf027 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseErrorException.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseErrorException.java @@ -7,11 +7,13 @@ import com.azure.core.http.HttpResponse; import com.azure.core.management.exception.ManagementException; -/** Exception thrown for an invalid response with DefaultErrorResponseError information. */ +/** + * Exception thrown for an invalid response with DefaultErrorResponseError information. + */ public final class DefaultErrorResponseErrorException extends ManagementException { /** * Initializes a new instance of the DefaultErrorResponseErrorException class. - * + * * @param message the exception message or the response content if a message is not available. * @param response the HTTP response. */ @@ -21,7 +23,7 @@ public DefaultErrorResponseErrorException(String message, HttpResponse response) /** * Initializes a new instance of the DefaultErrorResponseErrorException class. - * + * * @param message the exception message or the response content if a message is not available. * @param response the HTTP response. * @param value the deserialized response value. @@ -30,7 +32,9 @@ public DefaultErrorResponseErrorException(String message, HttpResponse response, super(message, response, value); } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public DefaultErrorResponseError getValue() { return (DefaultErrorResponseError) super.getValue(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DestinationsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DestinationsConfiguration.java new file mode 100644 index 000000000000..53fd75e4424b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DestinationsConfiguration.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Configuration of Open Telemetry destinations. + */ +@Fluent +public final class DestinationsConfiguration { + /* + * Open telemetry datadog destination configuration + */ + @JsonProperty(value = "dataDogConfiguration") + private DataDogConfiguration dataDogConfiguration; + + /* + * Open telemetry otlp configurations + */ + @JsonProperty(value = "otlpConfigurations") + private List otlpConfigurations; + + /** + * Creates an instance of DestinationsConfiguration class. + */ + public DestinationsConfiguration() { + } + + /** + * Get the dataDogConfiguration property: Open telemetry datadog destination configuration. + * + * @return the dataDogConfiguration value. + */ + public DataDogConfiguration dataDogConfiguration() { + return this.dataDogConfiguration; + } + + /** + * Set the dataDogConfiguration property: Open telemetry datadog destination configuration. + * + * @param dataDogConfiguration the dataDogConfiguration value to set. + * @return the DestinationsConfiguration object itself. + */ + public DestinationsConfiguration withDataDogConfiguration(DataDogConfiguration dataDogConfiguration) { + this.dataDogConfiguration = dataDogConfiguration; + return this; + } + + /** + * Get the otlpConfigurations property: Open telemetry otlp configurations. + * + * @return the otlpConfigurations value. + */ + public List otlpConfigurations() { + return this.otlpConfigurations; + } + + /** + * Set the otlpConfigurations property: Open telemetry otlp configurations. + * + * @param otlpConfigurations the otlpConfigurations value to set. + * @return the DestinationsConfiguration object itself. + */ + public DestinationsConfiguration withOtlpConfigurations(List otlpConfigurations) { + this.otlpConfigurations = otlpConfigurations; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (dataDogConfiguration() != null) { + dataDogConfiguration().validate(); + } + if (otlpConfigurations() != null) { + otlpConfigurations().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadata.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadata.java index 70380a029674..22ffbe86a162 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadata.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadata.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Details of a diagnostics data provider. */ +/** + * Details of a diagnostics data provider. + */ @Fluent public final class DiagnosticDataProviderMetadata { /* @@ -23,13 +25,15 @@ public final class DiagnosticDataProviderMetadata { @JsonProperty(value = "propertyBag") private List propertyBag; - /** Creates an instance of DiagnosticDataProviderMetadata class. */ + /** + * Creates an instance of DiagnosticDataProviderMetadata class. + */ public DiagnosticDataProviderMetadata() { } /** * Get the providerName property: Name of data provider. - * + * * @return the providerName value. */ public String providerName() { @@ -38,7 +42,7 @@ public String providerName() { /** * Set the providerName property: Name of data provider. - * + * * @param providerName the providerName value to set. * @return the DiagnosticDataProviderMetadata object itself. */ @@ -49,7 +53,7 @@ public DiagnosticDataProviderMetadata withProviderName(String providerName) { /** * Get the propertyBag property: Collection of properties. - * + * * @return the propertyBag value. */ public List propertyBag() { @@ -58,19 +62,19 @@ public List propertyBag() { /** * Set the propertyBag property: Collection of properties. - * + * * @param propertyBag the propertyBag value to set. * @return the DiagnosticDataProviderMetadata object itself. */ - public DiagnosticDataProviderMetadata withPropertyBag( - List propertyBag) { + public DiagnosticDataProviderMetadata + withPropertyBag(List propertyBag) { this.propertyBag = propertyBag; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadataPropertyBagItem.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadataPropertyBagItem.java index bc385080b743..582e1a89341b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadataPropertyBagItem.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadataPropertyBagItem.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Property details. */ +/** + * Property details. + */ @Fluent public final class DiagnosticDataProviderMetadataPropertyBagItem { /* @@ -22,13 +24,15 @@ public final class DiagnosticDataProviderMetadataPropertyBagItem { @JsonProperty(value = "value") private String value; - /** Creates an instance of DiagnosticDataProviderMetadataPropertyBagItem class. */ + /** + * Creates an instance of DiagnosticDataProviderMetadataPropertyBagItem class. + */ public DiagnosticDataProviderMetadataPropertyBagItem() { } /** * Get the name property: Property name. - * + * * @return the name value. */ public String name() { @@ -37,7 +41,7 @@ public String name() { /** * Set the name property: Property name. - * + * * @param name the name value to set. * @return the DiagnosticDataProviderMetadataPropertyBagItem object itself. */ @@ -48,7 +52,7 @@ public DiagnosticDataProviderMetadataPropertyBagItem withName(String name) { /** * Get the value property: Property value. - * + * * @return the value value. */ public String value() { @@ -57,7 +61,7 @@ public String value() { /** * Set the value property: Property value. - * + * * @param value the value value to set. * @return the DiagnosticDataProviderMetadataPropertyBagItem object itself. */ @@ -68,7 +72,7 @@ public DiagnosticDataProviderMetadataPropertyBagItem withValue(String 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/DiagnosticDataTableResponseColumn.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseColumn.java index 1379ab0e2800..4195cc5ea2f4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseColumn.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseColumn.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Diagnostics data column. */ +/** + * Diagnostics data column. + */ @Fluent public final class DiagnosticDataTableResponseColumn { /* @@ -28,13 +30,15 @@ public final class DiagnosticDataTableResponseColumn { @JsonProperty(value = "columnType") private String columnType; - /** Creates an instance of DiagnosticDataTableResponseColumn class. */ + /** + * Creates an instance of DiagnosticDataTableResponseColumn class. + */ public DiagnosticDataTableResponseColumn() { } /** * Get the columnName property: Column name. - * + * * @return the columnName value. */ public String columnName() { @@ -43,7 +47,7 @@ public String columnName() { /** * Set the columnName property: Column name. - * + * * @param columnName the columnName value to set. * @return the DiagnosticDataTableResponseColumn object itself. */ @@ -54,7 +58,7 @@ public DiagnosticDataTableResponseColumn withColumnName(String columnName) { /** * Get the dataType property: Data type of the column. - * + * * @return the dataType value. */ public String dataType() { @@ -63,7 +67,7 @@ public String dataType() { /** * Set the dataType property: Data type of the column. - * + * * @param dataType the dataType value to set. * @return the DiagnosticDataTableResponseColumn object itself. */ @@ -74,7 +78,7 @@ public DiagnosticDataTableResponseColumn withDataType(String dataType) { /** * Get the columnType property: Column type. - * + * * @return the columnType value. */ public String columnType() { @@ -83,7 +87,7 @@ public String columnType() { /** * Set the columnType property: Column type. - * + * * @param columnType the columnType value to set. * @return the DiagnosticDataTableResponseColumn object itself. */ @@ -94,7 +98,7 @@ public DiagnosticDataTableResponseColumn withColumnType(String columnType) { /** * 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/DiagnosticDataTableResponseObject.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseObject.java index 6d338c3bc35b..1f91ef838dcc 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseObject.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseObject.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Diagnostics data table. */ +/** + * Diagnostics data table. + */ @Fluent public final class DiagnosticDataTableResponseObject { /* @@ -29,13 +31,15 @@ public final class DiagnosticDataTableResponseObject { @JsonProperty(value = "rows") private List rows; - /** Creates an instance of DiagnosticDataTableResponseObject class. */ + /** + * Creates an instance of DiagnosticDataTableResponseObject class. + */ public DiagnosticDataTableResponseObject() { } /** * Get the tableName property: Table name. - * + * * @return the tableName value. */ public String tableName() { @@ -44,7 +48,7 @@ public String tableName() { /** * Set the tableName property: Table name. - * + * * @param tableName the tableName value to set. * @return the DiagnosticDataTableResponseObject object itself. */ @@ -55,7 +59,7 @@ public DiagnosticDataTableResponseObject withTableName(String tableName) { /** * Get the columns property: Columns in the table. - * + * * @return the columns value. */ public List columns() { @@ -64,7 +68,7 @@ public List columns() { /** * Set the columns property: Columns in the table. - * + * * @param columns the columns value to set. * @return the DiagnosticDataTableResponseObject object itself. */ @@ -75,7 +79,7 @@ public DiagnosticDataTableResponseObject withColumns(List rows() { @@ -84,7 +88,7 @@ public List rows() { /** * Set the rows property: Rows in the table. - * + * * @param rows the rows value to set. * @return the DiagnosticDataTableResponseObject object itself. */ @@ -95,7 +99,7 @@ public DiagnosticDataTableResponseObject withRows(List rows) { /** * 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/DiagnosticRendering.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticRendering.java index b70b85b60500..3c400d9e5fa4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticRendering.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticRendering.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Rendering details of a diagnostics table. */ +/** + * Rendering details of a diagnostics table. + */ @Fluent public final class DiagnosticRendering { /* @@ -34,13 +36,15 @@ public final class DiagnosticRendering { @JsonProperty(value = "isVisible") private Boolean isVisible; - /** Creates an instance of DiagnosticRendering class. */ + /** + * Creates an instance of DiagnosticRendering class. + */ public DiagnosticRendering() { } /** * Get the type property: Rendering type. - * + * * @return the type value. */ public Integer type() { @@ -49,7 +53,7 @@ public Integer type() { /** * Set the type property: Rendering type. - * + * * @param type the type value to set. * @return the DiagnosticRendering object itself. */ @@ -60,7 +64,7 @@ public DiagnosticRendering withType(Integer type) { /** * Get the title property: Title of the table. - * + * * @return the title value. */ public String title() { @@ -69,7 +73,7 @@ public String title() { /** * Set the title property: Title of the table. - * + * * @param title the title value to set. * @return the DiagnosticRendering object itself. */ @@ -80,7 +84,7 @@ public DiagnosticRendering withTitle(String title) { /** * Get the description property: Description of the table. - * + * * @return the description value. */ public String description() { @@ -89,7 +93,7 @@ public String description() { /** * Set the description property: Description of the table. - * + * * @param description the description value to set. * @return the DiagnosticRendering object itself. */ @@ -100,7 +104,7 @@ public DiagnosticRendering withDescription(String description) { /** * Get the isVisible property: Flag if the table should be rendered. - * + * * @return the isVisible value. */ public Boolean isVisible() { @@ -109,7 +113,7 @@ public Boolean isVisible() { /** * Set the isVisible property: Flag if the table should be rendered. - * + * * @param isVisible the isVisible value to set. * @return the DiagnosticRendering object itself. */ @@ -120,7 +124,7 @@ public DiagnosticRendering withIsVisible(Boolean isVisible) { /** * 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/DiagnosticSupportTopic.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticSupportTopic.java index db92218e5f06..ece2fd3fa51e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticSupportTopic.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticSupportTopic.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Support topic information. */ +/** + * Support topic information. + */ @Immutable public final class DiagnosticSupportTopic { /* @@ -22,13 +24,15 @@ public final class DiagnosticSupportTopic { @JsonProperty(value = "pesId", access = JsonProperty.Access.WRITE_ONLY) private String pesId; - /** Creates an instance of DiagnosticSupportTopic class. */ + /** + * Creates an instance of DiagnosticSupportTopic class. + */ public DiagnosticSupportTopic() { } /** * Get the id property: Unique topic identifier. - * + * * @return the id value. */ public String id() { @@ -37,7 +41,7 @@ public String id() { /** * Get the pesId property: PES identifier. - * + * * @return the pesId value. */ public String pesId() { @@ -46,7 +50,7 @@ public String pesId() { /** * 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/Diagnostics.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Diagnostics.java index 73bed89218f1..fb32bde4a6b7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Diagnostics.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Diagnostics.java @@ -4,41 +4,51 @@ package com.azure.resourcemanager.appcontainers.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -/** An immutable client-side representation of Diagnostics. */ +/** + * An immutable client-side representation of Diagnostics. + */ public interface Diagnostics { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the properties property: Diagnostics resource specific properties. - * + * * @return the properties value. */ DiagnosticsProperties properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner object. - * + * * @return the inner object. */ DiagnosticsInner innerModel(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsCollection.java index 855f169b1bca..74cc7c4d5bd0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsCollection.java @@ -7,25 +7,27 @@ import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; import java.util.List; -/** An immutable client-side representation of DiagnosticsCollection. */ +/** + * An immutable client-side representation of DiagnosticsCollection. + */ public interface DiagnosticsCollection { /** * Gets the value property: Collection of diagnostic data. - * + * * @return the value value. */ List value(); /** * Gets the nextLink property: Link to next page of resources. - * + * * @return the nextLink value. */ String nextLink(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner object. - * + * * @return the inner object. */ DiagnosticsCollectionInner innerModel(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDataApiResponse.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDataApiResponse.java index dcfb30eb74e9..287125a29abd 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDataApiResponse.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDataApiResponse.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Diagnostics data returned from a detector. */ +/** + * Diagnostics data returned from a detector. + */ @Fluent public final class DiagnosticsDataApiResponse { /* @@ -22,13 +24,15 @@ public final class DiagnosticsDataApiResponse { @JsonProperty(value = "renderingProperties") private DiagnosticRendering renderingProperties; - /** Creates an instance of DiagnosticsDataApiResponse class. */ + /** + * Creates an instance of DiagnosticsDataApiResponse class. + */ public DiagnosticsDataApiResponse() { } /** * Get the table property: Table response. - * + * * @return the table value. */ public DiagnosticDataTableResponseObject table() { @@ -37,7 +41,7 @@ public DiagnosticDataTableResponseObject table() { /** * Set the table property: Table response. - * + * * @param table the table value to set. * @return the DiagnosticsDataApiResponse object itself. */ @@ -48,7 +52,7 @@ public DiagnosticsDataApiResponse withTable(DiagnosticDataTableResponseObject ta /** * Get the renderingProperties property: Details of the table response. - * + * * @return the renderingProperties value. */ public DiagnosticRendering renderingProperties() { @@ -57,7 +61,7 @@ public DiagnosticRendering renderingProperties() { /** * Set the renderingProperties property: Details of the table response. - * + * * @param renderingProperties the renderingProperties value to set. * @return the DiagnosticsDataApiResponse object itself. */ @@ -68,7 +72,7 @@ public DiagnosticsDataApiResponse withRenderingProperties(DiagnosticRendering re /** * 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/DiagnosticsDefinition.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDefinition.java index 0be766b4afb6..8d3046762ba6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDefinition.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDefinition.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Metadata of the diagnostics response. */ +/** + * Metadata of the diagnostics response. + */ @Fluent public final class DiagnosticsDefinition { /* @@ -65,13 +67,15 @@ public final class DiagnosticsDefinition { @JsonProperty(value = "score", access = JsonProperty.Access.WRITE_ONLY) private Float score; - /** Creates an instance of DiagnosticsDefinition class. */ + /** + * Creates an instance of DiagnosticsDefinition class. + */ public DiagnosticsDefinition() { } /** * Get the id property: Unique detector name. - * + * * @return the id value. */ public String id() { @@ -80,7 +84,7 @@ public String id() { /** * Get the name property: Display Name of the detector. - * + * * @return the name value. */ public String name() { @@ -89,7 +93,7 @@ public String name() { /** * Get the description property: Details of the diagnostics info. - * + * * @return the description value. */ public String description() { @@ -98,7 +102,7 @@ public String description() { /** * Get the author property: Authors' names of the detector. - * + * * @return the author value. */ public String author() { @@ -107,7 +111,7 @@ public String author() { /** * Get the category property: Category of the detector. - * + * * @return the category value. */ public String category() { @@ -116,7 +120,7 @@ public String category() { /** * Get the supportTopicList property: List of support topics. - * + * * @return the supportTopicList value. */ public List supportTopicList() { @@ -125,7 +129,7 @@ public List supportTopicList() { /** * Set the supportTopicList property: List of support topics. - * + * * @param supportTopicList the supportTopicList value to set. * @return the DiagnosticsDefinition object itself. */ @@ -136,7 +140,7 @@ public DiagnosticsDefinition withSupportTopicList(List s /** * Get the analysisTypes property: List of analysis types. - * + * * @return the analysisTypes value. */ public List analysisTypes() { @@ -145,7 +149,7 @@ public List analysisTypes() { /** * Set the analysisTypes property: List of analysis types. - * + * * @param analysisTypes the analysisTypes value to set. * @return the DiagnosticsDefinition object itself. */ @@ -156,7 +160,7 @@ public DiagnosticsDefinition withAnalysisTypes(List analysisTypes) { /** * Get the type property: Authors' names of the detector. - * + * * @return the type value. */ public String type() { @@ -165,7 +169,7 @@ public String type() { /** * Get the score property: Authors' names of the detector. - * + * * @return the score value. */ public Float score() { @@ -174,7 +178,7 @@ public Float score() { /** * 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/DiagnosticsProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsProperties.java index f0edd43a932b..012915c98278 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsProperties.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Diagnostics resource specific properties. */ +/** + * Diagnostics resource specific properties. + */ @Fluent public final class DiagnosticsProperties { /* @@ -35,13 +37,15 @@ public final class DiagnosticsProperties { @JsonProperty(value = "dataProviderMetadata") private DiagnosticDataProviderMetadata dataProviderMetadata; - /** Creates an instance of DiagnosticsProperties class. */ + /** + * Creates an instance of DiagnosticsProperties class. + */ public DiagnosticsProperties() { } /** * Get the metadata property: Metadata of the diagnostics response. - * + * * @return the metadata value. */ public DiagnosticsDefinition metadata() { @@ -50,7 +54,7 @@ public DiagnosticsDefinition metadata() { /** * Set the metadata property: Metadata of the diagnostics response. - * + * * @param metadata the metadata value to set. * @return the DiagnosticsProperties object itself. */ @@ -61,7 +65,7 @@ public DiagnosticsProperties withMetadata(DiagnosticsDefinition metadata) { /** * Get the dataset property: Set of data collections associated with the response. - * + * * @return the dataset value. */ public List dataset() { @@ -70,7 +74,7 @@ public List dataset() { /** * Set the dataset property: Set of data collections associated with the response. - * + * * @param dataset the dataset value to set. * @return the DiagnosticsProperties object itself. */ @@ -81,7 +85,7 @@ public DiagnosticsProperties withDataset(List datase /** * Get the status property: Status of the diagnostics response. - * + * * @return the status value. */ public DiagnosticsStatus status() { @@ -90,7 +94,7 @@ public DiagnosticsStatus status() { /** * Set the status property: Status of the diagnostics response. - * + * * @param status the status value to set. * @return the DiagnosticsProperties object itself. */ @@ -101,7 +105,7 @@ public DiagnosticsProperties withStatus(DiagnosticsStatus status) { /** * Get the dataProviderMetadata property: List of data providers' metadata. - * + * * @return the dataProviderMetadata value. */ public DiagnosticDataProviderMetadata dataProviderMetadata() { @@ -110,7 +114,7 @@ public DiagnosticDataProviderMetadata dataProviderMetadata() { /** * Set the dataProviderMetadata property: List of data providers' metadata. - * + * * @param dataProviderMetadata the dataProviderMetadata value to set. * @return the DiagnosticsProperties object itself. */ @@ -121,7 +125,7 @@ public DiagnosticsProperties withDataProviderMetadata(DiagnosticDataProviderMeta /** * 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/DiagnosticsStatus.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsStatus.java index 899d1bffb395..1379a4992d57 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsStatus.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsStatus.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Rendering details of a diagnostics table. */ +/** + * Rendering details of a diagnostics table. + */ @Fluent public final class DiagnosticsStatus { /* @@ -22,13 +24,15 @@ public final class DiagnosticsStatus { @JsonProperty(value = "statusId") private Integer statusId; - /** Creates an instance of DiagnosticsStatus class. */ + /** + * Creates an instance of DiagnosticsStatus class. + */ public DiagnosticsStatus() { } /** * Get the message property: Diagnostic message. - * + * * @return the message value. */ public String message() { @@ -37,7 +41,7 @@ public String message() { /** * Set the message property: Diagnostic message. - * + * * @param message the message value to set. * @return the DiagnosticsStatus object itself. */ @@ -48,7 +52,7 @@ public DiagnosticsStatus withMessage(String message) { /** * Get the statusId property: Status. - * + * * @return the statusId value. */ public Integer statusId() { @@ -57,7 +61,7 @@ public Integer statusId() { /** * Set the statusId property: Status. - * + * * @param statusId the statusId value to set. * @return the DiagnosticsStatus object itself. */ @@ -68,7 +72,7 @@ public DiagnosticsStatus withStatusId(Integer statusId) { /** * 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/DnsVerificationTestResult.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DnsVerificationTestResult.java index be7d141905d1..65a02dd71aeb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DnsVerificationTestResult.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DnsVerificationTestResult.java @@ -7,18 +7,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** DNS verification test result. */ +/** + * DNS verification test result. + */ public enum DnsVerificationTestResult { - /** Enum value Passed. */ + /** + * Enum value Passed. + */ PASSED("Passed"), - /** Enum value Failed. */ + /** + * Enum value Failed. + */ FAILED("Failed"), - /** Enum value Skipped. */ + /** + * Enum value Skipped. + */ SKIPPED("Skipped"); - /** The actual serialized value for a DnsVerificationTestResult instance. */ + /** + * The actual serialized value for a DnsVerificationTestResult instance. + */ private final String value; DnsVerificationTestResult(String value) { @@ -27,7 +37,7 @@ public enum DnsVerificationTestResult { /** * Parses a serialized value to a DnsVerificationTestResult instance. - * + * * @param value the serialized value to parse. * @return the parsed DnsVerificationTestResult object, or null if unable to parse. */ @@ -45,7 +55,9 @@ public static DnsVerificationTestResult fromString(String value) { return null; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @JsonValue @Override public String toString() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponent.java new file mode 100644 index 000000000000..6b1f7daa5772 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponent.java @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner; +import java.util.List; + +/** + * An immutable client-side representation of DotNetComponent. + */ +public interface DotNetComponent { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the componentType property: Type of the .NET Component. + * + * @return the componentType value. + */ + DotNetComponentType componentType(); + + /** + * Gets the provisioningState property: Provisioning state of the .NET Component. + * + * @return the provisioningState value. + */ + DotNetComponentProvisioningState provisioningState(); + + /** + * Gets the configurations property: List of .NET Components configuration properties. + * + * @return the configurations value. + */ + List configurations(); + + /** + * Gets the serviceBinds property: List of .NET Components that are bound to the .NET component. + * + * @return the serviceBinds value. + */ + List serviceBinds(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner object. + * + * @return the inner object. + */ + DotNetComponentInner innerModel(); + + /** + * The entirety of the DotNetComponent definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The DotNetComponent definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the DotNetComponent definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the DotNetComponent definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, environmentName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @return the next definition stage. + */ + WithCreate withExistingManagedEnvironment(String resourceGroupName, String environmentName); + } + + /** + * The stage of the DotNetComponent definition which contains all the minimum required properties for the + * resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithComponentType, DefinitionStages.WithConfigurations, + DefinitionStages.WithServiceBinds { + /** + * Executes the create request. + * + * @return the created resource. + */ + DotNetComponent create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + DotNetComponent create(Context context); + } + + /** + * The stage of the DotNetComponent definition allowing to specify componentType. + */ + interface WithComponentType { + /** + * Specifies the componentType property: Type of the .NET Component.. + * + * @param componentType Type of the .NET Component. + * @return the next definition stage. + */ + WithCreate withComponentType(DotNetComponentType componentType); + } + + /** + * The stage of the DotNetComponent definition allowing to specify configurations. + */ + interface WithConfigurations { + /** + * Specifies the configurations property: List of .NET Components configuration properties. + * + * @param configurations List of .NET Components configuration properties. + * @return the next definition stage. + */ + WithCreate withConfigurations(List configurations); + } + + /** + * The stage of the DotNetComponent definition allowing to specify serviceBinds. + */ + interface WithServiceBinds { + /** + * Specifies the serviceBinds property: List of .NET Components that are bound to the .NET component. + * + * @param serviceBinds List of .NET Components that are bound to the .NET component. + * @return the next definition stage. + */ + WithCreate withServiceBinds(List serviceBinds); + } + } + + /** + * Begins update for the DotNetComponent resource. + * + * @return the stage of resource update. + */ + DotNetComponent.Update update(); + + /** + * The template for DotNetComponent update. + */ + interface Update + extends UpdateStages.WithComponentType, UpdateStages.WithConfigurations, UpdateStages.WithServiceBinds { + /** + * Executes the update request. + * + * @return the updated resource. + */ + DotNetComponent apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + DotNetComponent apply(Context context); + } + + /** + * The DotNetComponent update stages. + */ + interface UpdateStages { + /** + * The stage of the DotNetComponent update allowing to specify componentType. + */ + interface WithComponentType { + /** + * Specifies the componentType property: Type of the .NET Component.. + * + * @param componentType Type of the .NET Component. + * @return the next definition stage. + */ + Update withComponentType(DotNetComponentType componentType); + } + + /** + * The stage of the DotNetComponent update allowing to specify configurations. + */ + interface WithConfigurations { + /** + * Specifies the configurations property: List of .NET Components configuration properties. + * + * @param configurations List of .NET Components configuration properties. + * @return the next definition stage. + */ + Update withConfigurations(List configurations); + } + + /** + * The stage of the DotNetComponent update allowing to specify serviceBinds. + */ + interface WithServiceBinds { + /** + * Specifies the serviceBinds property: List of .NET Components that are bound to the .NET component. + * + * @param serviceBinds List of .NET Components that are bound to the .NET component. + * @return the next definition stage. + */ + Update withServiceBinds(List serviceBinds); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + DotNetComponent refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + DotNetComponent refresh(Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentConfigurationProperty.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentConfigurationProperty.java new file mode 100644 index 000000000000..9a529ae5766f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentConfigurationProperty.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Configuration properties for a .NET Component. + */ +@Fluent +public final class DotNetComponentConfigurationProperty { + /* + * The name of the property + */ + @JsonProperty(value = "propertyName") + private String propertyName; + + /* + * The value of the property + */ + @JsonProperty(value = "value") + private String value; + + /** + * Creates an instance of DotNetComponentConfigurationProperty class. + */ + public DotNetComponentConfigurationProperty() { + } + + /** + * Get the propertyName property: The name of the property. + * + * @return the propertyName value. + */ + public String propertyName() { + return this.propertyName; + } + + /** + * Set the propertyName property: The name of the property. + * + * @param propertyName the propertyName value to set. + * @return the DotNetComponentConfigurationProperty object itself. + */ + public DotNetComponentConfigurationProperty withPropertyName(String propertyName) { + this.propertyName = propertyName; + return this; + } + + /** + * Get the value property: The value of the property. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: The value of the property. + * + * @param value the value value to set. + * @return the DotNetComponentConfigurationProperty object itself. + */ + public DotNetComponentConfigurationProperty withValue(String value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentProvisioningState.java new file mode 100644 index 000000000000..eaffcc2516bc --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentProvisioningState.java @@ -0,0 +1,68 @@ +// Copyright (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; + +/** + * Provisioning state of the .NET Component. + */ +public final class DotNetComponentProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for DotNetComponentProvisioningState. + */ + public static final DotNetComponentProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for DotNetComponentProvisioningState. + */ + public static final DotNetComponentProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for DotNetComponentProvisioningState. + */ + public static final DotNetComponentProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Deleting for DotNetComponentProvisioningState. + */ + public static final DotNetComponentProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value InProgress for DotNetComponentProvisioningState. + */ + public static final DotNetComponentProvisioningState IN_PROGRESS = fromString("InProgress"); + + /** + * Creates a new instance of DotNetComponentProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DotNetComponentProvisioningState() { + } + + /** + * Creates or finds a DotNetComponentProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding DotNetComponentProvisioningState. + */ + @JsonCreator + public static DotNetComponentProvisioningState fromString(String name) { + return fromString(name, DotNetComponentProvisioningState.class); + } + + /** + * Gets known DotNetComponentProvisioningState values. + * + * @return known DotNetComponentProvisioningState values. + */ + public static Collection values() { + return values(DotNetComponentProvisioningState.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentServiceBind.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentServiceBind.java new file mode 100644 index 000000000000..88f33359f483 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentServiceBind.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Configuration to bind a .NET Component to another .NET Component. + */ +@Fluent +public final class DotNetComponentServiceBind { + /* + * Name of the service bind + */ + @JsonProperty(value = "name") + private String name; + + /* + * Resource id of the target service + */ + @JsonProperty(value = "serviceId") + private String serviceId; + + /** + * Creates an instance of DotNetComponentServiceBind class. + */ + public DotNetComponentServiceBind() { + } + + /** + * Get the name property: Name of the service bind. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the service bind. + * + * @param name the name value to set. + * @return the DotNetComponentServiceBind object itself. + */ + public DotNetComponentServiceBind withName(String name) { + this.name = name; + return this; + } + + /** + * Get the serviceId property: Resource id of the target service. + * + * @return the serviceId value. + */ + public String serviceId() { + return this.serviceId; + } + + /** + * Set the serviceId property: Resource id of the target service. + * + * @param serviceId the serviceId value to set. + * @return the DotNetComponentServiceBind object itself. + */ + public DotNetComponentServiceBind withServiceId(String serviceId) { + this.serviceId = serviceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentType.java new file mode 100644 index 000000000000..9d1346962f4f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentType.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Type of the .NET Component. + */ +public final class DotNetComponentType extends ExpandableStringEnum { + /** + * Static value AspireDashboard for DotNetComponentType. + */ + public static final DotNetComponentType ASPIRE_DASHBOARD = fromString("AspireDashboard"); + + /** + * Static value AspireResourceServerApi for DotNetComponentType. + */ + public static final DotNetComponentType ASPIRE_RESOURCE_SERVER_API = fromString("AspireResourceServerApi"); + + /** + * Creates a new instance of DotNetComponentType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public DotNetComponentType() { + } + + /** + * Creates or finds a DotNetComponentType from its string representation. + * + * @param name a name to look for. + * @return the corresponding DotNetComponentType. + */ + @JsonCreator + public static DotNetComponentType fromString(String name) { + return fromString(name, DotNetComponentType.class); + } + + /** + * Gets known DotNetComponentType values. + * + * @return known DotNetComponentType values. + */ + public static Collection values() { + return values(DotNetComponentType.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponents.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponents.java new file mode 100644 index 000000000000..18177c70e586 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponents.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of DotNetComponents. + */ +public interface DotNetComponents { + /** + * Get the .NET Components for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the .NET Components for a managed environment as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String environmentName); + + /** + * Get the .NET Components for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the .NET Components for a managed environment as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String environmentName, Context context); + + /** + * Get a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a .NET Component along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String environmentName, String name, + Context context); + + /** + * Get a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a .NET Component. + */ + DotNetComponent get(String resourceGroupName, String environmentName, String name); + + /** + * Delete a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String environmentName, String name); + + /** + * Delete a .NET Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the .NET Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String environmentName, String name, Context context); + + /** + * Get a .NET Component. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a .NET Component along with {@link Response}. + */ + DotNetComponent getById(String id); + + /** + * Get a .NET Component. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a .NET Component along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a .NET Component. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a .NET Component. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new DotNetComponent resource. + * + * @param name resource name. + * @return the first stage of the new DotNetComponent definition. + */ + DotNetComponent.DefinitionStages.Blank define(String name); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentsCollection.java new file mode 100644 index 000000000000..bd61c158ab4d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DotNetComponentsCollection.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * .NET Components ARM resource. + */ +@Fluent +public final class DotNetComponentsCollection { + /* + * Collection of resources. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * Link to next page of resources. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of DotNetComponentsCollection class. + */ + public DotNetComponentsCollection() { + } + + /** + * Get the value property: Collection of resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Collection of resources. + * + * @param value the value value to set. + * @return the DotNetComponentsCollection object itself. + */ + public DotNetComponentsCollection withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to next page of resources. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model DotNetComponentsCollection")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DotNetComponentsCollection.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EncryptionSettings.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EncryptionSettings.java new file mode 100644 index 000000000000..57068af0e0d4 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EncryptionSettings.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The configuration settings of the secrets references of encryption key and signing key for ContainerApp Service + * Authentication/Authorization. + */ +@Fluent +public final class EncryptionSettings { + /* + * The secret name which is referenced for EncryptionKey. + */ + @JsonProperty(value = "containerAppAuthEncryptionSecretName") + private String containerAppAuthEncryptionSecretName; + + /* + * The secret name which is referenced for SigningKey. + */ + @JsonProperty(value = "containerAppAuthSigningSecretName") + private String containerAppAuthSigningSecretName; + + /** + * Creates an instance of EncryptionSettings class. + */ + public EncryptionSettings() { + } + + /** + * Get the containerAppAuthEncryptionSecretName property: The secret name which is referenced for EncryptionKey. + * + * @return the containerAppAuthEncryptionSecretName value. + */ + public String containerAppAuthEncryptionSecretName() { + return this.containerAppAuthEncryptionSecretName; + } + + /** + * Set the containerAppAuthEncryptionSecretName property: The secret name which is referenced for EncryptionKey. + * + * @param containerAppAuthEncryptionSecretName the containerAppAuthEncryptionSecretName value to set. + * @return the EncryptionSettings object itself. + */ + public EncryptionSettings withContainerAppAuthEncryptionSecretName(String containerAppAuthEncryptionSecretName) { + this.containerAppAuthEncryptionSecretName = containerAppAuthEncryptionSecretName; + return this; + } + + /** + * Get the containerAppAuthSigningSecretName property: The secret name which is referenced for SigningKey. + * + * @return the containerAppAuthSigningSecretName value. + */ + public String containerAppAuthSigningSecretName() { + return this.containerAppAuthSigningSecretName; + } + + /** + * Set the containerAppAuthSigningSecretName property: The secret name which is referenced for SigningKey. + * + * @param containerAppAuthSigningSecretName the containerAppAuthSigningSecretName value to set. + * @return the EncryptionSettings object itself. + */ + public EncryptionSettings withContainerAppAuthSigningSecretName(String containerAppAuthSigningSecretName) { + this.containerAppAuthSigningSecretName = containerAppAuthSigningSecretName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentAuthToken.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentAuthToken.java index 10f4f38fd2fe..46933f2d9ed0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentAuthToken.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentAuthToken.java @@ -9,67 +9,69 @@ import java.time.OffsetDateTime; import java.util.Map; -/** An immutable client-side representation of EnvironmentAuthToken. */ +/** + * An immutable client-side representation of EnvironmentAuthToken. + */ public interface EnvironmentAuthToken { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the token property: Auth token value. - * + * * @return the token value. */ String token(); /** * Gets the expires property: Token expiration date. - * + * * @return the expires value. */ OffsetDateTime expires(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.EnvironmentAuthTokenInner object. - * + * * @return the inner object. */ EnvironmentAuthTokenInner innerModel(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentProvisioningState.java index b7b9a41cdc28..255c3a14cf5a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentProvisioningState.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentProvisioningState.java @@ -8,44 +8,66 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Provisioning state of the Environment. */ +/** + * Provisioning state of the Environment. + */ public final class EnvironmentProvisioningState extends ExpandableStringEnum { - /** Static value Succeeded for EnvironmentProvisioningState. */ + /** + * Static value Succeeded for EnvironmentProvisioningState. + */ public static final EnvironmentProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for EnvironmentProvisioningState. */ + /** + * Static value Failed for EnvironmentProvisioningState. + */ public static final EnvironmentProvisioningState FAILED = fromString("Failed"); - /** Static value Canceled for EnvironmentProvisioningState. */ + /** + * Static value Canceled for EnvironmentProvisioningState. + */ public static final EnvironmentProvisioningState CANCELED = fromString("Canceled"); - /** Static value Waiting for EnvironmentProvisioningState. */ + /** + * Static value Waiting for EnvironmentProvisioningState. + */ public static final EnvironmentProvisioningState WAITING = fromString("Waiting"); - /** Static value InitializationInProgress for EnvironmentProvisioningState. */ - public static final EnvironmentProvisioningState INITIALIZATION_IN_PROGRESS = - fromString("InitializationInProgress"); + /** + * Static value InitializationInProgress for EnvironmentProvisioningState. + */ + public static final EnvironmentProvisioningState INITIALIZATION_IN_PROGRESS + = fromString("InitializationInProgress"); - /** Static value InfrastructureSetupInProgress for EnvironmentProvisioningState. */ - public static final EnvironmentProvisioningState INFRASTRUCTURE_SETUP_IN_PROGRESS = - fromString("InfrastructureSetupInProgress"); + /** + * Static value InfrastructureSetupInProgress for EnvironmentProvisioningState. + */ + public static final EnvironmentProvisioningState INFRASTRUCTURE_SETUP_IN_PROGRESS + = fromString("InfrastructureSetupInProgress"); - /** Static value InfrastructureSetupComplete for EnvironmentProvisioningState. */ - public static final EnvironmentProvisioningState INFRASTRUCTURE_SETUP_COMPLETE = - fromString("InfrastructureSetupComplete"); + /** + * Static value InfrastructureSetupComplete for EnvironmentProvisioningState. + */ + public static final EnvironmentProvisioningState INFRASTRUCTURE_SETUP_COMPLETE + = fromString("InfrastructureSetupComplete"); - /** Static value ScheduledForDelete for EnvironmentProvisioningState. */ + /** + * Static value ScheduledForDelete for EnvironmentProvisioningState. + */ public static final EnvironmentProvisioningState SCHEDULED_FOR_DELETE = fromString("ScheduledForDelete"); - /** Static value UpgradeRequested for EnvironmentProvisioningState. */ + /** + * Static value UpgradeRequested for EnvironmentProvisioningState. + */ public static final EnvironmentProvisioningState UPGRADE_REQUESTED = fromString("UpgradeRequested"); - /** Static value UpgradeFailed for EnvironmentProvisioningState. */ + /** + * Static value UpgradeFailed for EnvironmentProvisioningState. + */ public static final EnvironmentProvisioningState UPGRADE_FAILED = fromString("UpgradeFailed"); /** * Creates a new instance of EnvironmentProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -54,7 +76,7 @@ public EnvironmentProvisioningState() { /** * Creates or finds a EnvironmentProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding EnvironmentProvisioningState. */ @@ -65,7 +87,7 @@ public static EnvironmentProvisioningState fromString(String name) { /** * Gets known EnvironmentProvisioningState values. - * + * * @return known EnvironmentProvisioningState values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentVar.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentVar.java index 415303a593df..4355fee30854 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentVar.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentVar.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Container App container environment variable. */ +/** + * Container App container environment variable. + */ @Fluent public final class EnvironmentVar { /* @@ -28,13 +30,15 @@ public final class EnvironmentVar { @JsonProperty(value = "secretRef") private String secretRef; - /** Creates an instance of EnvironmentVar class. */ + /** + * Creates an instance of EnvironmentVar class. + */ public EnvironmentVar() { } /** * Get the name property: Environment variable name. - * + * * @return the name value. */ public String name() { @@ -43,7 +47,7 @@ public String name() { /** * Set the name property: Environment variable name. - * + * * @param name the name value to set. * @return the EnvironmentVar object itself. */ @@ -54,7 +58,7 @@ public EnvironmentVar withName(String name) { /** * Get the value property: Non-secret environment variable value. - * + * * @return the value value. */ public String value() { @@ -63,7 +67,7 @@ public String value() { /** * Set the value property: Non-secret environment variable value. - * + * * @param value the value value to set. * @return the EnvironmentVar object itself. */ @@ -74,7 +78,7 @@ public EnvironmentVar withValue(String value) { /** * Get the secretRef property: Name of the Container App secret from which to pull the environment variable value. - * + * * @return the secretRef value. */ public String secretRef() { @@ -83,7 +87,7 @@ public String secretRef() { /** * Set the secretRef property: Name of the Container App secret from which to pull the environment variable value. - * + * * @param secretRef the secretRef value to set. * @return the EnvironmentVar object itself. */ @@ -94,7 +98,7 @@ public EnvironmentVar withSecretRef(String secretRef) { /** * 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/EnvironmentVariable.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentVariable.java new file mode 100644 index 000000000000..0e8c6c43c8f2 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentVariable.java @@ -0,0 +1,91 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Model representing an environment variable. + */ +@Fluent +public final class EnvironmentVariable { + /* + * Environment variable name. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * Environment variable value. + */ + @JsonProperty(value = "value", required = true) + private String value; + + /** + * Creates an instance of EnvironmentVariable class. + */ + public EnvironmentVariable() { + } + + /** + * Get the name property: Environment variable name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Environment variable name. + * + * @param name the name value to set. + * @return the EnvironmentVariable object itself. + */ + public EnvironmentVariable withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value property: Environment variable value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Environment variable value. + * + * @param value the value value to set. + * @return the EnvironmentVariable object itself. + */ + public EnvironmentVariable withValue(String value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property name in model EnvironmentVariable")); + } + if (value() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model EnvironmentVariable")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EnvironmentVariable.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocation.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocation.java index 01baaa9fa9f5..8bb445ea86da 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocation.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocation.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The complex type of the extended location. */ +/** + * The complex type of the extended location. + */ @Fluent public final class ExtendedLocation { /* @@ -22,13 +24,15 @@ public final class ExtendedLocation { @JsonProperty(value = "type") private ExtendedLocationTypes type; - /** Creates an instance of ExtendedLocation class. */ + /** + * Creates an instance of ExtendedLocation class. + */ public ExtendedLocation() { } /** * Get the name property: The name of the extended location. - * + * * @return the name value. */ public String name() { @@ -37,7 +41,7 @@ public String name() { /** * Set the name property: The name of the extended location. - * + * * @param name the name value to set. * @return the ExtendedLocation object itself. */ @@ -48,7 +52,7 @@ public ExtendedLocation withName(String name) { /** * Get the type property: The type of the extended location. - * + * * @return the type value. */ public ExtendedLocationTypes type() { @@ -57,7 +61,7 @@ public ExtendedLocationTypes type() { /** * Set the type property: The type of the extended location. - * + * * @param type the type value to set. * @return the ExtendedLocation object itself. */ @@ -68,7 +72,7 @@ public ExtendedLocation withType(ExtendedLocationTypes type) { /** * 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/ExtendedLocationTypes.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocationTypes.java index cabf1439ca64..fc9716ab3040 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocationTypes.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocationTypes.java @@ -8,14 +8,18 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The type of extendedLocation. */ +/** + * The type of extendedLocation. + */ public final class ExtendedLocationTypes extends ExpandableStringEnum { - /** Static value CustomLocation for ExtendedLocationTypes. */ + /** + * Static value CustomLocation for ExtendedLocationTypes. + */ public static final ExtendedLocationTypes CUSTOM_LOCATION = fromString("CustomLocation"); /** * Creates a new instance of ExtendedLocationTypes value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -24,7 +28,7 @@ public ExtendedLocationTypes() { /** * Creates or finds a ExtendedLocationTypes from its string representation. - * + * * @param name a name to look for. * @return the corresponding ExtendedLocationTypes. */ @@ -35,7 +39,7 @@ public static ExtendedLocationTypes fromString(String name) { /** * Gets known ExtendedLocationTypes values. - * + * * @return known ExtendedLocationTypes values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Facebook.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Facebook.java index 217ee0f35166..6eebc6093dd5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Facebook.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Facebook.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The configuration settings of the Facebook provider. */ +/** + * The configuration settings of the Facebook provider. + */ @Fluent public final class Facebook { /* @@ -35,14 +37,16 @@ public final class Facebook { @JsonProperty(value = "login") private LoginScopes login; - /** Creates an instance of Facebook class. */ + /** + * Creates an instance of Facebook class. + */ public Facebook() { } /** * Get the enabled property: <code>false</code> if the Facebook provider should not be enabled despite * the set registration; otherwise, <code>true</code>. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -52,7 +56,7 @@ public Boolean enabled() { /** * Set the enabled property: <code>false</code> if the Facebook provider should not be enabled despite * the set registration; otherwise, <code>true</code>. - * + * * @param enabled the enabled value to set. * @return the Facebook object itself. */ @@ -63,7 +67,7 @@ public Facebook withEnabled(Boolean enabled) { /** * Get the registration property: The configuration settings of the app registration for the Facebook provider. - * + * * @return the registration value. */ public AppRegistration registration() { @@ -72,7 +76,7 @@ public AppRegistration registration() { /** * Set the registration property: The configuration settings of the app registration for the Facebook provider. - * + * * @param registration the registration value to set. * @return the Facebook object itself. */ @@ -83,7 +87,7 @@ public Facebook withRegistration(AppRegistration registration) { /** * Get the graphApiVersion property: The version of the Facebook api to be used while logging in. - * + * * @return the graphApiVersion value. */ public String graphApiVersion() { @@ -92,7 +96,7 @@ public String graphApiVersion() { /** * Set the graphApiVersion property: The version of the Facebook api to be used while logging in. - * + * * @param graphApiVersion the graphApiVersion value to set. * @return the Facebook object itself. */ @@ -103,7 +107,7 @@ public Facebook withGraphApiVersion(String graphApiVersion) { /** * Get the login property: The configuration settings of the login flow. - * + * * @return the login value. */ public LoginScopes login() { @@ -112,7 +116,7 @@ public LoginScopes login() { /** * Set the login property: The configuration settings of the login flow. - * + * * @param login the login value to set. * @return the Facebook object itself. */ @@ -123,7 +127,7 @@ public Facebook withLogin(LoginScopes login) { /** * 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/ForwardProxy.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxy.java index f60cb05443c4..4c1c94333cb4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxy.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxy.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The configuration settings of a forward proxy used to make the requests. */ +/** + * The configuration settings of a forward proxy used to make the requests. + */ @Fluent public final class ForwardProxy { /* @@ -28,13 +30,15 @@ public final class ForwardProxy { @JsonProperty(value = "customProtoHeaderName") private String customProtoHeaderName; - /** Creates an instance of ForwardProxy class. */ + /** + * Creates an instance of ForwardProxy class. + */ public ForwardProxy() { } /** * Get the convention property: The convention used to determine the url of the request made. - * + * * @return the convention value. */ public ForwardProxyConvention convention() { @@ -43,7 +47,7 @@ public ForwardProxyConvention convention() { /** * Set the convention property: The convention used to determine the url of the request made. - * + * * @param convention the convention value to set. * @return the ForwardProxy object itself. */ @@ -54,7 +58,7 @@ public ForwardProxy withConvention(ForwardProxyConvention convention) { /** * Get the customHostHeaderName property: The name of the header containing the host of the request. - * + * * @return the customHostHeaderName value. */ public String customHostHeaderName() { @@ -63,7 +67,7 @@ public String customHostHeaderName() { /** * Set the customHostHeaderName property: The name of the header containing the host of the request. - * + * * @param customHostHeaderName the customHostHeaderName value to set. * @return the ForwardProxy object itself. */ @@ -74,7 +78,7 @@ public ForwardProxy withCustomHostHeaderName(String customHostHeaderName) { /** * Get the customProtoHeaderName property: The name of the header containing the scheme of the request. - * + * * @return the customProtoHeaderName value. */ public String customProtoHeaderName() { @@ -83,7 +87,7 @@ public String customProtoHeaderName() { /** * Set the customProtoHeaderName property: The name of the header containing the scheme of the request. - * + * * @param customProtoHeaderName the customProtoHeaderName value to set. * @return the ForwardProxy object itself. */ @@ -94,7 +98,7 @@ public ForwardProxy withCustomProtoHeaderName(String customProtoHeaderName) { /** * 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/ForwardProxyConvention.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxyConvention.java index 67a969e08129..987f42967195 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxyConvention.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxyConvention.java @@ -7,18 +7,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** The convention used to determine the url of the request made. */ +/** + * The convention used to determine the url of the request made. + */ public enum ForwardProxyConvention { - /** Enum value NoProxy. */ + /** + * Enum value NoProxy. + */ NO_PROXY("NoProxy"), - /** Enum value Standard. */ + /** + * Enum value Standard. + */ STANDARD("Standard"), - /** Enum value Custom. */ + /** + * Enum value Custom. + */ CUSTOM("Custom"); - /** The actual serialized value for a ForwardProxyConvention instance. */ + /** + * The actual serialized value for a ForwardProxyConvention instance. + */ private final String value; ForwardProxyConvention(String value) { @@ -27,7 +37,7 @@ public enum ForwardProxyConvention { /** * Parses a serialized value to a ForwardProxyConvention instance. - * + * * @param value the serialized value to parse. * @return the parsed ForwardProxyConvention object, or null if unable to parse. */ @@ -45,7 +55,9 @@ public static ForwardProxyConvention fromString(String value) { return null; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @JsonValue @Override public String toString() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/FunctionsExtensions.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/FunctionsExtensions.java new file mode 100644 index 000000000000..3a5584b9d59a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/FunctionsExtensions.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of FunctionsExtensions. + */ +public interface FunctionsExtensions { + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response body along with {@link Response}. + */ + Response invokeFunctionsHostWithResponse(String resourceGroupName, String containerAppName, + String revisionName, String functionAppName, Context context); + + /** + * Proxies a Functions host call to the function app backed by the container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision, the parent resource. + * @param functionAppName Name of the Function App, the extension resource. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the response. + */ + String invokeFunctionsHost(String resourceGroupName, String containerAppName, String revisionName, + String functionAppName); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GitHub.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GitHub.java index 3cbf2faf2f43..f017ad4e55b7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GitHub.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GitHub.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The configuration settings of the GitHub provider. */ +/** + * The configuration settings of the GitHub provider. + */ @Fluent public final class GitHub { /* @@ -29,14 +31,16 @@ public final class GitHub { @JsonProperty(value = "login") private LoginScopes login; - /** Creates an instance of GitHub class. */ + /** + * Creates an instance of GitHub class. + */ public GitHub() { } /** - * Get the enabled property: <code>false</code> if the GitHub provider should not be enabled despite the - * set registration; otherwise, <code>true</code>. - * + * Get the enabled property: <code>false</code> if the GitHub provider should not be enabled despite + * the set registration; otherwise, <code>true</code>. + * * @return the enabled value. */ public Boolean enabled() { @@ -44,9 +48,9 @@ public Boolean enabled() { } /** - * Set the enabled property: <code>false</code> if the GitHub provider should not be enabled despite the - * set registration; otherwise, <code>true</code>. - * + * Set the enabled property: <code>false</code> if the GitHub provider should not be enabled despite + * the set registration; otherwise, <code>true</code>. + * * @param enabled the enabled value to set. * @return the GitHub object itself. */ @@ -57,7 +61,7 @@ public GitHub withEnabled(Boolean enabled) { /** * Get the registration property: The configuration settings of the app registration for the GitHub provider. - * + * * @return the registration value. */ public ClientRegistration registration() { @@ -66,7 +70,7 @@ public ClientRegistration registration() { /** * Set the registration property: The configuration settings of the app registration for the GitHub provider. - * + * * @param registration the registration value to set. * @return the GitHub object itself. */ @@ -77,7 +81,7 @@ public GitHub withRegistration(ClientRegistration registration) { /** * Get the login property: The configuration settings of the login flow. - * + * * @return the login value. */ public LoginScopes login() { @@ -86,7 +90,7 @@ public LoginScopes login() { /** * Set the login property: The configuration settings of the login flow. - * + * * @param login the login value to set. * @return the GitHub object itself. */ @@ -97,7 +101,7 @@ public GitHub withLogin(LoginScopes login) { /** * 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/GithubActionConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GithubActionConfiguration.java index 2c1cf3be67f4..ea17571bff53 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GithubActionConfiguration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GithubActionConfiguration.java @@ -6,8 +6,11 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; -/** Configuration properties that define the mutable settings of a Container App SourceControl. */ +/** + * Configuration properties that define the mutable settings of a Container App SourceControl. + */ @Fluent public final class GithubActionConfiguration { /* @@ -64,13 +67,21 @@ public final class GithubActionConfiguration { @JsonProperty(value = "runtimeVersion") private String runtimeVersion; - /** Creates an instance of GithubActionConfiguration class. */ + /* + * List of environment variables to be passed to the build. + */ + @JsonProperty(value = "buildEnvironmentVariables") + private List buildEnvironmentVariables; + + /** + * Creates an instance of GithubActionConfiguration class. + */ public GithubActionConfiguration() { } /** * Get the registryInfo property: Registry configurations. - * + * * @return the registryInfo value. */ public RegistryInfo registryInfo() { @@ -79,7 +90,7 @@ public RegistryInfo registryInfo() { /** * Set the registryInfo property: Registry configurations. - * + * * @param registryInfo the registryInfo value to set. * @return the GithubActionConfiguration object itself. */ @@ -90,7 +101,7 @@ public GithubActionConfiguration withRegistryInfo(RegistryInfo registryInfo) { /** * Get the azureCredentials property: AzureCredentials configurations. - * + * * @return the azureCredentials value. */ public AzureCredentials azureCredentials() { @@ -99,7 +110,7 @@ public AzureCredentials azureCredentials() { /** * Set the azureCredentials property: AzureCredentials configurations. - * + * * @param azureCredentials the azureCredentials value to set. * @return the GithubActionConfiguration object itself. */ @@ -110,7 +121,7 @@ public GithubActionConfiguration withAzureCredentials(AzureCredentials azureCred /** * Get the contextPath property: Context path. - * + * * @return the contextPath value. */ public String contextPath() { @@ -119,7 +130,7 @@ public String contextPath() { /** * Set the contextPath property: Context path. - * + * * @param contextPath the contextPath value to set. * @return the GithubActionConfiguration object itself. */ @@ -130,7 +141,7 @@ public GithubActionConfiguration withContextPath(String contextPath) { /** * Get the githubPersonalAccessToken property: One time Github PAT to configure github environment. - * + * * @return the githubPersonalAccessToken value. */ public String githubPersonalAccessToken() { @@ -139,7 +150,7 @@ public String githubPersonalAccessToken() { /** * Set the githubPersonalAccessToken property: One time Github PAT to configure github environment. - * + * * @param githubPersonalAccessToken the githubPersonalAccessToken value to set. * @return the GithubActionConfiguration object itself. */ @@ -150,7 +161,7 @@ public GithubActionConfiguration withGithubPersonalAccessToken(String githubPers /** * Get the image property: Image name. - * + * * @return the image value. */ public String image() { @@ -159,7 +170,7 @@ public String image() { /** * Set the image property: Image name. - * + * * @param image the image value to set. * @return the GithubActionConfiguration object itself. */ @@ -170,7 +181,7 @@ public GithubActionConfiguration withImage(String image) { /** * Get the publishType property: Code or Image. - * + * * @return the publishType value. */ public String publishType() { @@ -179,7 +190,7 @@ public String publishType() { /** * Set the publishType property: Code or Image. - * + * * @param publishType the publishType value to set. * @return the GithubActionConfiguration object itself. */ @@ -190,7 +201,7 @@ public GithubActionConfiguration withPublishType(String publishType) { /** * Get the os property: Operation system. - * + * * @return the os value. */ public String os() { @@ -199,7 +210,7 @@ public String os() { /** * Set the os property: Operation system. - * + * * @param os the os value to set. * @return the GithubActionConfiguration object itself. */ @@ -210,7 +221,7 @@ public GithubActionConfiguration withOs(String os) { /** * Get the runtimeStack property: Runtime stack. - * + * * @return the runtimeStack value. */ public String runtimeStack() { @@ -219,7 +230,7 @@ public String runtimeStack() { /** * Set the runtimeStack property: Runtime stack. - * + * * @param runtimeStack the runtimeStack value to set. * @return the GithubActionConfiguration object itself. */ @@ -230,7 +241,7 @@ public GithubActionConfiguration withRuntimeStack(String runtimeStack) { /** * Get the runtimeVersion property: Runtime version. - * + * * @return the runtimeVersion value. */ public String runtimeVersion() { @@ -239,7 +250,7 @@ public String runtimeVersion() { /** * Set the runtimeVersion property: Runtime version. - * + * * @param runtimeVersion the runtimeVersion value to set. * @return the GithubActionConfiguration object itself. */ @@ -248,9 +259,30 @@ public GithubActionConfiguration withRuntimeVersion(String runtimeVersion) { return this; } + /** + * Get the buildEnvironmentVariables property: List of environment variables to be passed to the build. + * + * @return the buildEnvironmentVariables value. + */ + public List buildEnvironmentVariables() { + return this.buildEnvironmentVariables; + } + + /** + * Set the buildEnvironmentVariables property: List of environment variables to be passed to the build. + * + * @param buildEnvironmentVariables the buildEnvironmentVariables value to set. + * @return the GithubActionConfiguration object itself. + */ + public GithubActionConfiguration + withBuildEnvironmentVariables(List buildEnvironmentVariables) { + this.buildEnvironmentVariables = buildEnvironmentVariables; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -260,5 +292,8 @@ public void validate() { if (azureCredentials() != null) { azureCredentials().validate(); } + if (buildEnvironmentVariables() != null) { + buildEnvironmentVariables().forEach(e -> e.validate()); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GlobalValidation.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GlobalValidation.java index 9cc8c4a8f625..133206ec91f3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GlobalValidation.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GlobalValidation.java @@ -34,14 +34,16 @@ public final class GlobalValidation { @JsonProperty(value = "excludedPaths") private List excludedPaths; - /** Creates an instance of GlobalValidation class. */ + /** + * Creates an instance of GlobalValidation class. + */ public GlobalValidation() { } /** * Get the unauthenticatedClientAction property: The action to take when an unauthenticated client attempts to * access the app. - * + * * @return the unauthenticatedClientAction value. */ public UnauthenticatedClientActionV2 unauthenticatedClientAction() { @@ -51,7 +53,7 @@ public UnauthenticatedClientActionV2 unauthenticatedClientAction() { /** * Set the unauthenticatedClientAction property: The action to take when an unauthenticated client attempts to * access the app. - * + * * @param unauthenticatedClientAction the unauthenticatedClientAction value to set. * @return the GlobalValidation object itself. */ @@ -62,9 +64,10 @@ public GlobalValidation withUnauthenticatedClientAction(UnauthenticatedClientAct /** * Get the redirectToProvider property: The default authentication provider to use when multiple providers are - * configured. This setting is only needed if multiple providers are configured and the unauthenticated client + * configured. + * This setting is only needed if multiple providers are configured and the unauthenticated client * action is set to "RedirectToLoginPage". - * + * * @return the redirectToProvider value. */ public String redirectToProvider() { @@ -73,9 +76,10 @@ public String redirectToProvider() { /** * Set the redirectToProvider property: The default authentication provider to use when multiple providers are - * configured. This setting is only needed if multiple providers are configured and the unauthenticated client + * configured. + * This setting is only needed if multiple providers are configured and the unauthenticated client * action is set to "RedirectToLoginPage". - * + * * @param redirectToProvider the redirectToProvider value to set. * @return the GlobalValidation object itself. */ @@ -87,7 +91,7 @@ public GlobalValidation withRedirectToProvider(String redirectToProvider) { /** * Get the excludedPaths property: The paths for which unauthenticated flow would not be redirected to the login * page. - * + * * @return the excludedPaths value. */ public List excludedPaths() { @@ -97,7 +101,7 @@ public List excludedPaths() { /** * Set the excludedPaths property: The paths for which unauthenticated flow would not be redirected to the login * page. - * + * * @param excludedPaths the excludedPaths value to set. * @return the GlobalValidation object itself. */ @@ -108,7 +112,7 @@ public GlobalValidation withExcludedPaths(List excludedPaths) { /** * 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/Google.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Google.java index 2d3054e4162d..085f2d03acff 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Google.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Google.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The configuration settings of the Google provider. */ +/** + * The configuration settings of the Google provider. + */ @Fluent public final class Google { /* @@ -35,14 +37,16 @@ public final class Google { @JsonProperty(value = "validation") private AllowedAudiencesValidation validation; - /** Creates an instance of Google class. */ + /** + * Creates an instance of Google class. + */ public Google() { } /** - * Get the enabled property: <code>false</code> if the Google provider should not be enabled despite the - * set registration; otherwise, <code>true</code>. - * + * Get the enabled property: <code>false</code> if the Google provider should not be enabled despite + * the set registration; otherwise, <code>true</code>. + * * @return the enabled value. */ public Boolean enabled() { @@ -50,9 +54,9 @@ public Boolean enabled() { } /** - * Set the enabled property: <code>false</code> if the Google provider should not be enabled despite the - * set registration; otherwise, <code>true</code>. - * + * Set the enabled property: <code>false</code> if the Google provider should not be enabled despite + * the set registration; otherwise, <code>true</code>. + * * @param enabled the enabled value to set. * @return the Google object itself. */ @@ -63,7 +67,7 @@ public Google withEnabled(Boolean enabled) { /** * Get the registration property: The configuration settings of the app registration for the Google provider. - * + * * @return the registration value. */ public ClientRegistration registration() { @@ -72,7 +76,7 @@ public ClientRegistration registration() { /** * Set the registration property: The configuration settings of the app registration for the Google provider. - * + * * @param registration the registration value to set. * @return the Google object itself. */ @@ -83,7 +87,7 @@ public Google withRegistration(ClientRegistration registration) { /** * Get the login property: The configuration settings of the login flow. - * + * * @return the login value. */ public LoginScopes login() { @@ -92,7 +96,7 @@ public LoginScopes login() { /** * Set the login property: The configuration settings of the login flow. - * + * * @param login the login value to set. * @return the Google object itself. */ @@ -103,7 +107,7 @@ public Google withLogin(LoginScopes login) { /** * Get the validation property: The configuration settings of the Azure Active Directory token validation flow. - * + * * @return the validation value. */ public AllowedAudiencesValidation validation() { @@ -112,7 +116,7 @@ public AllowedAudiencesValidation validation() { /** * Set the validation property: The configuration settings of the Azure Active Directory token validation flow. - * + * * @param validation the validation value to set. * @return the Google object itself. */ @@ -123,7 +127,7 @@ public Google withValidation(AllowedAudiencesValidation validation) { /** * 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/Header.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Header.java new file mode 100644 index 000000000000..d8364dae7457 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Header.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Header of otlp configuration. + */ +@Fluent +public final class Header { + /* + * The key of otlp configuration header + */ + @JsonProperty(value = "key") + private String key; + + /* + * The value of otlp configuration header + */ + @JsonProperty(value = "value") + private String value; + + /** + * Creates an instance of Header class. + */ + public Header() { + } + + /** + * Get the key property: The key of otlp configuration header. + * + * @return the key value. + */ + public String key() { + return this.key; + } + + /** + * Set the key property: The key of otlp configuration header. + * + * @param key the key value to set. + * @return the Header object itself. + */ + public Header withKey(String key) { + this.key = key; + return this; + } + + /** + * Get the value property: The value of otlp configuration header. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: The value of otlp configuration header. + * + * @param value the value value to set. + * @return the Header object itself. + */ + public Header withValue(String value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HeaderMatch.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HeaderMatch.java new file mode 100644 index 000000000000..c1d1d4b55426 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HeaderMatch.java @@ -0,0 +1,165 @@ +// Copyright (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.resourcemanager.appcontainers.fluent.models.HeaderMatchMatch; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Conditions required to match a header. + */ +@Fluent +public final class HeaderMatch { + /* + * Name of the header + */ + @JsonProperty(value = "header") + private String headerProperty; + + /* + * Type of match to perform + */ + @JsonProperty(value = "match") + private HeaderMatchMatch innerMatch; + + /** + * Creates an instance of HeaderMatch class. + */ + public HeaderMatch() { + } + + /** + * Get the headerProperty property: Name of the header. + * + * @return the headerProperty value. + */ + public String headerProperty() { + return this.headerProperty; + } + + /** + * Set the headerProperty property: Name of the header. + * + * @param headerProperty the headerProperty value to set. + * @return the HeaderMatch object itself. + */ + public HeaderMatch withHeaderProperty(String headerProperty) { + this.headerProperty = headerProperty; + return this; + } + + /** + * Get the innerMatch property: Type of match to perform. + * + * @return the innerMatch value. + */ + private HeaderMatchMatch innerMatch() { + return this.innerMatch; + } + + /** + * Get the exactMatch property: Exact value of the header. + * + * @return the exactMatch value. + */ + public String exactMatch() { + return this.innerMatch() == null ? null : this.innerMatch().exactMatch(); + } + + /** + * Set the exactMatch property: Exact value of the header. + * + * @param exactMatch the exactMatch value to set. + * @return the HeaderMatch object itself. + */ + public HeaderMatch withExactMatch(String exactMatch) { + if (this.innerMatch() == null) { + this.innerMatch = new HeaderMatchMatch(); + } + this.innerMatch().withExactMatch(exactMatch); + return this; + } + + /** + * Get the prefixMatch property: Prefix value of the header. + * + * @return the prefixMatch value. + */ + public String prefixMatch() { + return this.innerMatch() == null ? null : this.innerMatch().prefixMatch(); + } + + /** + * Set the prefixMatch property: Prefix value of the header. + * + * @param prefixMatch the prefixMatch value to set. + * @return the HeaderMatch object itself. + */ + public HeaderMatch withPrefixMatch(String prefixMatch) { + if (this.innerMatch() == null) { + this.innerMatch = new HeaderMatchMatch(); + } + this.innerMatch().withPrefixMatch(prefixMatch); + return this; + } + + /** + * Get the suffixMatch property: Suffix value of the header. + * + * @return the suffixMatch value. + */ + public String suffixMatch() { + return this.innerMatch() == null ? null : this.innerMatch().suffixMatch(); + } + + /** + * Set the suffixMatch property: Suffix value of the header. + * + * @param suffixMatch the suffixMatch value to set. + * @return the HeaderMatch object itself. + */ + public HeaderMatch withSuffixMatch(String suffixMatch) { + if (this.innerMatch() == null) { + this.innerMatch = new HeaderMatchMatch(); + } + this.innerMatch().withSuffixMatch(suffixMatch); + return this; + } + + /** + * Get the regexMatch property: Regex value of the header. + * + * @return the regexMatch value. + */ + public String regexMatch() { + return this.innerMatch() == null ? null : this.innerMatch().regexMatch(); + } + + /** + * Set the regexMatch property: Regex value of the header. + * + * @param regexMatch the regexMatch value to set. + * @return the HeaderMatch object itself. + */ + public HeaderMatch withRegexMatch(String regexMatch) { + if (this.innerMatch() == null) { + this.innerMatch = new HeaderMatchMatch(); + } + this.innerMatch().withRegexMatch(regexMatch); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerMatch() != null) { + innerMatch().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpConnectionPool.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpConnectionPool.java new file mode 100644 index 000000000000..1b1502dcce29 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpConnectionPool.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines parameters for http connection pooling. + */ +@Fluent +public final class HttpConnectionPool { + /* + * Maximum number of pending http1 requests allowed + */ + @JsonProperty(value = "http1MaxPendingRequests") + private Integer http1MaxPendingRequests; + + /* + * Maximum number of http2 requests allowed + */ + @JsonProperty(value = "http2MaxRequests") + private Integer http2MaxRequests; + + /** + * Creates an instance of HttpConnectionPool class. + */ + public HttpConnectionPool() { + } + + /** + * Get the http1MaxPendingRequests property: Maximum number of pending http1 requests allowed. + * + * @return the http1MaxPendingRequests value. + */ + public Integer http1MaxPendingRequests() { + return this.http1MaxPendingRequests; + } + + /** + * Set the http1MaxPendingRequests property: Maximum number of pending http1 requests allowed. + * + * @param http1MaxPendingRequests the http1MaxPendingRequests value to set. + * @return the HttpConnectionPool object itself. + */ + public HttpConnectionPool withHttp1MaxPendingRequests(Integer http1MaxPendingRequests) { + this.http1MaxPendingRequests = http1MaxPendingRequests; + return this; + } + + /** + * Get the http2MaxRequests property: Maximum number of http2 requests allowed. + * + * @return the http2MaxRequests value. + */ + public Integer http2MaxRequests() { + return this.http2MaxRequests; + } + + /** + * Set the http2MaxRequests property: Maximum number of http2 requests allowed. + * + * @param http2MaxRequests the http2MaxRequests value to set. + * @return the HttpConnectionPool object itself. + */ + public HttpConnectionPool withHttp2MaxRequests(Integer http2MaxRequests) { + this.http2MaxRequests = http2MaxRequests; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpGet.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpGet.java new file mode 100644 index 000000000000..bd154edb3423 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpGet.java @@ -0,0 +1,114 @@ +// Copyright (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; + +/** + * Model representing a http get request. + */ +@Fluent +public final class HttpGet { + /* + * URL to make HTTP GET request against. + */ + @JsonProperty(value = "url", required = true) + private String url; + + /* + * Name of the file that the request should be saved to. + */ + @JsonProperty(value = "fileName") + private String fileName; + + /* + * List of headers to send with the request. + */ + @JsonProperty(value = "headers") + private List headers; + + /** + * Creates an instance of HttpGet class. + */ + public HttpGet() { + } + + /** + * Get the url property: URL to make HTTP GET request against. + * + * @return the url value. + */ + public String url() { + return this.url; + } + + /** + * Set the url property: URL to make HTTP GET request against. + * + * @param url the url value to set. + * @return the HttpGet object itself. + */ + public HttpGet withUrl(String url) { + this.url = url; + return this; + } + + /** + * Get the fileName property: Name of the file that the request should be saved to. + * + * @return the fileName value. + */ + public String fileName() { + return this.fileName; + } + + /** + * Set the fileName property: Name of the file that the request should be saved to. + * + * @param fileName the fileName value to set. + * @return the HttpGet object itself. + */ + public HttpGet withFileName(String fileName) { + this.fileName = fileName; + return this; + } + + /** + * Get the headers property: List of headers to send with the request. + * + * @return the headers value. + */ + public List headers() { + return this.headers; + } + + /** + * Set the headers property: List of headers to send with the request. + * + * @param headers the headers value to set. + * @return the HttpGet object itself. + */ + public HttpGet withHeaders(List headers) { + this.headers = headers; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (url() == null) { + throw LOGGER + .logExceptionAsError(new IllegalArgumentException("Missing required property url in model HttpGet")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(HttpGet.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRetryPolicy.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRetryPolicy.java new file mode 100644 index 000000000000..e80b222f5f1e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpRetryPolicy.java @@ -0,0 +1,208 @@ +// Copyright (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.resourcemanager.appcontainers.fluent.models.HttpRetryPolicyMatches; +import com.azure.resourcemanager.appcontainers.fluent.models.HttpRetryPolicyRetryBackOff; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Policy that defines http request retry conditions. + */ +@Fluent +public final class HttpRetryPolicy { + /* + * Maximum number of times a request will retry + */ + @JsonProperty(value = "maxRetries") + private Integer maxRetries; + + /* + * Settings for retry backoff characteristics + */ + @JsonProperty(value = "retryBackOff") + private HttpRetryPolicyRetryBackOff innerRetryBackOff; + + /* + * Conditions that must be met for a request to be retried + */ + @JsonProperty(value = "matches") + private HttpRetryPolicyMatches innerMatches; + + /** + * Creates an instance of HttpRetryPolicy class. + */ + public HttpRetryPolicy() { + } + + /** + * Get the maxRetries property: Maximum number of times a request will retry. + * + * @return the maxRetries value. + */ + public Integer maxRetries() { + return this.maxRetries; + } + + /** + * Set the maxRetries property: Maximum number of times a request will retry. + * + * @param maxRetries the maxRetries value to set. + * @return the HttpRetryPolicy object itself. + */ + public HttpRetryPolicy withMaxRetries(Integer maxRetries) { + this.maxRetries = maxRetries; + return this; + } + + /** + * Get the innerRetryBackOff property: Settings for retry backoff characteristics. + * + * @return the innerRetryBackOff value. + */ + private HttpRetryPolicyRetryBackOff innerRetryBackOff() { + return this.innerRetryBackOff; + } + + /** + * Get the innerMatches property: Conditions that must be met for a request to be retried. + * + * @return the innerMatches value. + */ + private HttpRetryPolicyMatches innerMatches() { + return this.innerMatches; + } + + /** + * Get the initialDelayInMilliseconds property: Initial delay, in milliseconds, before retrying a request. + * + * @return the initialDelayInMilliseconds value. + */ + public Long initialDelayInMilliseconds() { + return this.innerRetryBackOff() == null ? null : this.innerRetryBackOff().initialDelayInMilliseconds(); + } + + /** + * Set the initialDelayInMilliseconds property: Initial delay, in milliseconds, before retrying a request. + * + * @param initialDelayInMilliseconds the initialDelayInMilliseconds value to set. + * @return the HttpRetryPolicy object itself. + */ + public HttpRetryPolicy withInitialDelayInMilliseconds(Long initialDelayInMilliseconds) { + if (this.innerRetryBackOff() == null) { + this.innerRetryBackOff = new HttpRetryPolicyRetryBackOff(); + } + this.innerRetryBackOff().withInitialDelayInMilliseconds(initialDelayInMilliseconds); + return this; + } + + /** + * Get the maxIntervalInMilliseconds property: Maximum interval, in milliseconds, between retries. + * + * @return the maxIntervalInMilliseconds value. + */ + public Long maxIntervalInMilliseconds() { + return this.innerRetryBackOff() == null ? null : this.innerRetryBackOff().maxIntervalInMilliseconds(); + } + + /** + * Set the maxIntervalInMilliseconds property: Maximum interval, in milliseconds, between retries. + * + * @param maxIntervalInMilliseconds the maxIntervalInMilliseconds value to set. + * @return the HttpRetryPolicy object itself. + */ + public HttpRetryPolicy withMaxIntervalInMilliseconds(Long maxIntervalInMilliseconds) { + if (this.innerRetryBackOff() == null) { + this.innerRetryBackOff = new HttpRetryPolicyRetryBackOff(); + } + this.innerRetryBackOff().withMaxIntervalInMilliseconds(maxIntervalInMilliseconds); + return this; + } + + /** + * Get the headers property: Headers that must be present for a request to be retried. + * + * @return the headers value. + */ + public List headers() { + return this.innerMatches() == null ? null : this.innerMatches().headers(); + } + + /** + * Set the headers property: Headers that must be present for a request to be retried. + * + * @param headers the headers value to set. + * @return the HttpRetryPolicy object itself. + */ + public HttpRetryPolicy withHeaders(List headers) { + if (this.innerMatches() == null) { + this.innerMatches = new HttpRetryPolicyMatches(); + } + this.innerMatches().withHeaders(headers); + return this; + } + + /** + * Get the httpStatusCodes property: Additional http status codes that can trigger a retry. + * + * @return the httpStatusCodes value. + */ + public List httpStatusCodes() { + return this.innerMatches() == null ? null : this.innerMatches().httpStatusCodes(); + } + + /** + * Set the httpStatusCodes property: Additional http status codes that can trigger a retry. + * + * @param httpStatusCodes the httpStatusCodes value to set. + * @return the HttpRetryPolicy object itself. + */ + public HttpRetryPolicy withHttpStatusCodes(List httpStatusCodes) { + if (this.innerMatches() == null) { + this.innerMatches = new HttpRetryPolicyMatches(); + } + this.innerMatches().withHttpStatusCodes(httpStatusCodes); + return this; + } + + /** + * Get the errors property: Errors that can trigger a retry. + * + * @return the errors value. + */ + public List errors() { + return this.innerMatches() == null ? null : this.innerMatches().errors(); + } + + /** + * Set the errors property: Errors that can trigger a retry. + * + * @param errors the errors value to set. + * @return the HttpRetryPolicy object itself. + */ + public HttpRetryPolicy withErrors(List errors) { + if (this.innerMatches() == null) { + this.innerMatches = new HttpRetryPolicyMatches(); + } + this.innerMatches().withErrors(errors); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerRetryBackOff() != null) { + innerRetryBackOff().validate(); + } + if (innerMatches() != null) { + innerMatches().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java index 1e42b8eb3e4f..0ecbbf8ea5f2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java @@ -10,7 +10,9 @@ import java.util.List; import java.util.Map; -/** Container App container Http scaling rule. */ +/** + * Container App container Http scaling rule. + */ @Fluent public final class HttpScaleRule { /* @@ -26,13 +28,15 @@ public final class HttpScaleRule { @JsonProperty(value = "auth") private List auth; - /** Creates an instance of HttpScaleRule class. */ + /** + * Creates an instance of HttpScaleRule class. + */ public HttpScaleRule() { } /** * Get the metadata property: Metadata properties to describe http scale rule. - * + * * @return the metadata value. */ public Map metadata() { @@ -41,7 +45,7 @@ public Map metadata() { /** * Set the metadata property: Metadata properties to describe http scale rule. - * + * * @param metadata the metadata value to set. * @return the HttpScaleRule object itself. */ @@ -52,7 +56,7 @@ public HttpScaleRule withMetadata(Map metadata) { /** * Get the auth property: Authentication secrets for the custom scale rule. - * + * * @return the auth value. */ public List auth() { @@ -61,7 +65,7 @@ public List auth() { /** * Set the auth property: Authentication secrets for the custom scale rule. - * + * * @param auth the auth value to set. * @return the HttpScaleRule object itself. */ @@ -72,7 +76,7 @@ public HttpScaleRule withAuth(List auth) { /** * 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/HttpSettings.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettings.java index a6b61f3c5d21..59a984e74eb4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettings.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettings.java @@ -32,14 +32,16 @@ public final class HttpSettings { @JsonProperty(value = "forwardProxy") private ForwardProxy forwardProxy; - /** Creates an instance of HttpSettings class. */ + /** + * Creates an instance of HttpSettings class. + */ public HttpSettings() { } /** * Get the requireHttps property: <code>false</code> if the authentication/authorization responses not * having the HTTPS scheme are permissible; otherwise, <code>true</code>. - * + * * @return the requireHttps value. */ public Boolean requireHttps() { @@ -49,7 +51,7 @@ public Boolean requireHttps() { /** * Set the requireHttps property: <code>false</code> if the authentication/authorization responses not * having the HTTPS scheme are permissible; otherwise, <code>true</code>. - * + * * @param requireHttps the requireHttps value to set. * @return the HttpSettings object itself. */ @@ -60,7 +62,7 @@ public HttpSettings withRequireHttps(Boolean requireHttps) { /** * Get the routes property: The configuration settings of the paths HTTP requests. - * + * * @return the routes value. */ public HttpSettingsRoutes routes() { @@ -69,7 +71,7 @@ public HttpSettingsRoutes routes() { /** * Set the routes property: The configuration settings of the paths HTTP requests. - * + * * @param routes the routes value to set. * @return the HttpSettings object itself. */ @@ -80,7 +82,7 @@ public HttpSettings withRoutes(HttpSettingsRoutes routes) { /** * Get the forwardProxy property: The configuration settings of a forward proxy used to make the requests. - * + * * @return the forwardProxy value. */ public ForwardProxy forwardProxy() { @@ -89,7 +91,7 @@ public ForwardProxy forwardProxy() { /** * Set the forwardProxy property: The configuration settings of a forward proxy used to make the requests. - * + * * @param forwardProxy the forwardProxy value to set. * @return the HttpSettings object itself. */ @@ -100,7 +102,7 @@ public HttpSettings withForwardProxy(ForwardProxy forwardProxy) { /** * 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/HttpSettingsRoutes.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettingsRoutes.java index 44e17ed42b3d..53d5558dba0f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettingsRoutes.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpSettingsRoutes.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The configuration settings of the paths HTTP requests. */ +/** + * The configuration settings of the paths HTTP requests. + */ @Fluent public final class HttpSettingsRoutes { /* @@ -16,13 +18,15 @@ public final class HttpSettingsRoutes { @JsonProperty(value = "apiPrefix") private String apiPrefix; - /** Creates an instance of HttpSettingsRoutes class. */ + /** + * Creates an instance of HttpSettingsRoutes class. + */ public HttpSettingsRoutes() { } /** * Get the apiPrefix property: The prefix that should precede all the authentication/authorization paths. - * + * * @return the apiPrefix value. */ public String apiPrefix() { @@ -31,7 +35,7 @@ public String apiPrefix() { /** * Set the apiPrefix property: The prefix that should precede all the authentication/authorization paths. - * + * * @param apiPrefix the apiPrefix value to set. * @return the HttpSettingsRoutes object itself. */ @@ -42,7 +46,7 @@ public HttpSettingsRoutes withApiPrefix(String apiPrefix) { /** * 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/IdentityProviders.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentityProviders.java index 923d51db32d8..762016808037 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentityProviders.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IdentityProviders.java @@ -65,13 +65,15 @@ public final class IdentityProviders { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map customOpenIdConnectProviders; - /** Creates an instance of IdentityProviders class. */ + /** + * Creates an instance of IdentityProviders class. + */ public IdentityProviders() { } /** * Get the azureActiveDirectory property: The configuration settings of the Azure Active directory provider. - * + * * @return the azureActiveDirectory value. */ public AzureActiveDirectory azureActiveDirectory() { @@ -80,7 +82,7 @@ public AzureActiveDirectory azureActiveDirectory() { /** * Set the azureActiveDirectory property: The configuration settings of the Azure Active directory provider. - * + * * @param azureActiveDirectory the azureActiveDirectory value to set. * @return the IdentityProviders object itself. */ @@ -91,7 +93,7 @@ public IdentityProviders withAzureActiveDirectory(AzureActiveDirectory azureActi /** * Get the facebook property: The configuration settings of the Facebook provider. - * + * * @return the facebook value. */ public Facebook facebook() { @@ -100,7 +102,7 @@ public Facebook facebook() { /** * Set the facebook property: The configuration settings of the Facebook provider. - * + * * @param facebook the facebook value to set. * @return the IdentityProviders object itself. */ @@ -111,7 +113,7 @@ public IdentityProviders withFacebook(Facebook facebook) { /** * Get the gitHub property: The configuration settings of the GitHub provider. - * + * * @return the gitHub value. */ public GitHub gitHub() { @@ -120,7 +122,7 @@ public GitHub gitHub() { /** * Set the gitHub property: The configuration settings of the GitHub provider. - * + * * @param gitHub the gitHub value to set. * @return the IdentityProviders object itself. */ @@ -131,7 +133,7 @@ public IdentityProviders withGitHub(GitHub gitHub) { /** * Get the google property: The configuration settings of the Google provider. - * + * * @return the google value. */ public Google google() { @@ -140,7 +142,7 @@ public Google google() { /** * Set the google property: The configuration settings of the Google provider. - * + * * @param google the google value to set. * @return the IdentityProviders object itself. */ @@ -151,7 +153,7 @@ public IdentityProviders withGoogle(Google google) { /** * Get the twitter property: The configuration settings of the Twitter provider. - * + * * @return the twitter value. */ public Twitter twitter() { @@ -160,7 +162,7 @@ public Twitter twitter() { /** * Set the twitter property: The configuration settings of the Twitter provider. - * + * * @param twitter the twitter value to set. * @return the IdentityProviders object itself. */ @@ -171,7 +173,7 @@ public IdentityProviders withTwitter(Twitter twitter) { /** * Get the apple property: The configuration settings of the Apple provider. - * + * * @return the apple value. */ public Apple apple() { @@ -180,7 +182,7 @@ public Apple apple() { /** * Set the apple property: The configuration settings of the Apple provider. - * + * * @param apple the apple value to set. * @return the IdentityProviders object itself. */ @@ -191,7 +193,7 @@ public IdentityProviders withApple(Apple apple) { /** * Get the azureStaticWebApps property: The configuration settings of the Azure Static Web Apps provider. - * + * * @return the azureStaticWebApps value. */ public AzureStaticWebApps azureStaticWebApps() { @@ -200,7 +202,7 @@ public AzureStaticWebApps azureStaticWebApps() { /** * Set the azureStaticWebApps property: The configuration settings of the Azure Static Web Apps provider. - * + * * @param azureStaticWebApps the azureStaticWebApps value to set. * @return the IdentityProviders object itself. */ @@ -211,8 +213,9 @@ public IdentityProviders withAzureStaticWebApps(AzureStaticWebApps azureStaticWe /** * Get the customOpenIdConnectProviders property: The map of the name of the alias of each custom Open ID Connect - * provider to the configuration settings of the custom Open ID Connect provider. - * + * provider to the + * configuration settings of the custom Open ID Connect provider. + * * @return the customOpenIdConnectProviders value. */ public Map customOpenIdConnectProviders() { @@ -221,20 +224,21 @@ public Map customOpenIdConnectProviders() { /** * Set the customOpenIdConnectProviders property: The map of the name of the alias of each custom Open ID Connect - * provider to the configuration settings of the custom Open ID Connect provider. - * + * provider to the + * configuration settings of the custom Open ID Connect provider. + * * @param customOpenIdConnectProviders the customOpenIdConnectProviders value to set. * @return the IdentityProviders object itself. */ - public IdentityProviders withCustomOpenIdConnectProviders( - Map customOpenIdConnectProviders) { + public IdentityProviders + withCustomOpenIdConnectProviders(Map customOpenIdConnectProviders) { this.customOpenIdConnectProviders = customOpenIdConnectProviders; return this; } /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -260,14 +264,11 @@ public void validate() { azureStaticWebApps().validate(); } if (customOpenIdConnectProviders() != null) { - customOpenIdConnectProviders() - .values() - .forEach( - e -> { - if (e != null) { - e.validate(); - } - }); + customOpenIdConnectProviders().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); } } } 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 affb86e66066..115157470d1b 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 @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Container App Ingress configuration. */ +/** + * Container App Ingress configuration. + */ @Fluent public final class Ingress { /* @@ -86,13 +88,27 @@ public final class Ingress { @JsonProperty(value = "corsPolicy") private CorsPolicy corsPolicy; - /** Creates an instance of Ingress class. */ + /* + * Settings to expose additional ports on container app + */ + @JsonProperty(value = "additionalPortMappings") + private List additionalPortMappings; + + /* + * Whether an http app listens on http or https + */ + @JsonProperty(value = "targetPortHttpScheme") + private IngressTargetPortHttpScheme targetPortHttpScheme; + + /** + * Creates an instance of Ingress class. + */ public Ingress() { } /** * Get the fqdn property: Hostname. - * + * * @return the fqdn value. */ public String fqdn() { @@ -101,7 +117,7 @@ public String fqdn() { /** * Get the external property: Bool indicating if app exposes an external http endpoint. - * + * * @return the external value. */ public Boolean external() { @@ -110,7 +126,7 @@ public Boolean external() { /** * Set the external property: Bool indicating if app exposes an external http endpoint. - * + * * @param external the external value to set. * @return the Ingress object itself. */ @@ -121,7 +137,7 @@ public Ingress withExternal(Boolean external) { /** * Get the targetPort property: Target Port in containers for traffic from ingress. - * + * * @return the targetPort value. */ public Integer targetPort() { @@ -130,7 +146,7 @@ public Integer targetPort() { /** * Set the targetPort property: Target Port in containers for traffic from ingress. - * + * * @param targetPort the targetPort value to set. * @return the Ingress object itself. */ @@ -141,7 +157,7 @@ public Ingress withTargetPort(Integer targetPort) { /** * Get the exposedPort property: Exposed Port in containers for TCP traffic from ingress. - * + * * @return the exposedPort value. */ public Integer exposedPort() { @@ -150,7 +166,7 @@ public Integer exposedPort() { /** * Set the exposedPort property: Exposed Port in containers for TCP traffic from ingress. - * + * * @param exposedPort the exposedPort value to set. * @return the Ingress object itself. */ @@ -161,7 +177,7 @@ public Ingress withExposedPort(Integer exposedPort) { /** * Get the transport property: Ingress transport protocol. - * + * * @return the transport value. */ public IngressTransportMethod transport() { @@ -170,7 +186,7 @@ public IngressTransportMethod transport() { /** * Set the transport property: Ingress transport protocol. - * + * * @param transport the transport value to set. * @return the Ingress object itself. */ @@ -181,7 +197,7 @@ public Ingress withTransport(IngressTransportMethod transport) { /** * Get the traffic property: Traffic weights for app's revisions. - * + * * @return the traffic value. */ public List traffic() { @@ -190,7 +206,7 @@ public List traffic() { /** * Set the traffic property: Traffic weights for app's revisions. - * + * * @param traffic the traffic value to set. * @return the Ingress object itself. */ @@ -201,7 +217,7 @@ public Ingress withTraffic(List traffic) { /** * Get the customDomains property: custom domain bindings for Container Apps' hostnames. - * + * * @return the customDomains value. */ public List customDomains() { @@ -210,7 +226,7 @@ public List customDomains() { /** * Set the customDomains property: custom domain bindings for Container Apps' hostnames. - * + * * @param customDomains the customDomains value to set. * @return the Ingress object itself. */ @@ -222,7 +238,7 @@ public Ingress withCustomDomains(List customDomains) { /** * Get the allowInsecure property: Bool indicating if HTTP connections to is allowed. If set to false HTTP * connections are automatically redirected to HTTPS connections. - * + * * @return the allowInsecure value. */ public Boolean allowInsecure() { @@ -232,7 +248,7 @@ public Boolean allowInsecure() { /** * Set the allowInsecure property: Bool indicating if HTTP connections to is allowed. If set to false HTTP * connections are automatically redirected to HTTPS connections. - * + * * @param allowInsecure the allowInsecure value to set. * @return the Ingress object itself. */ @@ -243,7 +259,7 @@ public Ingress withAllowInsecure(Boolean allowInsecure) { /** * Get the ipSecurityRestrictions property: Rules to restrict incoming IP address. - * + * * @return the ipSecurityRestrictions value. */ public List ipSecurityRestrictions() { @@ -252,7 +268,7 @@ public List ipSecurityRestrictions() { /** * Set the ipSecurityRestrictions property: Rules to restrict incoming IP address. - * + * * @param ipSecurityRestrictions the ipSecurityRestrictions value to set. * @return the Ingress object itself. */ @@ -263,7 +279,7 @@ public Ingress withIpSecurityRestrictions(List ipSecu /** * Get the stickySessions property: Sticky Sessions for Single Revision Mode. - * + * * @return the stickySessions value. */ public IngressStickySessions stickySessions() { @@ -272,7 +288,7 @@ public IngressStickySessions stickySessions() { /** * Set the stickySessions property: Sticky Sessions for Single Revision Mode. - * + * * @param stickySessions the stickySessions value to set. * @return the Ingress object itself. */ @@ -285,7 +301,7 @@ public Ingress withStickySessions(IngressStickySessions stickySessions) { * 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() { @@ -296,7 +312,7 @@ public IngressClientCertificateMode 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. */ @@ -307,7 +323,7 @@ public Ingress withClientCertificateMode(IngressClientCertificateMode clientCert /** * Get the corsPolicy property: CORS policy for container app. - * + * * @return the corsPolicy value. */ public CorsPolicy corsPolicy() { @@ -316,7 +332,7 @@ public CorsPolicy corsPolicy() { /** * Set the corsPolicy property: CORS policy for container app. - * + * * @param corsPolicy the corsPolicy value to set. * @return the Ingress object itself. */ @@ -325,9 +341,49 @@ public Ingress withCorsPolicy(CorsPolicy corsPolicy) { return this; } + /** + * Get the additionalPortMappings property: Settings to expose additional ports on container app. + * + * @return the additionalPortMappings value. + */ + public List additionalPortMappings() { + return this.additionalPortMappings; + } + + /** + * Set the additionalPortMappings property: Settings to expose additional ports on container app. + * + * @param additionalPortMappings the additionalPortMappings value to set. + * @return the Ingress object itself. + */ + public Ingress withAdditionalPortMappings(List additionalPortMappings) { + this.additionalPortMappings = additionalPortMappings; + return this; + } + + /** + * Get the targetPortHttpScheme property: Whether an http app listens on http or https. + * + * @return the targetPortHttpScheme value. + */ + public IngressTargetPortHttpScheme targetPortHttpScheme() { + return this.targetPortHttpScheme; + } + + /** + * Set the targetPortHttpScheme property: Whether an http app listens on http or https. + * + * @param targetPortHttpScheme the targetPortHttpScheme value to set. + * @return the Ingress object itself. + */ + public Ingress withTargetPortHttpScheme(IngressTargetPortHttpScheme targetPortHttpScheme) { + this.targetPortHttpScheme = targetPortHttpScheme; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -346,5 +402,8 @@ public void validate() { if (corsPolicy() != null) { corsPolicy().validate(); } + if (additionalPortMappings() != null) { + additionalPortMappings().forEach(e -> e.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 index a30b69413bb6..2600873124df 100644 --- 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 @@ -14,18 +14,24 @@ * server requires a client certificate. */ public final class IngressClientCertificateMode extends ExpandableStringEnum { - /** Static value ignore for IngressClientCertificateMode. */ + /** + * Static value ignore for IngressClientCertificateMode. + */ public static final IngressClientCertificateMode IGNORE = fromString("ignore"); - /** Static value accept for IngressClientCertificateMode. */ + /** + * Static value accept for IngressClientCertificateMode. + */ public static final IngressClientCertificateMode ACCEPT = fromString("accept"); - /** Static value require for IngressClientCertificateMode. */ + /** + * Static value require for IngressClientCertificateMode. + */ public static final IngressClientCertificateMode REQUIRE = fromString("require"); /** * Creates a new instance of IngressClientCertificateMode value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -34,7 +40,7 @@ public IngressClientCertificateMode() { /** * Creates or finds a IngressClientCertificateMode from its string representation. - * + * * @param name a name to look for. * @return the corresponding IngressClientCertificateMode. */ @@ -45,7 +51,7 @@ public static IngressClientCertificateMode fromString(String name) { /** * Gets known IngressClientCertificateMode values. - * + * * @return known IngressClientCertificateMode values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressPortMapping.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressPortMapping.java new file mode 100644 index 000000000000..204a36953b79 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressPortMapping.java @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Port mappings of container app ingress. + */ +@Fluent +public final class IngressPortMapping { + /* + * Specifies whether the app port is accessible outside of the environment + */ + @JsonProperty(value = "external", required = true) + private boolean external; + + /* + * Specifies the port user's container listens on + */ + @JsonProperty(value = "targetPort", required = true) + private int targetPort; + + /* + * Specifies the exposed port for the target port. If not specified, it defaults to target port + */ + @JsonProperty(value = "exposedPort") + private Integer exposedPort; + + /** + * Creates an instance of IngressPortMapping class. + */ + public IngressPortMapping() { + } + + /** + * Get the external property: Specifies whether the app port is accessible outside of the environment. + * + * @return the external value. + */ + public boolean external() { + return this.external; + } + + /** + * Set the external property: Specifies whether the app port is accessible outside of the environment. + * + * @param external the external value to set. + * @return the IngressPortMapping object itself. + */ + public IngressPortMapping withExternal(boolean external) { + this.external = external; + return this; + } + + /** + * Get the targetPort property: Specifies the port user's container listens on. + * + * @return the targetPort value. + */ + public int targetPort() { + return this.targetPort; + } + + /** + * Set the targetPort property: Specifies the port user's container listens on. + * + * @param targetPort the targetPort value to set. + * @return the IngressPortMapping object itself. + */ + public IngressPortMapping withTargetPort(int targetPort) { + this.targetPort = targetPort; + return this; + } + + /** + * Get the exposedPort property: Specifies the exposed port for the target port. If not specified, it defaults to + * target port. + * + * @return the exposedPort value. + */ + public Integer exposedPort() { + return this.exposedPort; + } + + /** + * Set the exposedPort property: Specifies the exposed port for the target port. If not specified, it defaults to + * target port. + * + * @param exposedPort the exposedPort value to set. + * @return the IngressPortMapping object itself. + */ + public IngressPortMapping withExposedPort(Integer exposedPort) { + this.exposedPort = exposedPort; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressStickySessions.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressStickySessions.java index 8c4de6b75dfa..b6f60418efd7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressStickySessions.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressStickySessions.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Sticky Sessions for Single Revision Mode. */ +/** + * Sticky Sessions for Single Revision Mode. + */ @Fluent public final class IngressStickySessions { /* @@ -16,13 +18,15 @@ public final class IngressStickySessions { @JsonProperty(value = "affinity") private Affinity affinity; - /** Creates an instance of IngressStickySessions class. */ + /** + * Creates an instance of IngressStickySessions class. + */ public IngressStickySessions() { } /** * Get the affinity property: Sticky Session Affinity. - * + * * @return the affinity value. */ public Affinity affinity() { @@ -31,7 +35,7 @@ public Affinity affinity() { /** * Set the affinity property: Sticky Session Affinity. - * + * * @param affinity the affinity value to set. * @return the IngressStickySessions object itself. */ @@ -42,7 +46,7 @@ public IngressStickySessions withAffinity(Affinity affinity) { /** * 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/IngressTargetPortHttpScheme.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressTargetPortHttpScheme.java new file mode 100644 index 000000000000..479288c1707b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressTargetPortHttpScheme.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Whether an http app listens on http or https. + */ +public final class IngressTargetPortHttpScheme extends ExpandableStringEnum { + /** + * Static value http for IngressTargetPortHttpScheme. + */ + public static final IngressTargetPortHttpScheme HTTP = fromString("http"); + + /** + * Static value https for IngressTargetPortHttpScheme. + */ + public static final IngressTargetPortHttpScheme HTTPS = fromString("https"); + + /** + * Creates a new instance of IngressTargetPortHttpScheme value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public IngressTargetPortHttpScheme() { + } + + /** + * Creates or finds a IngressTargetPortHttpScheme from its string representation. + * + * @param name a name to look for. + * @return the corresponding IngressTargetPortHttpScheme. + */ + @JsonCreator + public static IngressTargetPortHttpScheme fromString(String name) { + return fromString(name, IngressTargetPortHttpScheme.class); + } + + /** + * Gets known IngressTargetPortHttpScheme values. + * + * @return known IngressTargetPortHttpScheme values. + */ + public static Collection values() { + return values(IngressTargetPortHttpScheme.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressTransportMethod.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressTransportMethod.java index 15eab472d3d2..e7f0f64fc6a0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressTransportMethod.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressTransportMethod.java @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Ingress transport protocol. */ +/** + * Ingress transport protocol. + */ public final class IngressTransportMethod extends ExpandableStringEnum { - /** Static value auto for IngressTransportMethod. */ + /** + * Static value auto for IngressTransportMethod. + */ public static final IngressTransportMethod AUTO = fromString("auto"); - /** Static value http for IngressTransportMethod. */ + /** + * Static value http for IngressTransportMethod. + */ public static final IngressTransportMethod HTTP = fromString("http"); - /** Static value http2 for IngressTransportMethod. */ + /** + * Static value http2 for IngressTransportMethod. + */ public static final IngressTransportMethod HTTP2 = fromString("http2"); - /** Static value tcp for IngressTransportMethod. */ + /** + * Static value tcp for IngressTransportMethod. + */ public static final IngressTransportMethod TCP = fromString("tcp"); /** * Creates a new instance of IngressTransportMethod value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public IngressTransportMethod() { /** * Creates or finds a IngressTransportMethod from its string representation. - * + * * @param name a name to look for. * @return the corresponding IngressTransportMethod. */ @@ -44,7 +54,7 @@ public static IngressTransportMethod fromString(String name) { /** * Gets known IngressTransportMethod values. - * + * * @return known IngressTransportMethod values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/InitContainer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/InitContainer.java index f1bee6364d89..dc57c485c5b8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/InitContainer.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/InitContainer.java @@ -7,56 +7,74 @@ import com.azure.core.annotation.Fluent; import java.util.List; -/** Container App init container definition. */ +/** + * Container App init container definition. + */ @Fluent public final class InitContainer extends BaseContainer { - /** Creates an instance of InitContainer class. */ + /** + * Creates an instance of InitContainer class. + */ public InitContainer() { } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public InitContainer withImage(String image) { super.withImage(image); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public InitContainer withName(String name) { super.withName(name); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public InitContainer withCommand(List command) { super.withCommand(command); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public InitContainer withArgs(List args) { super.withArgs(args); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public InitContainer withEnv(List env) { super.withEnv(env); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public InitContainer withResources(ContainerResources resources) { super.withResources(resources); return this; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @Override public InitContainer withVolumeMounts(List volumeMounts) { super.withVolumeMounts(volumeMounts); @@ -65,7 +83,7 @@ public InitContainer withVolumeMounts(List volumeMounts) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ @Override diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IpSecurityRestrictionRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IpSecurityRestrictionRule.java index 4c27320473b0..78fa22df8a37 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IpSecurityRestrictionRule.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IpSecurityRestrictionRule.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Rule to restrict incoming IP address. */ +/** + * Rule to restrict incoming IP address. + */ @Fluent public final class IpSecurityRestrictionRule { /* @@ -35,13 +37,15 @@ public final class IpSecurityRestrictionRule { @JsonProperty(value = "action", required = true) private Action action; - /** Creates an instance of IpSecurityRestrictionRule class. */ + /** + * Creates an instance of IpSecurityRestrictionRule class. + */ public IpSecurityRestrictionRule() { } /** * Get the name property: Name for the IP restriction rule. - * + * * @return the name value. */ public String name() { @@ -50,7 +54,7 @@ public String name() { /** * Set the name property: Name for the IP restriction rule. - * + * * @param name the name value to set. * @return the IpSecurityRestrictionRule object itself. */ @@ -62,7 +66,7 @@ public IpSecurityRestrictionRule withName(String name) { /** * Get the description property: Describe the IP restriction rule that is being sent to the container-app. This is * an optional field. - * + * * @return the description value. */ public String description() { @@ -72,7 +76,7 @@ public String description() { /** * Set the description property: Describe the IP restriction rule that is being sent to the container-app. This is * an optional field. - * + * * @param description the description value to set. * @return the IpSecurityRestrictionRule object itself. */ @@ -83,7 +87,7 @@ public IpSecurityRestrictionRule withDescription(String description) { /** * Get the ipAddressRange property: CIDR notation to match incoming IP address. - * + * * @return the ipAddressRange value. */ public String ipAddressRange() { @@ -92,7 +96,7 @@ public String ipAddressRange() { /** * Set the ipAddressRange property: CIDR notation to match incoming IP address. - * + * * @param ipAddressRange the ipAddressRange value to set. * @return the IpSecurityRestrictionRule object itself. */ @@ -104,7 +108,7 @@ public IpSecurityRestrictionRule withIpAddressRange(String ipAddressRange) { /** * Get the action property: Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL * Allow or ALL Deny. - * + * * @return the action value. */ public Action action() { @@ -114,7 +118,7 @@ public Action action() { /** * Set the action property: Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL * Allow or ALL Deny. - * + * * @param action the action value to set. * @return the IpSecurityRestrictionRule object itself. */ @@ -125,26 +129,21 @@ public IpSecurityRestrictionRule withAction(Action action) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (name() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property name in model IpSecurityRestrictionRule")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property name in model IpSecurityRestrictionRule")); } if (ipAddressRange() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property ipAddressRange in model IpSecurityRestrictionRule")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property ipAddressRange in model IpSecurityRestrictionRule")); } if (action() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property action in model IpSecurityRestrictionRule")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property action in model IpSecurityRestrictionRule")); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponent.java new file mode 100644 index 000000000000..bf42b2379e15 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponent.java @@ -0,0 +1,265 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner; +import java.util.List; + +/** + * An immutable client-side representation of JavaComponent. + */ +public interface JavaComponent { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the componentType property: Type of the Java Component. + * + * @return the componentType value. + */ + JavaComponentType componentType(); + + /** + * Gets the provisioningState property: Provisioning state of the Java Component. + * + * @return the provisioningState value. + */ + JavaComponentProvisioningState provisioningState(); + + /** + * Gets the configurations property: List of Java Components configuration properties. + * + * @return the configurations value. + */ + List configurations(); + + /** + * Gets the serviceBinds property: List of Java Components that are bound to the Java component. + * + * @return the serviceBinds value. + */ + List serviceBinds(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner object. + * + * @return the inner object. + */ + JavaComponentInner innerModel(); + + /** + * The entirety of the JavaComponent definition. + */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + + /** + * The JavaComponent definition stages. + */ + interface DefinitionStages { + /** + * The first stage of the JavaComponent definition. + */ + interface Blank extends WithParentResource { + } + + /** + * The stage of the JavaComponent definition allowing to specify parent resource. + */ + interface WithParentResource { + /** + * Specifies resourceGroupName, environmentName. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @return the next definition stage. + */ + WithCreate withExistingManagedEnvironment(String resourceGroupName, String environmentName); + } + + /** + * The stage of the JavaComponent definition which contains all the minimum required properties for the resource + * to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithComponentType, DefinitionStages.WithConfigurations, + DefinitionStages.WithServiceBinds { + /** + * Executes the create request. + * + * @return the created resource. + */ + JavaComponent create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + JavaComponent create(Context context); + } + + /** + * The stage of the JavaComponent definition allowing to specify componentType. + */ + interface WithComponentType { + /** + * Specifies the componentType property: Type of the Java Component.. + * + * @param componentType Type of the Java Component. + * @return the next definition stage. + */ + WithCreate withComponentType(JavaComponentType componentType); + } + + /** + * The stage of the JavaComponent definition allowing to specify configurations. + */ + interface WithConfigurations { + /** + * Specifies the configurations property: List of Java Components configuration properties. + * + * @param configurations List of Java Components configuration properties. + * @return the next definition stage. + */ + WithCreate withConfigurations(List configurations); + } + + /** + * The stage of the JavaComponent definition allowing to specify serviceBinds. + */ + interface WithServiceBinds { + /** + * Specifies the serviceBinds property: List of Java Components that are bound to the Java component. + * + * @param serviceBinds List of Java Components that are bound to the Java component. + * @return the next definition stage. + */ + WithCreate withServiceBinds(List serviceBinds); + } + } + + /** + * Begins update for the JavaComponent resource. + * + * @return the stage of resource update. + */ + JavaComponent.Update update(); + + /** + * The template for JavaComponent update. + */ + interface Update + extends UpdateStages.WithComponentType, UpdateStages.WithConfigurations, UpdateStages.WithServiceBinds { + /** + * Executes the update request. + * + * @return the updated resource. + */ + JavaComponent apply(); + + /** + * Executes the update request. + * + * @param context The context to associate with this operation. + * @return the updated resource. + */ + JavaComponent apply(Context context); + } + + /** + * The JavaComponent update stages. + */ + interface UpdateStages { + /** + * The stage of the JavaComponent update allowing to specify componentType. + */ + interface WithComponentType { + /** + * Specifies the componentType property: Type of the Java Component.. + * + * @param componentType Type of the Java Component. + * @return the next definition stage. + */ + Update withComponentType(JavaComponentType componentType); + } + + /** + * The stage of the JavaComponent update allowing to specify configurations. + */ + interface WithConfigurations { + /** + * Specifies the configurations property: List of Java Components configuration properties. + * + * @param configurations List of Java Components configuration properties. + * @return the next definition stage. + */ + Update withConfigurations(List configurations); + } + + /** + * The stage of the JavaComponent update allowing to specify serviceBinds. + */ + interface WithServiceBinds { + /** + * Specifies the serviceBinds property: List of Java Components that are bound to the Java component. + * + * @param serviceBinds List of Java Components that are bound to the Java component. + * @return the next definition stage. + */ + Update withServiceBinds(List serviceBinds); + } + } + + /** + * Refreshes the resource to sync with Azure. + * + * @return the refreshed resource. + */ + JavaComponent refresh(); + + /** + * Refreshes the resource to sync with Azure. + * + * @param context The context to associate with this operation. + * @return the refreshed resource. + */ + JavaComponent refresh(Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentConfigurationProperty.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentConfigurationProperty.java new file mode 100644 index 000000000000..03843583c021 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentConfigurationProperty.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Configuration properties for a Java Component. + */ +@Fluent +public final class JavaComponentConfigurationProperty { + /* + * The name of the property + */ + @JsonProperty(value = "propertyName") + private String propertyName; + + /* + * The value of the property + */ + @JsonProperty(value = "value") + private String value; + + /** + * Creates an instance of JavaComponentConfigurationProperty class. + */ + public JavaComponentConfigurationProperty() { + } + + /** + * Get the propertyName property: The name of the property. + * + * @return the propertyName value. + */ + public String propertyName() { + return this.propertyName; + } + + /** + * Set the propertyName property: The name of the property. + * + * @param propertyName the propertyName value to set. + * @return the JavaComponentConfigurationProperty object itself. + */ + public JavaComponentConfigurationProperty withPropertyName(String propertyName) { + this.propertyName = propertyName; + return this; + } + + /** + * Get the value property: The value of the property. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: The value of the property. + * + * @param value the value value to set. + * @return the JavaComponentConfigurationProperty object itself. + */ + public JavaComponentConfigurationProperty withValue(String value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentProvisioningState.java new file mode 100644 index 000000000000..40caabccda70 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentProvisioningState.java @@ -0,0 +1,68 @@ +// Copyright (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; + +/** + * Provisioning state of the Java Component. + */ +public final class JavaComponentProvisioningState extends ExpandableStringEnum { + /** + * Static value Succeeded for JavaComponentProvisioningState. + */ + public static final JavaComponentProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** + * Static value Failed for JavaComponentProvisioningState. + */ + public static final JavaComponentProvisioningState FAILED = fromString("Failed"); + + /** + * Static value Canceled for JavaComponentProvisioningState. + */ + public static final JavaComponentProvisioningState CANCELED = fromString("Canceled"); + + /** + * Static value Deleting for JavaComponentProvisioningState. + */ + public static final JavaComponentProvisioningState DELETING = fromString("Deleting"); + + /** + * Static value InProgress for JavaComponentProvisioningState. + */ + public static final JavaComponentProvisioningState IN_PROGRESS = fromString("InProgress"); + + /** + * Creates a new instance of JavaComponentProvisioningState value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public JavaComponentProvisioningState() { + } + + /** + * Creates or finds a JavaComponentProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding JavaComponentProvisioningState. + */ + @JsonCreator + public static JavaComponentProvisioningState fromString(String name) { + return fromString(name, JavaComponentProvisioningState.class); + } + + /** + * Gets known JavaComponentProvisioningState values. + * + * @return known JavaComponentProvisioningState values. + */ + public static Collection values() { + return values(JavaComponentProvisioningState.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentServiceBind.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentServiceBind.java new file mode 100644 index 000000000000..382c10132618 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentServiceBind.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Configuration to bind a Java Component to another Java Component. + */ +@Fluent +public final class JavaComponentServiceBind { + /* + * Name of the service bind + */ + @JsonProperty(value = "name") + private String name; + + /* + * Resource id of the target service + */ + @JsonProperty(value = "serviceId") + private String serviceId; + + /** + * Creates an instance of JavaComponentServiceBind class. + */ + public JavaComponentServiceBind() { + } + + /** + * Get the name property: Name of the service bind. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name of the service bind. + * + * @param name the name value to set. + * @return the JavaComponentServiceBind object itself. + */ + public JavaComponentServiceBind withName(String name) { + this.name = name; + return this; + } + + /** + * Get the serviceId property: Resource id of the target service. + * + * @return the serviceId value. + */ + public String serviceId() { + return this.serviceId; + } + + /** + * Set the serviceId property: Resource id of the target service. + * + * @param serviceId the serviceId value to set. + * @return the JavaComponentServiceBind object itself. + */ + public JavaComponentServiceBind withServiceId(String serviceId) { + this.serviceId = serviceId; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentType.java new file mode 100644 index 000000000000..d9b56599c589 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentType.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** + * Type of the Java Component. + */ +public final class JavaComponentType extends ExpandableStringEnum { + /** + * Static value SpringBootAdmin for JavaComponentType. + */ + public static final JavaComponentType SPRING_BOOT_ADMIN = fromString("SpringBootAdmin"); + + /** + * Static value SpringCloudEureka for JavaComponentType. + */ + public static final JavaComponentType SPRING_CLOUD_EUREKA = fromString("SpringCloudEureka"); + + /** + * Static value SpringCloudConfig for JavaComponentType. + */ + public static final JavaComponentType SPRING_CLOUD_CONFIG = fromString("SpringCloudConfig"); + + /** + * Static value Nacos for JavaComponentType. + */ + public static final JavaComponentType NACOS = fromString("Nacos"); + + /** + * Creates a new instance of JavaComponentType value. + * + * @deprecated Use the {@link #fromString(String)} factory method. + */ + @Deprecated + public JavaComponentType() { + } + + /** + * Creates or finds a JavaComponentType from its string representation. + * + * @param name a name to look for. + * @return the corresponding JavaComponentType. + */ + @JsonCreator + public static JavaComponentType fromString(String name) { + return fromString(name, JavaComponentType.class); + } + + /** + * Gets known JavaComponentType values. + * + * @return known JavaComponentType values. + */ + public static Collection values() { + return values(JavaComponentType.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponents.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponents.java new file mode 100644 index 000000000000..3f27736d5a73 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponents.java @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** + * Resource collection API of JavaComponents. + */ +public interface JavaComponents { + /** + * Get the Java Components for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Java Components for a managed environment as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String environmentName); + + /** + * Get the Java Components for a managed environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the Java Components for a managed environment as paginated response with {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String environmentName, Context context); + + /** + * Get a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Java Component along with {@link Response}. + */ + Response getWithResponse(String resourceGroupName, String environmentName, String name, + Context context); + + /** + * Get a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Java Component. + */ + JavaComponent get(String resourceGroupName, String environmentName, String name); + + /** + * Delete a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String environmentName, String name); + + /** + * Delete a Java Component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param name Name of the Java Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String environmentName, String name, Context context); + + /** + * Get a Java Component. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Java Component along with {@link Response}. + */ + JavaComponent getById(String id); + + /** + * Get a Java Component. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a Java Component along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * Delete a Java Component. + * + * @param id the resource ID. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteById(String id); + + /** + * Delete a Java Component. + * + * @param id the resource ID. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void deleteByIdWithResponse(String id, Context context); + + /** + * Begins definition for a new JavaComponent resource. + * + * @param name resource name. + * @return the first stage of the new JavaComponent definition. + */ + JavaComponent.DefinitionStages.Blank define(String name); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentsCollection.java new file mode 100644 index 000000000000..595151e50511 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JavaComponentsCollection.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Java Components ARM resource. + */ +@Fluent +public final class JavaComponentsCollection { + /* + * Collection of resources. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * Link to next page of resources. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * Creates an instance of JavaComponentsCollection class. + */ + public JavaComponentsCollection() { + } + + /** + * Get the value property: Collection of resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Collection of resources. + * + * @param value the value value to set. + * @return the JavaComponentsCollection object itself. + */ + public JavaComponentsCollection withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: Link to next page of resources. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model JavaComponentsCollection")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(JavaComponentsCollection.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Job.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Job.java index 1f8e936f0514..1834712523b2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Job.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Job.java @@ -12,154 +12,168 @@ import java.util.List; import java.util.Map; -/** An immutable client-side representation of Job. */ +/** + * An immutable client-side representation of Job. + */ public interface Job { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); + /** + * Gets the extendedLocation property: The complex type of the extended location. + * + * @return the extendedLocation value. + */ + ExtendedLocation extendedLocation(); + /** * Gets the identity property: Managed identities needed by a container app job to interact with other Azure * services to not maintain any secrets or credentials in code. - * + * * @return the identity value. */ ManagedServiceIdentity identity(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the provisioningState property: Provisioning state of the Container Apps Job. - * + * * @return the provisioningState value. */ JobProvisioningState provisioningState(); /** * Gets the environmentId property: Resource ID of environment. - * + * * @return the environmentId value. */ String environmentId(); /** * Gets the workloadProfileName property: Workload profile name to pin for container apps job execution. - * + * * @return the workloadProfileName value. */ String workloadProfileName(); /** * Gets the configuration property: Container Apps Job configuration properties. - * + * * @return the configuration value. */ JobConfiguration configuration(); /** * Gets the template property: Container Apps job definition. - * + * * @return the template value. */ JobTemplate template(); /** * Gets the outboundIpAddresses property: Outbound IP Addresses of a container apps job. - * + * * @return the outboundIpAddresses value. */ List outboundIpAddresses(); /** * Gets the eventStreamEndpoint property: The endpoint of the eventstream of the container apps job. - * + * * @return the eventStreamEndpoint value. */ String eventStreamEndpoint(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.JobInner object. - * + * * @return the inner object. */ JobInner innerModel(); - /** The entirety of the Job definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the Job definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The Job definition stages. */ + /** + * The Job definition stages. + */ interface DefinitionStages { - /** The first stage of the Job definition. */ + /** + * The first stage of the Job definition. + */ interface Blank extends WithLocation { } - /** The stage of the Job definition allowing to specify location. */ + /** + * The stage of the Job definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -167,18 +181,20 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the Job definition allowing to specify parent resource. */ + /** + * The stage of the Job definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ @@ -189,92 +205,113 @@ interface WithResourceGroup { * The stage of the Job definition which contains all the minimum required properties for the resource to be * created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithIdentity, - DefinitionStages.WithEnvironmentId, - DefinitionStages.WithWorkloadProfileName, - DefinitionStages.WithConfiguration, - DefinitionStages.WithTemplate { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithExtendedLocation, + DefinitionStages.WithIdentity, DefinitionStages.WithEnvironmentId, DefinitionStages.WithWorkloadProfileName, + DefinitionStages.WithConfiguration, DefinitionStages.WithTemplate { /** * Executes the create request. - * + * * @return the created resource. */ Job create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ Job create(Context context); } - /** The stage of the Job definition allowing to specify tags. */ + /** + * The stage of the Job definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the Job definition allowing to specify identity. */ + /** + * The stage of the Job definition allowing to specify extendedLocation. + */ + interface WithExtendedLocation { + /** + * Specifies the extendedLocation property: The complex type of the extended location.. + * + * @param extendedLocation The complex type of the extended location. + * @return the next definition stage. + */ + WithCreate withExtendedLocation(ExtendedLocation extendedLocation); + } + + /** + * The stage of the Job definition allowing to specify identity. + */ interface WithIdentity { /** * Specifies the identity property: Managed identities needed by a container app job to interact with other * Azure services to not maintain any secrets or credentials in code.. - * + * * @param identity Managed identities needed by a container app job to interact with other Azure services to - * not maintain any secrets or credentials in code. + * not maintain any secrets or credentials in code. * @return the next definition stage. */ WithCreate withIdentity(ManagedServiceIdentity identity); } - /** The stage of the Job definition allowing to specify environmentId. */ + /** + * The stage of the Job definition allowing to specify environmentId. + */ interface WithEnvironmentId { /** * Specifies the environmentId property: Resource ID of environment.. - * + * * @param environmentId Resource ID of environment. * @return the next definition stage. */ WithCreate withEnvironmentId(String environmentId); } - /** The stage of the Job definition allowing to specify workloadProfileName. */ + /** + * The stage of the Job definition allowing to specify workloadProfileName. + */ interface WithWorkloadProfileName { /** * Specifies the workloadProfileName property: Workload profile name to pin for container apps job * execution.. - * + * * @param workloadProfileName Workload profile name to pin for container apps job execution. * @return the next definition stage. */ WithCreate withWorkloadProfileName(String workloadProfileName); } - /** The stage of the Job definition allowing to specify configuration. */ + /** + * The stage of the Job definition allowing to specify configuration. + */ interface WithConfiguration { /** * Specifies the configuration property: Container Apps Job configuration properties.. - * + * * @param configuration Container Apps Job configuration properties. * @return the next definition stage. */ WithCreate withConfiguration(JobConfiguration configuration); } - /** The stage of the Job definition allowing to specify template. */ + /** + * The stage of the Job definition allowing to specify template. + */ interface WithTemplate { /** * Specifies the template property: Container Apps job definition.. - * + * * @param template Container Apps job definition. * @return the next definition stage. */ @@ -284,60 +321,84 @@ interface WithTemplate { /** * Begins update for the Job resource. - * + * * @return the stage of resource update. */ Job.Update update(); - /** The template for Job update. */ - interface Update extends UpdateStages.WithTags, UpdateStages.WithIdentity, UpdateStages.WithProperties { + /** + * The template for Job update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithExtendedLocation, UpdateStages.WithIdentity, + UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ Job apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ Job apply(Context context); } - /** The Job update stages. */ + /** + * The Job update stages. + */ interface UpdateStages { - /** The stage of the Job update allowing to specify tags. */ + /** + * The stage of the Job update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); } - /** The stage of the Job update allowing to specify identity. */ + /** + * The stage of the Job update allowing to specify extendedLocation. + */ + interface WithExtendedLocation { + /** + * Specifies the extendedLocation property: The complex type of the extended location.. + * + * @param extendedLocation The complex type of the extended location. + * @return the next definition stage. + */ + Update withExtendedLocation(ExtendedLocation extendedLocation); + } + + /** + * The stage of the Job update allowing to specify identity. + */ interface WithIdentity { /** * Specifies the identity property: Managed identities needed by a container app job to interact with other * Azure services to not maintain any secrets or credentials in code.. - * + * * @param identity Managed identities needed by a container app job to interact with other Azure services to - * not maintain any secrets or credentials in code. + * not maintain any secrets or credentials in code. * @return the next definition stage. */ Update withIdentity(ManagedServiceIdentity identity); } - /** The stage of the Job update allowing to specify properties. */ + /** + * The stage of the Job update allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: The properties property.. - * + * * @param properties The properties property. * @return the next definition stage. */ @@ -347,14 +408,14 @@ interface WithProperties { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ Job refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -362,9 +423,9 @@ interface WithProperties { /** * Start a Container Apps Job. - * + * * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App's Job execution name. */ @@ -372,12 +433,12 @@ interface WithProperties { /** * Start a Container Apps Job. - * + * * @param template Properties used to start a job execution. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App's Job execution name. */ @@ -385,9 +446,9 @@ interface WithProperties { /** * Terminates execution of a running container apps job. - * + * * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App executions collection ARM resource. */ @@ -395,11 +456,11 @@ interface WithProperties { /** * Terminates execution of a running container apps job. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App executions collection ARM resource. */ @@ -407,11 +468,11 @@ interface WithProperties { /** * List secrets for a container apps job. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container Apps Job Secrets Collection ARM resource along with {@link Response}. */ @@ -419,9 +480,9 @@ interface WithProperties { /** * List secrets for a container apps job. - * + * * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container Apps Job Secrets Collection ARM resource. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfiguration.java index 647c2dadb87e..12c36c4401d1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfiguration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfiguration.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Non versioned Container Apps Job configuration properties. */ +/** + * Non versioned Container Apps Job configuration properties. + */ @Fluent public final class JobConfiguration { /* @@ -62,13 +64,15 @@ public final class JobConfiguration { @JsonProperty(value = "registries") private List registries; - /** Creates an instance of JobConfiguration class. */ + /** + * Creates an instance of JobConfiguration class. + */ public JobConfiguration() { } /** * Get the secrets property: Collection of secrets used by a Container Apps Job. - * + * * @return the secrets value. */ public List secrets() { @@ -77,7 +81,7 @@ public List secrets() { /** * Set the secrets property: Collection of secrets used by a Container Apps Job. - * + * * @param secrets the secrets value to set. * @return the JobConfiguration object itself. */ @@ -88,7 +92,7 @@ public JobConfiguration withSecrets(List secrets) { /** * Get the triggerType property: Trigger type of the job. - * + * * @return the triggerType value. */ public TriggerType triggerType() { @@ -97,7 +101,7 @@ public TriggerType triggerType() { /** * Set the triggerType property: Trigger type of the job. - * + * * @param triggerType the triggerType value to set. * @return the JobConfiguration object itself. */ @@ -108,7 +112,7 @@ public JobConfiguration withTriggerType(TriggerType triggerType) { /** * Get the replicaTimeout property: Maximum number of seconds a replica is allowed to run. - * + * * @return the replicaTimeout value. */ public int replicaTimeout() { @@ -117,7 +121,7 @@ public int replicaTimeout() { /** * Set the replicaTimeout property: Maximum number of seconds a replica is allowed to run. - * + * * @param replicaTimeout the replicaTimeout value to set. * @return the JobConfiguration object itself. */ @@ -128,7 +132,7 @@ public JobConfiguration withReplicaTimeout(int replicaTimeout) { /** * Get the replicaRetryLimit property: Maximum number of retries before failing the job. - * + * * @return the replicaRetryLimit value. */ public Integer replicaRetryLimit() { @@ -137,7 +141,7 @@ public Integer replicaRetryLimit() { /** * Set the replicaRetryLimit property: Maximum number of retries before failing the job. - * + * * @param replicaRetryLimit the replicaRetryLimit value to set. * @return the JobConfiguration object itself. */ @@ -149,7 +153,7 @@ public JobConfiguration withReplicaRetryLimit(Integer replicaRetryLimit) { /** * Get the manualTriggerConfig property: Manual trigger configuration for a single execution job. Properties * replicaCompletionCount and parallelism would be set to 1 by default. - * + * * @return the manualTriggerConfig value. */ public JobConfigurationManualTriggerConfig manualTriggerConfig() { @@ -159,7 +163,7 @@ public JobConfigurationManualTriggerConfig manualTriggerConfig() { /** * Set the manualTriggerConfig property: Manual trigger configuration for a single execution job. Properties * replicaCompletionCount and parallelism would be set to 1 by default. - * + * * @param manualTriggerConfig the manualTriggerConfig value to set. * @return the JobConfiguration object itself. */ @@ -171,7 +175,7 @@ public JobConfiguration withManualTriggerConfig(JobConfigurationManualTriggerCon /** * Get the scheduleTriggerConfig property: Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. * Properties completions and parallelism would be set to 1 by default. - * + * * @return the scheduleTriggerConfig value. */ public JobConfigurationScheduleTriggerConfig scheduleTriggerConfig() { @@ -181,7 +185,7 @@ public JobConfigurationScheduleTriggerConfig scheduleTriggerConfig() { /** * Set the scheduleTriggerConfig property: Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. * Properties completions and parallelism would be set to 1 by default. - * + * * @param scheduleTriggerConfig the scheduleTriggerConfig value to set. * @return the JobConfiguration object itself. */ @@ -192,7 +196,7 @@ public JobConfiguration withScheduleTriggerConfig(JobConfigurationScheduleTrigge /** * Get the eventTriggerConfig property: Trigger configuration of an event driven job. - * + * * @return the eventTriggerConfig value. */ public JobConfigurationEventTriggerConfig eventTriggerConfig() { @@ -201,7 +205,7 @@ public JobConfigurationEventTriggerConfig eventTriggerConfig() { /** * Set the eventTriggerConfig property: Trigger configuration of an event driven job. - * + * * @param eventTriggerConfig the eventTriggerConfig value to set. * @return the JobConfiguration object itself. */ @@ -212,7 +216,7 @@ public JobConfiguration withEventTriggerConfig(JobConfigurationEventTriggerConfi /** * Get the registries property: Collection of private container registry credentials used by a Container apps job. - * + * * @return the registries value. */ public List registries() { @@ -221,7 +225,7 @@ public List registries() { /** * Set the registries property: Collection of private container registry credentials used by a Container apps job. - * + * * @param registries the registries value to set. * @return the JobConfiguration object itself. */ @@ -232,7 +236,7 @@ public JobConfiguration withRegistries(List registries) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { @@ -240,9 +244,8 @@ public void validate() { secrets().forEach(e -> e.validate()); } if (triggerType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property triggerType in model JobConfiguration")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property triggerType in model JobConfiguration")); } if (manualTriggerConfig() != null) { manualTriggerConfig().validate(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationEventTriggerConfig.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationEventTriggerConfig.java index d2a7e3053a93..fb10042c2e63 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationEventTriggerConfig.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationEventTriggerConfig.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Trigger configuration of an event driven job. */ +/** + * Trigger configuration of an event driven job. + */ @Fluent public final class JobConfigurationEventTriggerConfig { /* @@ -28,14 +30,16 @@ public final class JobConfigurationEventTriggerConfig { @JsonProperty(value = "scale") private JobScale scale; - /** Creates an instance of JobConfigurationEventTriggerConfig class. */ + /** + * Creates an instance of JobConfigurationEventTriggerConfig class. + */ public JobConfigurationEventTriggerConfig() { } /** * Get the replicaCompletionCount property: Minimum number of successful replica completions before overall job * completion. - * + * * @return the replicaCompletionCount value. */ public Integer replicaCompletionCount() { @@ -45,7 +49,7 @@ public Integer replicaCompletionCount() { /** * Set the replicaCompletionCount property: Minimum number of successful replica completions before overall job * completion. - * + * * @param replicaCompletionCount the replicaCompletionCount value to set. * @return the JobConfigurationEventTriggerConfig object itself. */ @@ -56,7 +60,7 @@ public JobConfigurationEventTriggerConfig withReplicaCompletionCount(Integer rep /** * Get the parallelism property: Number of parallel replicas of a job that can run at a given time. - * + * * @return the parallelism value. */ public Integer parallelism() { @@ -65,7 +69,7 @@ public Integer parallelism() { /** * Set the parallelism property: Number of parallel replicas of a job that can run at a given time. - * + * * @param parallelism the parallelism value to set. * @return the JobConfigurationEventTriggerConfig object itself. */ @@ -76,7 +80,7 @@ public JobConfigurationEventTriggerConfig withParallelism(Integer parallelism) { /** * Get the scale property: Scaling configurations for event driven jobs. - * + * * @return the scale value. */ public JobScale scale() { @@ -85,7 +89,7 @@ public JobScale scale() { /** * Set the scale property: Scaling configurations for event driven jobs. - * + * * @param scale the scale value to set. * @return the JobConfigurationEventTriggerConfig object itself. */ @@ -96,7 +100,7 @@ public JobConfigurationEventTriggerConfig withScale(JobScale scale) { /** * 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/JobConfigurationManualTriggerConfig.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationManualTriggerConfig.java index 64bd76c83627..dbc0e1127a7b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationManualTriggerConfig.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationManualTriggerConfig.java @@ -25,14 +25,16 @@ public final class JobConfigurationManualTriggerConfig { @JsonProperty(value = "parallelism") private Integer parallelism; - /** Creates an instance of JobConfigurationManualTriggerConfig class. */ + /** + * Creates an instance of JobConfigurationManualTriggerConfig class. + */ public JobConfigurationManualTriggerConfig() { } /** * Get the replicaCompletionCount property: Minimum number of successful replica completions before overall job * completion. - * + * * @return the replicaCompletionCount value. */ public Integer replicaCompletionCount() { @@ -42,7 +44,7 @@ public Integer replicaCompletionCount() { /** * Set the replicaCompletionCount property: Minimum number of successful replica completions before overall job * completion. - * + * * @param replicaCompletionCount the replicaCompletionCount value to set. * @return the JobConfigurationManualTriggerConfig object itself. */ @@ -53,7 +55,7 @@ public JobConfigurationManualTriggerConfig withReplicaCompletionCount(Integer re /** * Get the parallelism property: Number of parallel replicas of a job that can run at a given time. - * + * * @return the parallelism value. */ public Integer parallelism() { @@ -62,7 +64,7 @@ public Integer parallelism() { /** * Set the parallelism property: Number of parallel replicas of a job that can run at a given time. - * + * * @param parallelism the parallelism value to set. * @return the JobConfigurationManualTriggerConfig object itself. */ @@ -73,7 +75,7 @@ public JobConfigurationManualTriggerConfig withParallelism(Integer parallelism) /** * 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/JobConfigurationScheduleTriggerConfig.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationScheduleTriggerConfig.java index 69435efd237d..4ce57dc75d70 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationScheduleTriggerConfig.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobConfigurationScheduleTriggerConfig.java @@ -9,8 +9,8 @@ import com.fasterxml.jackson.annotation.JsonProperty; /** - * Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be - * set to 1 by default. + * Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would + * be set to 1 by default. */ @Fluent public final class JobConfigurationScheduleTriggerConfig { @@ -32,14 +32,16 @@ public final class JobConfigurationScheduleTriggerConfig { @JsonProperty(value = "parallelism") private Integer parallelism; - /** Creates an instance of JobConfigurationScheduleTriggerConfig class. */ + /** + * Creates an instance of JobConfigurationScheduleTriggerConfig class. + */ public JobConfigurationScheduleTriggerConfig() { } /** * Get the replicaCompletionCount property: Minimum number of successful replica completions before overall job * completion. - * + * * @return the replicaCompletionCount value. */ public Integer replicaCompletionCount() { @@ -49,7 +51,7 @@ public Integer replicaCompletionCount() { /** * Set the replicaCompletionCount property: Minimum number of successful replica completions before overall job * completion. - * + * * @param replicaCompletionCount the replicaCompletionCount value to set. * @return the JobConfigurationScheduleTriggerConfig object itself. */ @@ -60,7 +62,7 @@ public JobConfigurationScheduleTriggerConfig withReplicaCompletionCount(Integer /** * Get the cronExpression property: Cron formatted repeating schedule ("* * * * *") of a Cron Job. - * + * * @return the cronExpression value. */ public String cronExpression() { @@ -69,7 +71,7 @@ public String cronExpression() { /** * Set the cronExpression property: Cron formatted repeating schedule ("* * * * *") of a Cron Job. - * + * * @param cronExpression the cronExpression value to set. * @return the JobConfigurationScheduleTriggerConfig object itself. */ @@ -80,7 +82,7 @@ public JobConfigurationScheduleTriggerConfig withCronExpression(String cronExpre /** * Get the parallelism property: Number of parallel replicas of a job that can run at a given time. - * + * * @return the parallelism value. */ public Integer parallelism() { @@ -89,7 +91,7 @@ public Integer parallelism() { /** * Set the parallelism property: Number of parallel replicas of a job that can run at a given time. - * + * * @param parallelism the parallelism value to set. * @return the JobConfigurationScheduleTriggerConfig object itself. */ @@ -100,15 +102,13 @@ public JobConfigurationScheduleTriggerConfig withParallelism(Integer parallelism /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (cronExpression() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property cronExpression in model JobConfigurationScheduleTriggerConfig")); + throw LOGGER.logExceptionAsError(new IllegalArgumentException( + "Missing required property cronExpression in model JobConfigurationScheduleTriggerConfig")); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecution.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecution.java index 94a3a816e3c8..cf83584a4386 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecution.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecution.java @@ -7,60 +7,62 @@ import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner; import java.time.OffsetDateTime; -/** An immutable client-side representation of JobExecution. */ +/** + * An immutable client-side representation of JobExecution. + */ public interface JobExecution { /** * Gets the name property: Job execution Name. - * + * * @return the name value. */ String name(); /** * Gets the id property: Job execution Id. - * + * * @return the id value. */ String id(); /** - * Gets the type property: Job Type. - * + * Gets the type property: Job execution type. + * * @return the type value. */ String type(); /** * Gets the status property: Current running State of the job. - * + * * @return the status value. */ JobExecutionRunningState status(); /** * Gets the startTime property: Job execution start time. - * + * * @return the startTime value. */ OffsetDateTime startTime(); /** * Gets the endTime property: Job execution end time. - * + * * @return the endTime value. */ OffsetDateTime endTime(); /** * Gets the template property: Job's execution container. - * + * * @return the template value. */ JobExecutionTemplate template(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner object. - * + * * @return the inner object. */ JobExecutionInner innerModel(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionBase.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionBase.java index fb4caf902bb2..9a987dc30d60 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionBase.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionBase.java @@ -6,25 +6,27 @@ import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionBaseInner; -/** An immutable client-side representation of JobExecutionBase. */ +/** + * An immutable client-side representation of JobExecutionBase. + */ public interface JobExecutionBase { /** * Gets the name property: Job execution name. - * + * * @return the name value. */ String name(); /** * Gets the id property: Job execution Id. - * + * * @return the id value. */ String id(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionBaseInner object. - * + * * @return the inner object. */ JobExecutionBaseInner innerModel(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionContainer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionContainer.java index dea126fc397c..254e4f869bc8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionContainer.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionContainer.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Container Apps Jobs execution container definition. */ +/** + * Container Apps Jobs execution container definition. + */ @Fluent public final class JobExecutionContainer { /* @@ -47,13 +49,15 @@ public final class JobExecutionContainer { @JsonProperty(value = "resources") private ContainerResources resources; - /** Creates an instance of JobExecutionContainer class. */ + /** + * Creates an instance of JobExecutionContainer class. + */ public JobExecutionContainer() { } /** * Get the image property: Container image tag. - * + * * @return the image value. */ public String image() { @@ -62,7 +66,7 @@ public String image() { /** * Set the image property: Container image tag. - * + * * @param image the image value to set. * @return the JobExecutionContainer object itself. */ @@ -73,7 +77,7 @@ public JobExecutionContainer withImage(String image) { /** * Get the name property: Custom container name. - * + * * @return the name value. */ public String name() { @@ -82,7 +86,7 @@ public String name() { /** * Set the name property: Custom container name. - * + * * @param name the name value to set. * @return the JobExecutionContainer object itself. */ @@ -93,7 +97,7 @@ public JobExecutionContainer withName(String name) { /** * Get the command property: Container start command. - * + * * @return the command value. */ public List command() { @@ -102,7 +106,7 @@ public List command() { /** * Set the command property: Container start command. - * + * * @param command the command value to set. * @return the JobExecutionContainer object itself. */ @@ -113,7 +117,7 @@ public JobExecutionContainer withCommand(List command) { /** * Get the args property: Container start command arguments. - * + * * @return the args value. */ public List args() { @@ -122,7 +126,7 @@ public List args() { /** * Set the args property: Container start command arguments. - * + * * @param args the args value to set. * @return the JobExecutionContainer object itself. */ @@ -133,7 +137,7 @@ public JobExecutionContainer withArgs(List args) { /** * Get the env property: Container environment variables. - * + * * @return the env value. */ public List env() { @@ -142,7 +146,7 @@ public List env() { /** * Set the env property: Container environment variables. - * + * * @param env the env value to set. * @return the JobExecutionContainer object itself. */ @@ -153,7 +157,7 @@ public JobExecutionContainer withEnv(List env) { /** * Get the resources property: Container resource requirements. - * + * * @return the resources value. */ public ContainerResources resources() { @@ -162,7 +166,7 @@ public ContainerResources resources() { /** * Set the resources property: Container resource requirements. - * + * * @param resources the resources value to set. * @return the JobExecutionContainer object itself. */ @@ -173,7 +177,7 @@ public JobExecutionContainer withResources(ContainerResources resources) { /** * 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/JobExecutionRunningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionRunningState.java index d10e8261d16c..aed929aec861 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionRunningState.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionRunningState.java @@ -8,32 +8,48 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Current running State of the job. */ +/** + * Current running State of the job. + */ public final class JobExecutionRunningState extends ExpandableStringEnum { - /** Static value Running for JobExecutionRunningState. */ + /** + * Static value Running for JobExecutionRunningState. + */ public static final JobExecutionRunningState RUNNING = fromString("Running"); - /** Static value Processing for JobExecutionRunningState. */ + /** + * Static value Processing for JobExecutionRunningState. + */ public static final JobExecutionRunningState PROCESSING = fromString("Processing"); - /** Static value Stopped for JobExecutionRunningState. */ + /** + * Static value Stopped for JobExecutionRunningState. + */ public static final JobExecutionRunningState STOPPED = fromString("Stopped"); - /** Static value Degraded for JobExecutionRunningState. */ + /** + * Static value Degraded for JobExecutionRunningState. + */ public static final JobExecutionRunningState DEGRADED = fromString("Degraded"); - /** Static value Failed for JobExecutionRunningState. */ + /** + * Static value Failed for JobExecutionRunningState. + */ public static final JobExecutionRunningState FAILED = fromString("Failed"); - /** Static value Unknown for JobExecutionRunningState. */ + /** + * Static value Unknown for JobExecutionRunningState. + */ public static final JobExecutionRunningState UNKNOWN = fromString("Unknown"); - /** Static value Succeeded for JobExecutionRunningState. */ + /** + * Static value Succeeded for JobExecutionRunningState. + */ public static final JobExecutionRunningState SUCCEEDED = fromString("Succeeded"); /** * Creates a new instance of JobExecutionRunningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -42,7 +58,7 @@ public JobExecutionRunningState() { /** * Creates or finds a JobExecutionRunningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding JobExecutionRunningState. */ @@ -53,7 +69,7 @@ public static JobExecutionRunningState fromString(String name) { /** * Gets known JobExecutionRunningState values. - * + * * @return known JobExecutionRunningState values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionTemplate.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionTemplate.java index eec1fda1387a..c9305f3f20c0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionTemplate.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobExecutionTemplate.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Job's execution template, containing container configuration for a job's execution. */ +/** + * Job's execution template, containing container configuration for a job's execution. + */ @Fluent public final class JobExecutionTemplate { /* @@ -23,13 +25,15 @@ public final class JobExecutionTemplate { @JsonProperty(value = "initContainers") private List initContainers; - /** Creates an instance of JobExecutionTemplate class. */ + /** + * Creates an instance of JobExecutionTemplate class. + */ public JobExecutionTemplate() { } /** * Get the containers property: List of container definitions for the Container Apps Job. - * + * * @return the containers value. */ public List containers() { @@ -38,7 +42,7 @@ public List containers() { /** * Set the containers property: List of container definitions for the Container Apps Job. - * + * * @param containers the containers value to set. * @return the JobExecutionTemplate object itself. */ @@ -49,7 +53,7 @@ public JobExecutionTemplate withContainers(List container /** * Get the initContainers property: List of specialized containers that run before job containers. - * + * * @return the initContainers value. */ public List initContainers() { @@ -58,7 +62,7 @@ public List initContainers() { /** * Set the initContainers property: List of specialized containers that run before job containers. - * + * * @param initContainers the initContainers value to set. * @return the JobExecutionTemplate object itself. */ @@ -69,7 +73,7 @@ public JobExecutionTemplate withInitContainers(List initC /** * 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/JobPatchProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobPatchProperties.java index dddbf57dd6ac..d09f18fc692a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobPatchProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobPatchProperties.java @@ -9,9 +9,17 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** Container Apps Job resource specific properties. */ +/** + * Container Apps Job resource specific properties. + */ @Fluent public final class JobPatchProperties { + /* + * The complex type of the extended location. + */ + @JsonProperty(value = "extendedLocation") + private ExtendedLocation extendedLocation; + /* * Managed identities needed by a container app job to interact with other Azure services to not maintain any * secrets or credentials in code. @@ -32,14 +40,36 @@ public final class JobPatchProperties { @JsonProperty(value = "properties") private JobPatchPropertiesProperties properties; - /** Creates an instance of JobPatchProperties class. */ + /** + * Creates an instance of JobPatchProperties class. + */ public JobPatchProperties() { } /** - * Get the identity property: Managed identities needed by a container app job to interact with other Azure services - * to not maintain any secrets or credentials in code. - * + * Get the extendedLocation property: The complex type of the extended location. + * + * @return the extendedLocation value. + */ + public ExtendedLocation extendedLocation() { + return this.extendedLocation; + } + + /** + * Set the extendedLocation property: The complex type of the extended location. + * + * @param extendedLocation the extendedLocation value to set. + * @return the JobPatchProperties object itself. + */ + public JobPatchProperties withExtendedLocation(ExtendedLocation extendedLocation) { + this.extendedLocation = extendedLocation; + return this; + } + + /** + * Get the identity property: Managed identities needed by a container app job to interact with other Azure + * services to not maintain any secrets or credentials in code. + * * @return the identity value. */ public ManagedServiceIdentity identity() { @@ -47,9 +77,9 @@ public ManagedServiceIdentity identity() { } /** - * Set the identity property: Managed identities needed by a container app job to interact with other Azure services - * to not maintain any secrets or credentials in code. - * + * Set the identity property: Managed identities needed by a container app job to interact with other Azure + * services to not maintain any secrets or credentials in code. + * * @param identity the identity value to set. * @return the JobPatchProperties object itself. */ @@ -60,7 +90,7 @@ public JobPatchProperties withIdentity(ManagedServiceIdentity identity) { /** * Get the tags property: Resource tags. - * + * * @return the tags value. */ public Map tags() { @@ -69,7 +99,7 @@ public Map tags() { /** * Set the tags property: Resource tags. - * + * * @param tags the tags value to set. * @return the JobPatchProperties object itself. */ @@ -80,7 +110,7 @@ public JobPatchProperties withTags(Map tags) { /** * Get the properties property: The properties property. - * + * * @return the properties value. */ public JobPatchPropertiesProperties properties() { @@ -89,7 +119,7 @@ public JobPatchPropertiesProperties properties() { /** * Set the properties property: The properties property. - * + * * @param properties the properties value to set. * @return the JobPatchProperties object itself. */ @@ -100,10 +130,13 @@ public JobPatchProperties withProperties(JobPatchPropertiesProperties properties /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (extendedLocation() != null) { + extendedLocation().validate(); + } if (identity() != null) { identity().validate(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobPatchPropertiesProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobPatchPropertiesProperties.java index 246e0a88c0d0..38474193d99f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobPatchPropertiesProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobPatchPropertiesProperties.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The JobPatchPropertiesProperties model. */ +/** + * The JobPatchPropertiesProperties model. + */ @Fluent public final class JobPatchPropertiesProperties { /* @@ -41,13 +43,15 @@ public final class JobPatchPropertiesProperties { @JsonProperty(value = "eventStreamEndpoint") private String eventStreamEndpoint; - /** Creates an instance of JobPatchPropertiesProperties class. */ + /** + * Creates an instance of JobPatchPropertiesProperties class. + */ public JobPatchPropertiesProperties() { } /** * Get the environmentId property: Resource ID of environment. - * + * * @return the environmentId value. */ public String environmentId() { @@ -56,7 +60,7 @@ public String environmentId() { /** * Set the environmentId property: Resource ID of environment. - * + * * @param environmentId the environmentId value to set. * @return the JobPatchPropertiesProperties object itself. */ @@ -67,7 +71,7 @@ public JobPatchPropertiesProperties withEnvironmentId(String environmentId) { /** * Get the configuration property: Container Apps Job configuration properties. - * + * * @return the configuration value. */ public JobConfiguration configuration() { @@ -76,7 +80,7 @@ public JobConfiguration configuration() { /** * Set the configuration property: Container Apps Job configuration properties. - * + * * @param configuration the configuration value to set. * @return the JobPatchPropertiesProperties object itself. */ @@ -87,7 +91,7 @@ public JobPatchPropertiesProperties withConfiguration(JobConfiguration configura /** * Get the template property: Container Apps job definition. - * + * * @return the template value. */ public JobTemplate template() { @@ -96,7 +100,7 @@ public JobTemplate template() { /** * Set the template property: Container Apps job definition. - * + * * @param template the template value to set. * @return the JobPatchPropertiesProperties object itself. */ @@ -107,7 +111,7 @@ public JobPatchPropertiesProperties withTemplate(JobTemplate template) { /** * Get the outboundIpAddresses property: Outbound IP Addresses of a container apps job. - * + * * @return the outboundIpAddresses value. */ public List outboundIpAddresses() { @@ -116,7 +120,7 @@ public List outboundIpAddresses() { /** * Set the outboundIpAddresses property: Outbound IP Addresses of a container apps job. - * + * * @param outboundIpAddresses the outboundIpAddresses value to set. * @return the JobPatchPropertiesProperties object itself. */ @@ -127,7 +131,7 @@ public JobPatchPropertiesProperties withOutboundIpAddresses(List outboun /** * Get the eventStreamEndpoint property: The endpoint of the eventstream of the container apps job. - * + * * @return the eventStreamEndpoint value. */ public String eventStreamEndpoint() { @@ -136,7 +140,7 @@ public String eventStreamEndpoint() { /** * Set the eventStreamEndpoint property: The endpoint of the eventstream of the container apps job. - * + * * @param eventStreamEndpoint the eventStreamEndpoint value to set. * @return the JobPatchPropertiesProperties object itself. */ @@ -147,7 +151,7 @@ public JobPatchPropertiesProperties withEventStreamEndpoint(String eventStreamEn /** * 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/JobProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobProvisioningState.java index 36f82edc4b8c..adbef85d8a2e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobProvisioningState.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobProvisioningState.java @@ -8,26 +8,38 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Provisioning state of the Container Apps Job. */ +/** + * Provisioning state of the Container Apps Job. + */ public final class JobProvisioningState extends ExpandableStringEnum { - /** Static value InProgress for JobProvisioningState. */ + /** + * Static value InProgress for JobProvisioningState. + */ public static final JobProvisioningState IN_PROGRESS = fromString("InProgress"); - /** Static value Succeeded for JobProvisioningState. */ + /** + * Static value Succeeded for JobProvisioningState. + */ public static final JobProvisioningState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for JobProvisioningState. */ + /** + * Static value Failed for JobProvisioningState. + */ public static final JobProvisioningState FAILED = fromString("Failed"); - /** Static value Canceled for JobProvisioningState. */ + /** + * Static value Canceled for JobProvisioningState. + */ public static final JobProvisioningState CANCELED = fromString("Canceled"); - /** Static value Deleting for JobProvisioningState. */ + /** + * Static value Deleting for JobProvisioningState. + */ public static final JobProvisioningState DELETING = fromString("Deleting"); /** * Creates a new instance of JobProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +48,7 @@ public JobProvisioningState() { /** * Creates or finds a JobProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding JobProvisioningState. */ @@ -47,7 +59,7 @@ public static JobProvisioningState fromString(String name) { /** * Gets known JobProvisioningState values. - * + * * @return known JobProvisioningState values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScale.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScale.java index efaf34a13032..a0047df76dd4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScale.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScale.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Scaling configurations for event driven jobs. */ +/** + * Scaling configurations for event driven jobs. + */ @Fluent public final class JobScale { /* @@ -35,13 +37,15 @@ public final class JobScale { @JsonProperty(value = "rules") private List rules; - /** Creates an instance of JobScale class. */ + /** + * Creates an instance of JobScale class. + */ public JobScale() { } /** * Get the pollingInterval property: Interval to check each event source in seconds. Defaults to 30s. - * + * * @return the pollingInterval value. */ public Integer pollingInterval() { @@ -50,7 +54,7 @@ public Integer pollingInterval() { /** * Set the pollingInterval property: Interval to check each event source in seconds. Defaults to 30s. - * + * * @param pollingInterval the pollingInterval value to set. * @return the JobScale object itself. */ @@ -61,7 +65,7 @@ public JobScale withPollingInterval(Integer pollingInterval) { /** * Get the minExecutions property: Minimum number of job executions that are created for a trigger, default 0. - * + * * @return the minExecutions value. */ public Integer minExecutions() { @@ -70,7 +74,7 @@ public Integer minExecutions() { /** * Set the minExecutions property: Minimum number of job executions that are created for a trigger, default 0. - * + * * @param minExecutions the minExecutions value to set. * @return the JobScale object itself. */ @@ -81,7 +85,7 @@ public JobScale withMinExecutions(Integer minExecutions) { /** * Get the maxExecutions property: Maximum number of job executions that are created for a trigger, default 100. - * + * * @return the maxExecutions value. */ public Integer maxExecutions() { @@ -90,7 +94,7 @@ public Integer maxExecutions() { /** * Set the maxExecutions property: Maximum number of job executions that are created for a trigger, default 100. - * + * * @param maxExecutions the maxExecutions value to set. * @return the JobScale object itself. */ @@ -101,7 +105,7 @@ public JobScale withMaxExecutions(Integer maxExecutions) { /** * Get the rules property: Scaling rules. - * + * * @return the rules value. */ public List rules() { @@ -110,7 +114,7 @@ public List rules() { /** * Set the rules property: Scaling rules. - * + * * @param rules the rules value to set. * @return the JobScale object itself. */ @@ -121,7 +125,7 @@ public JobScale withRules(List rules) { /** * 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/JobScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScaleRule.java index 98412e5d0c3e..a78b1c2b38b7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScaleRule.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobScaleRule.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Scaling rule. */ +/** + * Scaling rule. + */ @Fluent public final class JobScaleRule { /* @@ -36,13 +38,15 @@ public final class JobScaleRule { @JsonProperty(value = "auth") private List auth; - /** Creates an instance of JobScaleRule class. */ + /** + * Creates an instance of JobScaleRule class. + */ public JobScaleRule() { } /** * Get the name property: Scale Rule Name. - * + * * @return the name value. */ public String name() { @@ -51,7 +55,7 @@ public String name() { /** * Set the name property: Scale Rule Name. - * + * * @param name the name value to set. * @return the JobScaleRule object itself. */ @@ -61,8 +65,9 @@ public JobScaleRule withName(String name) { } /** - * Get the type property: Type of the scale rule eg: azure-servicebus, redis etc. - * + * Get the type property: Type of the scale rule + * eg: azure-servicebus, redis etc. + * * @return the type value. */ public String type() { @@ -70,8 +75,9 @@ public String type() { } /** - * Set the type property: Type of the scale rule eg: azure-servicebus, redis etc. - * + * Set the type property: Type of the scale rule + * eg: azure-servicebus, redis etc. + * * @param type the type value to set. * @return the JobScaleRule object itself. */ @@ -82,7 +88,7 @@ public JobScaleRule withType(String type) { /** * Get the metadata property: Metadata properties to describe the scale rule. - * + * * @return the metadata value. */ public Object metadata() { @@ -91,7 +97,7 @@ public Object metadata() { /** * Set the metadata property: Metadata properties to describe the scale rule. - * + * * @param metadata the metadata value to set. * @return the JobScaleRule object itself. */ @@ -102,7 +108,7 @@ public JobScaleRule withMetadata(Object metadata) { /** * Get the auth property: Authentication secrets for the scale rule. - * + * * @return the auth value. */ public List auth() { @@ -111,7 +117,7 @@ public List auth() { /** * Set the auth property: Authentication secrets for the scale rule. - * + * * @param auth the auth value to set. * @return the JobScaleRule object itself. */ @@ -122,7 +128,7 @@ public JobScaleRule withAuth(List auth) { /** * 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/JobSecretsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobSecretsCollection.java index 89a553df4015..d7abd9c403d6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobSecretsCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobSecretsCollection.java @@ -7,18 +7,20 @@ import com.azure.resourcemanager.appcontainers.fluent.models.JobSecretsCollectionInner; import java.util.List; -/** An immutable client-side representation of JobSecretsCollection. */ +/** + * An immutable client-side representation of JobSecretsCollection. + */ public interface JobSecretsCollection { /** * Gets the value property: Collection of resources. - * + * * @return the value value. */ List value(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.JobSecretsCollectionInner object. - * + * * @return the inner object. */ JobSecretsCollectionInner innerModel(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobTemplate.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobTemplate.java index ca61cdb3f88b..753c254e3b02 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobTemplate.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobTemplate.java @@ -32,13 +32,15 @@ public final class JobTemplate { @JsonProperty(value = "volumes") private List volumes; - /** Creates an instance of JobTemplate class. */ + /** + * Creates an instance of JobTemplate class. + */ public JobTemplate() { } /** * Get the initContainers property: List of specialized containers that run before app containers. - * + * * @return the initContainers value. */ public List initContainers() { @@ -47,7 +49,7 @@ public List initContainers() { /** * Set the initContainers property: List of specialized containers that run before app containers. - * + * * @param initContainers the initContainers value to set. * @return the JobTemplate object itself. */ @@ -58,7 +60,7 @@ public JobTemplate withInitContainers(List initContainers) { /** * Get the containers property: List of container definitions for the Container App. - * + * * @return the containers value. */ public List containers() { @@ -67,7 +69,7 @@ public List containers() { /** * Set the containers property: List of container definitions for the Container App. - * + * * @param containers the containers value to set. * @return the JobTemplate object itself. */ @@ -78,7 +80,7 @@ public JobTemplate withContainers(List containers) { /** * Get the volumes property: List of volume definitions for the Container App. - * + * * @return the volumes value. */ public List volumes() { @@ -87,7 +89,7 @@ public List volumes() { /** * Set the volumes property: List of volume definitions for the Container App. - * + * * @param volumes the volumes value to set. * @return the JobTemplate object itself. */ @@ -98,7 +100,7 @@ public JobTemplate withVolumes(List volumes) { /** * 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/Jobs.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Jobs.java index bc45c11c5424..0cee44f1bba7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Jobs.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Jobs.java @@ -8,13 +8,112 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Jobs. */ +/** + * Resource collection API of Jobs. + */ public interface Jobs { + /** + * Get the list of diagnostics for a given Container App Job. + * + * Get the list of diagnostics for a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of diagnostics for a Container App Job along with {@link Response}. + */ + Response listDetectorsWithResponse(String resourceGroupName, String jobName, + Context context); + + /** + * Get the list of diagnostics for a given Container App Job. + * + * Get the list of diagnostics for a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the list of diagnostics for a Container App Job. + */ + DiagnosticsCollection listDetectors(String resourceGroupName, String jobName); + + /** + * Get the diagnostics data for a given Container App Job. + * + * Get the diagnostics data for a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param detectorName Name of the Container App Job detector. + * @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 diagnostics data for a Container App Job along with {@link Response}. + */ + Response getDetectorWithResponse(String resourceGroupName, String jobName, String detectorName, + Context context); + + /** + * Get the diagnostics data for a given Container App Job. + * + * Get the diagnostics data for a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param detectorName Name of the Container App Job detector. + * @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 diagnostics data for a Container App Job. + */ + Diagnostics getDetector(String resourceGroupName, String jobName, String detectorName); + + /** + * Get the properties for a given Container App Job. + * + * Get the properties of a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a Container App Job along with {@link Response}. + */ + Response proxyGetWithResponse(String resourceGroupName, String jobName, Context context); + + /** + * Get the properties for a given Container App Job. + * + * Get the properties of a Container App Job. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param jobName Job Name. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of a Container App Job. + */ + Job proxyGet(String resourceGroupName, String jobName); + /** * Get the Container Apps Jobs in a given subscription. - * + * * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Container Apps Jobs in a given subscription as paginated response with {@link PagedIterable}. */ @@ -22,11 +121,11 @@ public interface Jobs { /** * Get the Container Apps Jobs in a given subscription. - * + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Container Apps Jobs in a given subscription as paginated response with {@link PagedIterable}. */ @@ -34,11 +133,11 @@ public interface Jobs { /** * Get the Container Apps Jobs in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Container Apps Jobs in a given resource group as paginated response with {@link PagedIterable}. */ @@ -46,12 +145,12 @@ public interface Jobs { /** * Get the Container Apps Jobs in a given resource group. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Container Apps Jobs in a given resource group as paginated response with {@link PagedIterable}. */ @@ -59,13 +158,13 @@ public interface Jobs { /** * Get the properties of a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Container Apps Job along with {@link Response}. */ @@ -73,12 +172,12 @@ public interface Jobs { /** * Get the properties of a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Container Apps Job. */ @@ -86,37 +185,37 @@ public interface Jobs { /** * Delete a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteByResourceGroup(String resourceGroupName, String jobName); /** * Delete a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void delete(String resourceGroupName, String jobName, Context context); /** * Start a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App's Job execution name. */ @@ -124,14 +223,14 @@ public interface Jobs { /** * Start a Container Apps Job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param template Properties used to start a job execution. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App's Job execution name. */ @@ -139,39 +238,39 @@ public interface Jobs { /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void stopExecution(String resourceGroupName, String jobName, String jobExecutionName); /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void stopExecution(String resourceGroupName, String jobName, String jobExecutionName, Context context); /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App executions collection ARM resource. */ @@ -179,13 +278,13 @@ public interface Jobs { /** * Terminates execution of a running container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container App executions collection ARM resource. */ @@ -193,13 +292,13 @@ public interface Jobs { /** * List secrets for a container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container Apps Job Secrets Collection ARM resource along with {@link Response}. */ @@ -207,12 +306,12 @@ public interface Jobs { /** * List secrets for a container apps job. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return container Apps Job Secrets Collection ARM resource. */ @@ -220,11 +319,11 @@ public interface Jobs { /** * Get the properties of a Container Apps Job. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Container Apps Job along with {@link Response}. */ @@ -232,12 +331,12 @@ public interface Jobs { /** * Get the properties of a Container Apps Job. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Container Apps Job along with {@link Response}. */ @@ -245,30 +344,30 @@ public interface Jobs { /** * Delete a Container Apps Job. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteById(String id); /** * Delete a Container Apps Job. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteByIdWithResponse(String id, Context context); /** * Begins definition for a new Job resource. - * + * * @param name resource name. * @return the first stage of the new Job definition. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobsCollection.java index 40f2582ca10e..7d0d995b3a42 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobsCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobsCollection.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Container Apps Jobs collection ARM resource. */ +/** + * Container Apps Jobs collection ARM resource. + */ @Fluent public final class JobsCollection { /* @@ -25,13 +27,15 @@ public final class JobsCollection { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of JobsCollection class. */ + /** + * Creates an instance of JobsCollection class. + */ public JobsCollection() { } /** * Get the value property: Collection of resources. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: Collection of resources. - * + * * @param value the value value to set. * @return the JobsCollection object itself. */ @@ -51,7 +55,7 @@ public JobsCollection withValue(List value) { /** * Get the nextLink property: Link to next page of resources. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,14 +64,13 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model JobsCollection")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model JobsCollection")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobsExecutions.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobsExecutions.java index 250d6e5c3961..d97086ea8549 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobsExecutions.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JobsExecutions.java @@ -7,16 +7,18 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of JobsExecutions. */ +/** + * Resource collection API of JobsExecutions. + */ public interface JobsExecutions { /** * Get a Container Apps Job's executions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Container Apps Job's executions as paginated response with {@link PagedIterable}. */ @@ -24,14 +26,14 @@ public interface JobsExecutions { /** * Get a Container Apps Job's executions. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param filter The filter to apply on the operation. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return a Container Apps Job's executions as paginated response with {@link PagedIterable}. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JwtClaimChecks.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JwtClaimChecks.java index 987739c9a185..b4086c851a89 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JwtClaimChecks.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JwtClaimChecks.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The configuration settings of the checks that should be made while validating the JWT Claims. */ +/** + * The configuration settings of the checks that should be made while validating the JWT Claims. + */ @Fluent public final class JwtClaimChecks { /* @@ -23,13 +25,15 @@ public final class JwtClaimChecks { @JsonProperty(value = "allowedClientApplications") private List allowedClientApplications; - /** Creates an instance of JwtClaimChecks class. */ + /** + * Creates an instance of JwtClaimChecks class. + */ public JwtClaimChecks() { } /** * Get the allowedGroups property: The list of the allowed groups. - * + * * @return the allowedGroups value. */ public List allowedGroups() { @@ -38,7 +42,7 @@ public List allowedGroups() { /** * Set the allowedGroups property: The list of the allowed groups. - * + * * @param allowedGroups the allowedGroups value to set. * @return the JwtClaimChecks object itself. */ @@ -49,7 +53,7 @@ public JwtClaimChecks withAllowedGroups(List allowedGroups) { /** * Get the allowedClientApplications property: The list of the allowed client applications. - * + * * @return the allowedClientApplications value. */ public List allowedClientApplications() { @@ -58,7 +62,7 @@ public List allowedClientApplications() { /** * Set the allowedClientApplications property: The list of the allowed client applications. - * + * * @param allowedClientApplications the allowedClientApplications value to set. * @return the JwtClaimChecks object itself. */ @@ -69,7 +73,7 @@ public JwtClaimChecks withAllowedClientApplications(List allowedClientAp /** * 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/KedaConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/KedaConfiguration.java index 0641d8324718..af0054b064a1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/KedaConfiguration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/KedaConfiguration.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Immutable; import com.fasterxml.jackson.annotation.JsonProperty; -/** Configuration properties Keda component. */ +/** + * Configuration properties Keda component. + */ @Immutable public final class KedaConfiguration { /* @@ -16,13 +18,15 @@ public final class KedaConfiguration { @JsonProperty(value = "version", access = JsonProperty.Access.WRITE_ONLY) private String version; - /** Creates an instance of KedaConfiguration class. */ + /** + * Creates an instance of KedaConfiguration class. + */ public KedaConfiguration() { } /** * Get the version property: The version of Keda. - * + * * @return the version value. */ public String version() { @@ -31,7 +35,7 @@ public String version() { /** * 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/ListUsagesResult.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ListUsagesResult.java new file mode 100644 index 000000000000..d4a6e587bc76 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ListUsagesResult.java @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * The ListUsagesResult model. + */ +@Fluent +public final class ListUsagesResult { + /* + * The list of compute resource usages. + */ + @JsonProperty(value = "value") + private List value; + + /* + * The URI to fetch the next page of compute resource usage information. Call ListNext() with this to fetch the + * next page of compute resource usage information. + */ + @JsonProperty(value = "nextLink") + private String nextLink; + + /** + * Creates an instance of ListUsagesResult class. + */ + public ListUsagesResult() { + } + + /** + * Get the value property: The list of compute resource usages. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: The list of compute resource usages. + * + * @param value the value value to set. + * @return the ListUsagesResult object itself. + */ + public ListUsagesResult withValue(List value) { + this.value = value; + return this; + } + + /** + * Get the nextLink property: The URI to fetch the next page of compute resource usage information. Call ListNext() + * with this to fetch the next page of compute resource usage information. + * + * @return the nextLink value. + */ + public String nextLink() { + return this.nextLink; + } + + /** + * Set the nextLink property: The URI to fetch the next page of compute resource usage information. Call ListNext() + * with this to fetch the next page of compute resource usage information. + * + * @param nextLink the nextLink value to set. + * @return the ListUsagesResult object itself. + */ + public ListUsagesResult withNextLink(String nextLink) { + this.nextLink = nextLink; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() != null) { + value().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogAnalyticsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogAnalyticsConfiguration.java index 56aa6fc18103..aab153d85785 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogAnalyticsConfiguration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogAnalyticsConfiguration.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Log Analytics configuration, must only be provided when destination is configured as 'log-analytics'. */ +/** + * Log Analytics configuration, must only be provided when destination is configured as 'log-analytics'. + */ @Fluent public final class LogAnalyticsConfiguration { /* @@ -22,13 +24,21 @@ public final class LogAnalyticsConfiguration { @JsonProperty(value = "sharedKey") private String sharedKey; - /** Creates an instance of LogAnalyticsConfiguration class. */ + /* + * Boolean indicating whether to parse json string log into dynamic json columns + */ + @JsonProperty(value = "dynamicJsonColumns") + private Boolean dynamicJsonColumns; + + /** + * Creates an instance of LogAnalyticsConfiguration class. + */ public LogAnalyticsConfiguration() { } /** * Get the customerId property: Log analytics customer id. - * + * * @return the customerId value. */ public String customerId() { @@ -37,7 +47,7 @@ public String customerId() { /** * Set the customerId property: Log analytics customer id. - * + * * @param customerId the customerId value to set. * @return the LogAnalyticsConfiguration object itself. */ @@ -48,7 +58,7 @@ public LogAnalyticsConfiguration withCustomerId(String customerId) { /** * Get the sharedKey property: Log analytics customer key. - * + * * @return the sharedKey value. */ public String sharedKey() { @@ -57,7 +67,7 @@ public String sharedKey() { /** * Set the sharedKey property: Log analytics customer key. - * + * * @param sharedKey the sharedKey value to set. * @return the LogAnalyticsConfiguration object itself. */ @@ -66,9 +76,31 @@ public LogAnalyticsConfiguration withSharedKey(String sharedKey) { return this; } + /** + * Get the dynamicJsonColumns property: Boolean indicating whether to parse json string log into dynamic json + * columns. + * + * @return the dynamicJsonColumns value. + */ + public Boolean dynamicJsonColumns() { + return this.dynamicJsonColumns; + } + + /** + * Set the dynamicJsonColumns property: Boolean indicating whether to parse json string log into dynamic json + * columns. + * + * @param dynamicJsonColumns the dynamicJsonColumns value to set. + * @return the LogAnalyticsConfiguration object itself. + */ + public LogAnalyticsConfiguration withDynamicJsonColumns(Boolean dynamicJsonColumns) { + this.dynamicJsonColumns = dynamicJsonColumns; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogLevel.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogLevel.java index 10288186ff84..18536747ff1b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogLevel.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogLevel.java @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. */ +/** + * Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. + */ public final class LogLevel extends ExpandableStringEnum { - /** Static value info for LogLevel. */ + /** + * Static value info for LogLevel. + */ public static final LogLevel INFO = fromString("info"); - /** Static value debug for LogLevel. */ + /** + * Static value debug for LogLevel. + */ public static final LogLevel DEBUG = fromString("debug"); - /** Static value warn for LogLevel. */ + /** + * Static value warn for LogLevel. + */ public static final LogLevel WARN = fromString("warn"); - /** Static value error for LogLevel. */ + /** + * Static value error for LogLevel. + */ public static final LogLevel ERROR = fromString("error"); /** * Creates a new instance of LogLevel value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public LogLevel() { /** * Creates or finds a LogLevel from its string representation. - * + * * @param name a name to look for. * @return the corresponding LogLevel. */ @@ -44,7 +54,7 @@ public static LogLevel fromString(String name) { /** * Gets known LogLevel values. - * + * * @return known LogLevel values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Login.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Login.java index 2457b6865eb2..d26582e52661 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Login.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Login.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The configuration settings of the login flow of users using ContainerApp Service Authentication/Authorization. */ +/** + * The configuration settings of the login flow of users using ContainerApp Service Authentication/Authorization. + */ @Fluent public final class Login { /* @@ -17,6 +19,12 @@ public final class Login { @JsonProperty(value = "routes") private LoginRoutes routes; + /* + * The configuration settings of the token store. + */ + @JsonProperty(value = "tokenStore") + private TokenStore tokenStore; + /* * true if the fragments from the request are preserved after the login request is made; otherwise, * false. @@ -45,13 +53,15 @@ public final class Login { @JsonProperty(value = "nonce") private Nonce nonce; - /** Creates an instance of Login class. */ + /** + * Creates an instance of Login class. + */ public Login() { } /** * Get the routes property: The routes that specify the endpoints used for login and logout requests. - * + * * @return the routes value. */ public LoginRoutes routes() { @@ -60,7 +70,7 @@ public LoginRoutes routes() { /** * Set the routes property: The routes that specify the endpoints used for login and logout requests. - * + * * @param routes the routes value to set. * @return the Login object itself. */ @@ -69,10 +79,30 @@ public Login withRoutes(LoginRoutes routes) { return this; } + /** + * Get the tokenStore property: The configuration settings of the token store. + * + * @return the tokenStore value. + */ + public TokenStore tokenStore() { + return this.tokenStore; + } + + /** + * Set the tokenStore property: The configuration settings of the token store. + * + * @param tokenStore the tokenStore value to set. + * @return the Login object itself. + */ + public Login withTokenStore(TokenStore tokenStore) { + this.tokenStore = tokenStore; + return this; + } + /** * Get the preserveUrlFragmentsForLogins property: <code>true</code> if the fragments from the request * are preserved after the login request is made; otherwise, <code>false</code>. - * + * * @return the preserveUrlFragmentsForLogins value. */ public Boolean preserveUrlFragmentsForLogins() { @@ -82,7 +112,7 @@ public Boolean preserveUrlFragmentsForLogins() { /** * Set the preserveUrlFragmentsForLogins property: <code>true</code> if the fragments from the request * are preserved after the login request is made; otherwise, <code>false</code>. - * + * * @param preserveUrlFragmentsForLogins the preserveUrlFragmentsForLogins value to set. * @return the Login object itself. */ @@ -93,10 +123,10 @@ public Login withPreserveUrlFragmentsForLogins(Boolean preserveUrlFragmentsForLo /** * Get the allowedExternalRedirectUrls property: External URLs that can be redirected to as part of logging in or - * logging out of the app. Note that the query string part of the URL is ignored. This is an advanced setting - * typically only needed by Windows Store application backends. Note that URLs within the current domain are always - * implicitly allowed. - * + * logging out of the app. Note that the query string part of the URL is ignored. + * This is an advanced setting typically only needed by Windows Store application backends. + * Note that URLs within the current domain are always implicitly allowed. + * * @return the allowedExternalRedirectUrls value. */ public List allowedExternalRedirectUrls() { @@ -105,10 +135,10 @@ public List allowedExternalRedirectUrls() { /** * Set the allowedExternalRedirectUrls property: External URLs that can be redirected to as part of logging in or - * logging out of the app. Note that the query string part of the URL is ignored. This is an advanced setting - * typically only needed by Windows Store application backends. Note that URLs within the current domain are always - * implicitly allowed. - * + * logging out of the app. Note that the query string part of the URL is ignored. + * This is an advanced setting typically only needed by Windows Store application backends. + * Note that URLs within the current domain are always implicitly allowed. + * * @param allowedExternalRedirectUrls the allowedExternalRedirectUrls value to set. * @return the Login object itself. */ @@ -119,7 +149,7 @@ public Login withAllowedExternalRedirectUrls(List allowedExternalRedirec /** * Get the cookieExpiration property: The configuration settings of the session cookie's expiration. - * + * * @return the cookieExpiration value. */ public CookieExpiration cookieExpiration() { @@ -128,7 +158,7 @@ public CookieExpiration cookieExpiration() { /** * Set the cookieExpiration property: The configuration settings of the session cookie's expiration. - * + * * @param cookieExpiration the cookieExpiration value to set. * @return the Login object itself. */ @@ -139,7 +169,7 @@ public Login withCookieExpiration(CookieExpiration cookieExpiration) { /** * Get the nonce property: The configuration settings of the nonce used in the login flow. - * + * * @return the nonce value. */ public Nonce nonce() { @@ -148,7 +178,7 @@ public Nonce nonce() { /** * Set the nonce property: The configuration settings of the nonce used in the login flow. - * + * * @param nonce the nonce value to set. * @return the Login object itself. */ @@ -159,13 +189,16 @@ public Login withNonce(Nonce nonce) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (routes() != null) { routes().validate(); } + if (tokenStore() != null) { + tokenStore().validate(); + } if (cookieExpiration() != null) { cookieExpiration().validate(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginRoutes.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginRoutes.java index b46f5243d970..367f861eef9d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginRoutes.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginRoutes.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The routes that specify the endpoints used for login and logout requests. */ +/** + * The routes that specify the endpoints used for login and logout requests. + */ @Fluent public final class LoginRoutes { /* @@ -16,13 +18,15 @@ public final class LoginRoutes { @JsonProperty(value = "logoutEndpoint") private String logoutEndpoint; - /** Creates an instance of LoginRoutes class. */ + /** + * Creates an instance of LoginRoutes class. + */ public LoginRoutes() { } /** * Get the logoutEndpoint property: The endpoint at which a logout request should be made. - * + * * @return the logoutEndpoint value. */ public String logoutEndpoint() { @@ -31,7 +35,7 @@ public String logoutEndpoint() { /** * Set the logoutEndpoint property: The endpoint at which a logout request should be made. - * + * * @param logoutEndpoint the logoutEndpoint value to set. * @return the LoginRoutes object itself. */ @@ -42,7 +46,7 @@ public LoginRoutes withLogoutEndpoint(String logoutEndpoint) { /** * 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/LoginScopes.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginScopes.java index 017270ea4dd1..13755be204d0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginScopes.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginScopes.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The configuration settings of the login flow, including the scopes that should be requested. */ +/** + * The configuration settings of the login flow, including the scopes that should be requested. + */ @Fluent public final class LoginScopes { /* @@ -17,13 +19,15 @@ public final class LoginScopes { @JsonProperty(value = "scopes") private List scopes; - /** Creates an instance of LoginScopes class. */ + /** + * Creates an instance of LoginScopes class. + */ public LoginScopes() { } /** * Get the scopes property: A list of the scopes that should be requested while authenticating. - * + * * @return the scopes value. */ public List scopes() { @@ -32,7 +36,7 @@ public List scopes() { /** * Set the scopes property: A list of the scopes that should be requested while authenticating. - * + * * @param scopes the scopes value to set. * @return the LoginScopes object itself. */ @@ -43,7 +47,7 @@ public LoginScopes withScopes(List scopes) { /** * 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/LogsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogsConfiguration.java new file mode 100644 index 000000000000..0f25acc6ec6b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogsConfiguration.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Configuration of Open Telemetry logs. + */ +@Fluent +public final class LogsConfiguration { + /* + * Open telemetry logs destinations + */ + @JsonProperty(value = "destinations") + private List destinations; + + /** + * Creates an instance of LogsConfiguration class. + */ + public LogsConfiguration() { + } + + /** + * Get the destinations property: Open telemetry logs destinations. + * + * @return the destinations value. + */ + public List destinations() { + return this.destinations; + } + + /** + * Set the destinations property: Open telemetry logs destinations. + * + * @param destinations the destinations value to set. + * @return the LogsConfiguration object itself. + */ + public LogsConfiguration withDestinations(List destinations) { + this.destinations = destinations; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificate.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificate.java index 40f38dd19c37..d3863e678425 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificate.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificate.java @@ -10,104 +10,111 @@ import com.azure.resourcemanager.appcontainers.fluent.models.ManagedCertificateInner; import java.util.Map; -/** An immutable client-side representation of ManagedCertificate. */ +/** + * An immutable client-side representation of ManagedCertificate. + */ public interface ManagedCertificate { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); /** * Gets the properties property: Certificate resource specific properties. - * + * * @return the properties value. */ ManagedCertificateProperties properties(); /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ManagedCertificateInner object. - * + * * @return the inner object. */ ManagedCertificateInner innerModel(); - /** The entirety of the ManagedCertificate definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithParentResource, - DefinitionStages.WithCreate { + /** + * The entirety of the ManagedCertificate definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The ManagedCertificate definition stages. */ + /** + * The ManagedCertificate definition stages. + */ interface DefinitionStages { - /** The first stage of the ManagedCertificate definition. */ + /** + * The first stage of the ManagedCertificate definition. + */ interface Blank extends WithLocation { } - /** The stage of the ManagedCertificate definition allowing to specify location. */ + /** + * The stage of the ManagedCertificate definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -115,18 +122,20 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithParentResource withRegion(String location); } - /** The stage of the ManagedCertificate definition allowing to specify parent resource. */ + /** + * The stage of the ManagedCertificate definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, environmentName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @return the next definition stage. @@ -141,36 +150,40 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ ManagedCertificate create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ ManagedCertificate create(Context context); } - /** The stage of the ManagedCertificate definition allowing to specify tags. */ + /** + * The stage of the ManagedCertificate definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the ManagedCertificate definition allowing to specify properties. */ + /** + * The stage of the ManagedCertificate definition allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: Certificate resource specific properties. - * + * * @param properties Certificate resource specific properties. * @return the next definition stage. */ @@ -180,36 +193,42 @@ interface WithProperties { /** * Begins update for the ManagedCertificate resource. - * + * * @return the stage of resource update. */ ManagedCertificate.Update update(); - /** The template for ManagedCertificate update. */ + /** + * The template for ManagedCertificate update. + */ interface Update extends UpdateStages.WithTags { /** * Executes the update request. - * + * * @return the updated resource. */ ManagedCertificate apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ ManagedCertificate apply(Context context); } - /** The ManagedCertificate update stages. */ + /** + * The ManagedCertificate update stages. + */ interface UpdateStages { - /** The stage of the ManagedCertificate update allowing to specify tags. */ + /** + * The stage of the ManagedCertificate update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Application-specific metadata in the form of key-value pairs.. - * + * * @param tags Application-specific metadata in the form of key-value pairs. * @return the next definition stage. */ @@ -219,14 +238,14 @@ interface WithTags { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ ManagedCertificate refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateCollection.java index 5f331c81666d..c086402c9706 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateCollection.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Collection of Managed Certificates. */ +/** + * Collection of Managed Certificates. + */ @Fluent public final class ManagedCertificateCollection { /* @@ -25,13 +27,15 @@ public final class ManagedCertificateCollection { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ManagedCertificateCollection class. */ + /** + * Creates an instance of ManagedCertificateCollection class. + */ public ManagedCertificateCollection() { } /** * Get the value property: Collection of resources. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: Collection of resources. - * + * * @param value the value value to set. * @return the ManagedCertificateCollection object itself. */ @@ -51,7 +55,7 @@ public ManagedCertificateCollection withValue(List valu /** * Get the nextLink property: Link to next page of resources. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,15 +64,13 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model ManagedCertificateCollection")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model ManagedCertificateCollection")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateDomainControlValidation.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateDomainControlValidation.java index 291c8a1efe6f..5b63fa644a27 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateDomainControlValidation.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateDomainControlValidation.java @@ -8,21 +8,29 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Selected type of domain control validation for managed certificates. */ +/** + * Selected type of domain control validation for managed certificates. + */ public final class ManagedCertificateDomainControlValidation extends ExpandableStringEnum { - /** Static value CNAME for ManagedCertificateDomainControlValidation. */ + /** + * Static value CNAME for ManagedCertificateDomainControlValidation. + */ public static final ManagedCertificateDomainControlValidation CNAME = fromString("CNAME"); - /** Static value HTTP for ManagedCertificateDomainControlValidation. */ + /** + * Static value HTTP for ManagedCertificateDomainControlValidation. + */ public static final ManagedCertificateDomainControlValidation HTTP = fromString("HTTP"); - /** Static value TXT for ManagedCertificateDomainControlValidation. */ + /** + * Static value TXT for ManagedCertificateDomainControlValidation. + */ public static final ManagedCertificateDomainControlValidation TXT = fromString("TXT"); /** * Creates a new instance of ManagedCertificateDomainControlValidation value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -31,7 +39,7 @@ public ManagedCertificateDomainControlValidation() { /** * Creates or finds a ManagedCertificateDomainControlValidation from its string representation. - * + * * @param name a name to look for. * @return the corresponding ManagedCertificateDomainControlValidation. */ @@ -42,7 +50,7 @@ public static ManagedCertificateDomainControlValidation fromString(String name) /** * Gets known ManagedCertificateDomainControlValidation values. - * + * * @return known ManagedCertificateDomainControlValidation values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificatePatch.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificatePatch.java index b13c65047e59..ccd81e933906 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificatePatch.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificatePatch.java @@ -9,7 +9,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Map; -/** A managed certificate to update. */ +/** + * A managed certificate to update. + */ @Fluent public final class ManagedCertificatePatch { /* @@ -19,13 +21,15 @@ public final class ManagedCertificatePatch { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; - /** Creates an instance of ManagedCertificatePatch class. */ + /** + * Creates an instance of ManagedCertificatePatch class. + */ public ManagedCertificatePatch() { } /** * Get the tags property: Application-specific metadata in the form of key-value pairs. - * + * * @return the tags value. */ public Map tags() { @@ -34,7 +38,7 @@ public Map tags() { /** * Set the tags property: Application-specific metadata in the form of key-value pairs. - * + * * @param tags the tags value to set. * @return the ManagedCertificatePatch object itself. */ @@ -45,7 +49,7 @@ public ManagedCertificatePatch withTags(Map tags) { /** * 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/ManagedCertificateProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateProperties.java index cafc6a848243..23f1a397b074 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificateProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Certificate resource specific properties. */ +/** + * Certificate resource specific properties. + */ @Fluent public final class ManagedCertificateProperties { /* @@ -40,13 +42,15 @@ public final class ManagedCertificateProperties { @JsonProperty(value = "validationToken", access = JsonProperty.Access.WRITE_ONLY) private String validationToken; - /** Creates an instance of ManagedCertificateProperties class. */ + /** + * Creates an instance of ManagedCertificateProperties class. + */ public ManagedCertificateProperties() { } /** * Get the provisioningState property: Provisioning state of the certificate. - * + * * @return the provisioningState value. */ public CertificateProvisioningState provisioningState() { @@ -55,7 +59,7 @@ public CertificateProvisioningState provisioningState() { /** * Get the subjectName property: Subject name of the certificate. - * + * * @return the subjectName value. */ public String subjectName() { @@ -64,7 +68,7 @@ public String subjectName() { /** * Set the subjectName property: Subject name of the certificate. - * + * * @param subjectName the subjectName value to set. * @return the ManagedCertificateProperties object itself. */ @@ -75,7 +79,7 @@ public ManagedCertificateProperties withSubjectName(String subjectName) { /** * Get the error property: Any error occurred during the certificate provision. - * + * * @return the error value. */ public String error() { @@ -84,7 +88,7 @@ public String error() { /** * Get the domainControlValidation property: Selected type of domain control validation for managed certificates. - * + * * @return the domainControlValidation value. */ public ManagedCertificateDomainControlValidation domainControlValidation() { @@ -93,12 +97,12 @@ public ManagedCertificateDomainControlValidation domainControlValidation() { /** * Set the domainControlValidation property: Selected type of domain control validation for managed certificates. - * + * * @param domainControlValidation the domainControlValidation value to set. * @return the ManagedCertificateProperties object itself. */ - public ManagedCertificateProperties withDomainControlValidation( - ManagedCertificateDomainControlValidation domainControlValidation) { + public ManagedCertificateProperties + withDomainControlValidation(ManagedCertificateDomainControlValidation domainControlValidation) { this.domainControlValidation = domainControlValidation; return this; } @@ -106,7 +110,7 @@ public ManagedCertificateProperties withDomainControlValidation( /** * Get the validationToken property: A TXT token used for DNS TXT domain control validation when issuing this type * of managed certificates. - * + * * @return the validationToken value. */ public String validationToken() { @@ -115,7 +119,7 @@ public String validationToken() { /** * 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/ManagedCertificates.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificates.java index b8dddf1b849f..6a41e1d6758c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificates.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedCertificates.java @@ -8,33 +8,35 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ManagedCertificates. */ +/** + * Resource collection API of ManagedCertificates. + */ public interface ManagedCertificates { /** * Get the specified Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specified Managed Certificate along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String environmentName, String managedCertificateName, Context context); + Response getWithResponse(String resourceGroupName, String environmentName, + String managedCertificateName, Context context); /** * Get the specified Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specified Managed Certificate. */ @@ -42,41 +44,41 @@ Response getWithResponse( /** * Deletes the specified Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String environmentName, String managedCertificateName, Context context); + Response deleteWithResponse(String resourceGroupName, String environmentName, String managedCertificateName, + Context context); /** * Deletes the specified Managed Certificate. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param managedCertificateName Name of the Managed Certificate. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void delete(String resourceGroupName, String environmentName, String managedCertificateName); /** * Get the Managed Certificates in a given managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Managed Certificates in a given managed environment as paginated response with {@link PagedIterable}. */ @@ -84,13 +86,13 @@ Response deleteWithResponse( /** * Get the Managed Certificates in a given managed environment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the Managed Certificates in a given managed environment as paginated response with {@link PagedIterable}. */ @@ -98,11 +100,11 @@ Response deleteWithResponse( /** * Get the specified Managed Certificate. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specified Managed Certificate along with {@link Response}. */ @@ -110,12 +112,12 @@ Response deleteWithResponse( /** * Get the specified Managed 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the specified Managed Certificate along with {@link Response}. */ @@ -123,23 +125,23 @@ Response deleteWithResponse( /** * Deletes the specified Managed Certificate. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteById(String id); /** * Deletes the specified Managed 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ @@ -147,7 +149,7 @@ Response deleteWithResponse( /** * Begins definition for a new ManagedCertificate resource. - * + * * @param name resource name. * @return the first stage of the new ManagedCertificate definition. */ 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 b4064c98a6bb..1999293a6283 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 @@ -12,60 +12,70 @@ import java.util.List; import java.util.Map; -/** An immutable client-side representation of ManagedEnvironment. */ +/** + * An immutable client-side representation of ManagedEnvironment. + */ public interface ManagedEnvironment { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the location property: The geo-location where the resource lives. - * + * * @return the location value. */ String location(); /** * Gets the tags property: Resource tags. - * + * * @return the tags value. */ Map tags(); /** * Gets the kind property: Kind of the Environment. - * + * * @return the kind value. */ String kind(); + /** + * Gets the identity property: Managed identities for the Managed Environment to interact with other Azure services + * without maintaining any secrets or credentials in code. + * + * @return the identity value. + */ + ManagedServiceIdentity identity(); + /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * + * * @return the systemData value. */ SystemData systemData(); /** * Gets the provisioningState property: Provisioning state of the Environment. - * + * * @return the provisioningState value. */ EnvironmentProvisioningState provisioningState(); @@ -73,7 +83,7 @@ public interface ManagedEnvironment { /** * Gets the daprAIInstrumentationKey property: Azure Monitor instrumentation key used by Dapr to export Service to * Service communication telemetry. - * + * * @return the daprAIInstrumentationKey value. */ String daprAIInstrumentationKey(); @@ -81,85 +91,100 @@ public interface ManagedEnvironment { /** * Gets the daprAIConnectionString property: Application Insights connection string used by Dapr to export Service * to Service communication telemetry. - * + * * @return the daprAIConnectionString value. */ String daprAIConnectionString(); /** * Gets the vnetConfiguration property: Vnet configuration for the environment. - * + * * @return the vnetConfiguration value. */ VnetConfiguration vnetConfiguration(); /** * Gets the deploymentErrors property: Any errors that occurred during deployment or deployment validation. - * + * * @return the deploymentErrors value. */ String deploymentErrors(); /** * Gets the defaultDomain property: Default Domain Name for the cluster. - * + * * @return the defaultDomain value. */ String defaultDomain(); /** * Gets the staticIp property: Static IP of the Environment. - * + * * @return the staticIp value. */ String staticIp(); /** - * Gets the appLogsConfiguration property: Cluster configuration which enables the log daemon to export app logs to - * a destination. Currently only "log-analytics" is supported. - * + * Gets the appLogsConfiguration property: Cluster configuration which enables the log daemon to export + * app logs to a destination. Currently only "log-analytics" is + * supported. + * * @return the appLogsConfiguration value. */ AppLogsConfiguration appLogsConfiguration(); + /** + * Gets the appInsightsConfiguration property: Environment level Application Insights configuration. + * + * @return the appInsightsConfiguration value. + */ + AppInsightsConfiguration appInsightsConfiguration(); + + /** + * Gets the openTelemetryConfiguration property: Environment Open Telemetry configuration. + * + * @return the openTelemetryConfiguration value. + */ + OpenTelemetryConfiguration openTelemetryConfiguration(); + /** * Gets the zoneRedundant property: Whether or not this Managed Environment is zone-redundant. - * + * * @return the zoneRedundant value. */ Boolean zoneRedundant(); /** * Gets the customDomainConfiguration property: Custom domain configuration for the environment. - * + * * @return the customDomainConfiguration value. */ CustomDomainConfiguration customDomainConfiguration(); /** * Gets the eventStreamEndpoint property: The endpoint of the eventstream of the Environment. - * + * * @return the eventStreamEndpoint value. */ String eventStreamEndpoint(); /** * Gets the workloadProfiles property: Workload profiles configured for the Managed Environment. - * + * * @return the workloadProfiles value. */ List workloadProfiles(); /** * Gets the kedaConfiguration property: The configuration of Keda component. - * + * * @return the kedaConfiguration value. */ KedaConfiguration kedaConfiguration(); /** * Gets the daprConfiguration property: The configuration of Dapr component. - * + * * @return the daprConfiguration value. */ DaprConfiguration daprConfiguration(); @@ -168,65 +193,70 @@ public interface ManagedEnvironment { * Gets the infrastructureResourceGroup property: Name of the platform-managed resource group created for the * Managed Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be * created in the same subscription as the subnet. - * + * * @return the infrastructureResourceGroup value. */ String infrastructureResourceGroup(); /** * Gets the peerAuthentication property: Peer authentication settings for the Managed Environment. - * + * * @return the peerAuthentication value. */ ManagedEnvironmentPropertiesPeerAuthentication peerAuthentication(); /** * Gets the region of the resource. - * + * * @return the region of the resource. */ Region region(); /** * Gets the name of the resource region. - * + * * @return the name of the resource region. */ String regionName(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner object. - * + * * @return the inner object. */ ManagedEnvironmentInner innerModel(); - /** The entirety of the ManagedEnvironment definition. */ - interface Definition - extends DefinitionStages.Blank, - DefinitionStages.WithLocation, - DefinitionStages.WithResourceGroup, - DefinitionStages.WithCreate { + /** + * The entirety of the ManagedEnvironment definition. + */ + interface Definition extends DefinitionStages.Blank, DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, DefinitionStages.WithCreate { } - /** The ManagedEnvironment definition stages. */ + /** + * The ManagedEnvironment definition stages. + */ interface DefinitionStages { - /** The first stage of the ManagedEnvironment definition. */ + /** + * The first stage of the ManagedEnvironment definition. + */ interface Blank extends WithLocation { } - /** The stage of the ManagedEnvironment definition allowing to specify location. */ + /** + * The stage of the ManagedEnvironment definition allowing to specify location. + */ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ @@ -234,18 +264,20 @@ interface WithLocation { /** * Specifies the region for the resource. - * + * * @param location The geo-location where the resource lives. * @return the next definition stage. */ WithResourceGroup withRegion(String location); } - /** The stage of the ManagedEnvironment definition allowing to specify parent resource. */ + /** + * The stage of the ManagedEnvironment definition allowing to specify parent resource. + */ interface WithResourceGroup { /** * Specifies resourceGroupName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @return the next definition stage. */ @@ -256,183 +288,246 @@ interface WithResourceGroup { * The stage of the ManagedEnvironment definition which contains all the minimum required properties for the * resource to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithTags, - DefinitionStages.WithKind, - DefinitionStages.WithDaprAIInstrumentationKey, - DefinitionStages.WithDaprAIConnectionString, - DefinitionStages.WithVnetConfiguration, - DefinitionStages.WithAppLogsConfiguration, - DefinitionStages.WithZoneRedundant, - DefinitionStages.WithCustomDomainConfiguration, - DefinitionStages.WithWorkloadProfiles, - DefinitionStages.WithKedaConfiguration, - DefinitionStages.WithDaprConfiguration, - DefinitionStages.WithInfrastructureResourceGroup, - DefinitionStages.WithPeerAuthentication { + interface WithCreate extends DefinitionStages.WithTags, DefinitionStages.WithKind, + DefinitionStages.WithIdentity, DefinitionStages.WithDaprAIInstrumentationKey, + DefinitionStages.WithDaprAIConnectionString, DefinitionStages.WithVnetConfiguration, + DefinitionStages.WithAppLogsConfiguration, DefinitionStages.WithAppInsightsConfiguration, + DefinitionStages.WithOpenTelemetryConfiguration, DefinitionStages.WithZoneRedundant, + DefinitionStages.WithCustomDomainConfiguration, DefinitionStages.WithWorkloadProfiles, + DefinitionStages.WithKedaConfiguration, DefinitionStages.WithDaprConfiguration, + DefinitionStages.WithInfrastructureResourceGroup, DefinitionStages.WithPeerAuthentication { /** * Executes the create request. - * + * * @return the created resource. */ ManagedEnvironment create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ ManagedEnvironment create(Context context); } - /** The stage of the ManagedEnvironment definition allowing to specify tags. */ + /** + * The stage of the ManagedEnvironment definition allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ WithCreate withTags(Map tags); } - /** The stage of the ManagedEnvironment definition allowing to specify kind. */ + /** + * 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 daprAIInstrumentationKey. */ + /** + * The stage of the ManagedEnvironment definition allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: Managed identities for the Managed Environment to interact with other + * Azure services without maintaining any secrets or credentials in code.. + * + * @param identity Managed identities for the Managed Environment to interact with other Azure services + * without maintaining any secrets or credentials in code. + * @return the next definition stage. + */ + WithCreate withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the ManagedEnvironment definition allowing to specify daprAIInstrumentationKey. + */ interface WithDaprAIInstrumentationKey { /** * Specifies the daprAIInstrumentationKey property: Azure Monitor instrumentation key used by Dapr to export * Service to Service communication telemetry. - * + * * @param daprAIInstrumentationKey Azure Monitor instrumentation key used by Dapr to export Service to - * Service communication telemetry. + * Service communication telemetry. * @return the next definition stage. */ WithCreate withDaprAIInstrumentationKey(String daprAIInstrumentationKey); } - /** The stage of the ManagedEnvironment definition allowing to specify daprAIConnectionString. */ + /** + * The stage of the ManagedEnvironment definition allowing to specify daprAIConnectionString. + */ interface WithDaprAIConnectionString { /** * Specifies the daprAIConnectionString property: Application Insights connection string used by Dapr to * export Service to Service communication telemetry. - * + * * @param daprAIConnectionString Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. + * Service communication telemetry. * @return the next definition stage. */ WithCreate withDaprAIConnectionString(String daprAIConnectionString); } - /** The stage of the ManagedEnvironment definition allowing to specify vnetConfiguration. */ + /** + * The stage of the ManagedEnvironment definition allowing to specify vnetConfiguration. + */ interface WithVnetConfiguration { /** * Specifies the vnetConfiguration property: Vnet configuration for the environment. - * + * * @param vnetConfiguration Vnet configuration for the environment. * @return the next definition stage. */ WithCreate withVnetConfiguration(VnetConfiguration vnetConfiguration); } - /** The stage of the ManagedEnvironment definition allowing to specify appLogsConfiguration. */ + /** + * The stage of the ManagedEnvironment definition allowing to specify appLogsConfiguration. + */ interface WithAppLogsConfiguration { /** * Specifies the appLogsConfiguration property: Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is supported. - * - * @param appLogsConfiguration Cluster configuration which enables the log daemon to export app logs to a - * destination. Currently only "log-analytics" is supported. + * app logs to a destination. Currently only "log-analytics" is + * supported. + * + * @param appLogsConfiguration Cluster configuration which enables the log daemon to export + * app logs to a destination. Currently only "log-analytics" is + * supported. * @return the next definition stage. */ WithCreate withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration); } - /** The stage of the ManagedEnvironment definition allowing to specify zoneRedundant. */ + /** + * The stage of the ManagedEnvironment definition allowing to specify appInsightsConfiguration. + */ + interface WithAppInsightsConfiguration { + /** + * Specifies the appInsightsConfiguration property: Environment level Application Insights configuration. + * + * @param appInsightsConfiguration Environment level Application Insights configuration. + * @return the next definition stage. + */ + WithCreate withAppInsightsConfiguration(AppInsightsConfiguration appInsightsConfiguration); + } + + /** + * The stage of the ManagedEnvironment definition allowing to specify openTelemetryConfiguration. + */ + interface WithOpenTelemetryConfiguration { + /** + * Specifies the openTelemetryConfiguration property: Environment Open Telemetry configuration. + * + * @param openTelemetryConfiguration Environment Open Telemetry configuration. + * @return the next definition stage. + */ + WithCreate withOpenTelemetryConfiguration(OpenTelemetryConfiguration openTelemetryConfiguration); + } + + /** + * The stage of the ManagedEnvironment definition allowing to specify zoneRedundant. + */ interface WithZoneRedundant { /** * Specifies the zoneRedundant property: Whether or not this Managed Environment is zone-redundant.. - * + * * @param zoneRedundant Whether or not this Managed Environment is zone-redundant. * @return the next definition stage. */ WithCreate withZoneRedundant(Boolean zoneRedundant); } - /** The stage of the ManagedEnvironment definition allowing to specify customDomainConfiguration. */ + /** + * The stage of the ManagedEnvironment definition allowing to specify customDomainConfiguration. + */ interface WithCustomDomainConfiguration { /** * Specifies the customDomainConfiguration property: Custom domain configuration for the environment. - * + * * @param customDomainConfiguration Custom domain configuration for the environment. * @return the next definition stage. */ WithCreate withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration); } - /** The stage of the ManagedEnvironment definition allowing to specify workloadProfiles. */ + /** + * The stage of the ManagedEnvironment definition allowing to specify workloadProfiles. + */ interface WithWorkloadProfiles { /** * Specifies the workloadProfiles property: Workload profiles configured for the Managed Environment.. - * + * * @param workloadProfiles Workload profiles configured for the Managed Environment. * @return the next definition stage. */ WithCreate withWorkloadProfiles(List workloadProfiles); } - /** The stage of the ManagedEnvironment definition allowing to specify kedaConfiguration. */ + /** + * The stage of the ManagedEnvironment definition allowing to specify kedaConfiguration. + */ interface WithKedaConfiguration { /** * Specifies the kedaConfiguration property: The configuration of Keda component.. - * + * * @param kedaConfiguration The configuration of Keda component. * @return the next definition stage. */ WithCreate withKedaConfiguration(KedaConfiguration kedaConfiguration); } - /** The stage of the ManagedEnvironment definition allowing to specify daprConfiguration. */ + /** + * The stage of the ManagedEnvironment definition allowing to specify daprConfiguration. + */ interface WithDaprConfiguration { /** * Specifies the daprConfiguration property: The configuration of Dapr component.. - * + * * @param daprConfiguration The configuration of Dapr component. * @return the next definition stage. */ WithCreate withDaprConfiguration(DaprConfiguration daprConfiguration); } - /** The stage of the ManagedEnvironment definition allowing to specify infrastructureResourceGroup. */ + /** + * The stage of the ManagedEnvironment definition allowing to specify infrastructureResourceGroup. + */ interface WithInfrastructureResourceGroup { /** * Specifies the infrastructureResourceGroup property: Name of the platform-managed resource group created * for the Managed Environment to host infrastructure resources. If a subnet ID is provided, this resource * group will be created in the same subscription as the subnet.. - * + * * @param infrastructureResourceGroup Name of the platform-managed resource group created for the Managed - * Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be - * created in the same subscription as the subnet. + * Environment to host infrastructure resources. If a subnet ID is provided, this resource group will be + * created in the same subscription as the subnet. * @return the next definition stage. */ WithCreate withInfrastructureResourceGroup(String infrastructureResourceGroup); } - /** The stage of the ManagedEnvironment definition allowing to specify peerAuthentication. */ + /** + * The stage of the ManagedEnvironment definition allowing to specify peerAuthentication. + */ interface WithPeerAuthentication { /** * Specifies the peerAuthentication property: Peer authentication settings for the Managed Environment. - * + * * @param peerAuthentication Peer authentication settings for the Managed Environment. * @return the next definition stage. */ @@ -442,163 +537,226 @@ interface WithPeerAuthentication { /** * Begins update for the ManagedEnvironment resource. - * + * * @return the stage of resource update. */ ManagedEnvironment.Update update(); - /** The template for ManagedEnvironment update. */ - interface Update - extends UpdateStages.WithTags, - UpdateStages.WithKind, - UpdateStages.WithDaprAIInstrumentationKey, - UpdateStages.WithDaprAIConnectionString, - UpdateStages.WithVnetConfiguration, - UpdateStages.WithAppLogsConfiguration, - UpdateStages.WithCustomDomainConfiguration, - UpdateStages.WithWorkloadProfiles, - UpdateStages.WithKedaConfiguration, - UpdateStages.WithDaprConfiguration, - UpdateStages.WithPeerAuthentication { + /** + * The template for ManagedEnvironment update. + */ + interface Update extends UpdateStages.WithTags, UpdateStages.WithKind, UpdateStages.WithIdentity, + UpdateStages.WithDaprAIInstrumentationKey, UpdateStages.WithDaprAIConnectionString, + UpdateStages.WithVnetConfiguration, UpdateStages.WithAppLogsConfiguration, + UpdateStages.WithAppInsightsConfiguration, UpdateStages.WithOpenTelemetryConfiguration, + UpdateStages.WithCustomDomainConfiguration, UpdateStages.WithWorkloadProfiles, + UpdateStages.WithKedaConfiguration, UpdateStages.WithDaprConfiguration, UpdateStages.WithPeerAuthentication { /** * Executes the update request. - * + * * @return the updated resource. */ ManagedEnvironment apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ ManagedEnvironment apply(Context context); } - /** The ManagedEnvironment update stages. */ + /** + * The ManagedEnvironment update stages. + */ interface UpdateStages { - /** The stage of the ManagedEnvironment update allowing to specify tags. */ + /** + * The stage of the ManagedEnvironment update allowing to specify tags. + */ interface WithTags { /** * Specifies the tags property: Resource tags.. - * + * * @param tags Resource tags. * @return the next definition stage. */ Update withTags(Map tags); } - /** The stage of the ManagedEnvironment update allowing to specify kind. */ + /** + * 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 daprAIInstrumentationKey. */ + /** + * The stage of the ManagedEnvironment update allowing to specify identity. + */ + interface WithIdentity { + /** + * Specifies the identity property: Managed identities for the Managed Environment to interact with other + * Azure services without maintaining any secrets or credentials in code.. + * + * @param identity Managed identities for the Managed Environment to interact with other Azure services + * without maintaining any secrets or credentials in code. + * @return the next definition stage. + */ + Update withIdentity(ManagedServiceIdentity identity); + } + + /** + * The stage of the ManagedEnvironment update allowing to specify daprAIInstrumentationKey. + */ interface WithDaprAIInstrumentationKey { /** * Specifies the daprAIInstrumentationKey property: Azure Monitor instrumentation key used by Dapr to export * Service to Service communication telemetry. - * + * * @param daprAIInstrumentationKey Azure Monitor instrumentation key used by Dapr to export Service to - * Service communication telemetry. + * Service communication telemetry. * @return the next definition stage. */ Update withDaprAIInstrumentationKey(String daprAIInstrumentationKey); } - /** The stage of the ManagedEnvironment update allowing to specify daprAIConnectionString. */ + /** + * The stage of the ManagedEnvironment update allowing to specify daprAIConnectionString. + */ interface WithDaprAIConnectionString { /** * Specifies the daprAIConnectionString property: Application Insights connection string used by Dapr to * export Service to Service communication telemetry. - * + * * @param daprAIConnectionString Application Insights connection string used by Dapr to export Service to - * Service communication telemetry. + * Service communication telemetry. * @return the next definition stage. */ Update withDaprAIConnectionString(String daprAIConnectionString); } - /** The stage of the ManagedEnvironment update allowing to specify vnetConfiguration. */ + /** + * The stage of the ManagedEnvironment update allowing to specify vnetConfiguration. + */ interface WithVnetConfiguration { /** * Specifies the vnetConfiguration property: Vnet configuration for the environment. - * + * * @param vnetConfiguration Vnet configuration for the environment. * @return the next definition stage. */ Update withVnetConfiguration(VnetConfiguration vnetConfiguration); } - /** The stage of the ManagedEnvironment update allowing to specify appLogsConfiguration. */ + /** + * The stage of the ManagedEnvironment update allowing to specify appLogsConfiguration. + */ interface WithAppLogsConfiguration { /** * Specifies the appLogsConfiguration property: Cluster configuration which enables the log daemon to export - * app logs to a destination. Currently only "log-analytics" is supported. - * - * @param appLogsConfiguration Cluster configuration which enables the log daemon to export app logs to a - * destination. Currently only "log-analytics" is supported. + * app logs to a destination. Currently only "log-analytics" is + * supported. + * + * @param appLogsConfiguration Cluster configuration which enables the log daemon to export + * app logs to a destination. Currently only "log-analytics" is + * supported. * @return the next definition stage. */ Update withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration); } - /** The stage of the ManagedEnvironment update allowing to specify customDomainConfiguration. */ + /** + * The stage of the ManagedEnvironment update allowing to specify appInsightsConfiguration. + */ + interface WithAppInsightsConfiguration { + /** + * Specifies the appInsightsConfiguration property: Environment level Application Insights configuration. + * + * @param appInsightsConfiguration Environment level Application Insights configuration. + * @return the next definition stage. + */ + Update withAppInsightsConfiguration(AppInsightsConfiguration appInsightsConfiguration); + } + + /** + * The stage of the ManagedEnvironment update allowing to specify openTelemetryConfiguration. + */ + interface WithOpenTelemetryConfiguration { + /** + * Specifies the openTelemetryConfiguration property: Environment Open Telemetry configuration. + * + * @param openTelemetryConfiguration Environment Open Telemetry configuration. + * @return the next definition stage. + */ + Update withOpenTelemetryConfiguration(OpenTelemetryConfiguration openTelemetryConfiguration); + } + + /** + * The stage of the ManagedEnvironment update allowing to specify customDomainConfiguration. + */ interface WithCustomDomainConfiguration { /** * Specifies the customDomainConfiguration property: Custom domain configuration for the environment. - * + * * @param customDomainConfiguration Custom domain configuration for the environment. * @return the next definition stage. */ Update withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration); } - /** The stage of the ManagedEnvironment update allowing to specify workloadProfiles. */ + /** + * The stage of the ManagedEnvironment update allowing to specify workloadProfiles. + */ interface WithWorkloadProfiles { /** * Specifies the workloadProfiles property: Workload profiles configured for the Managed Environment.. - * + * * @param workloadProfiles Workload profiles configured for the Managed Environment. * @return the next definition stage. */ Update withWorkloadProfiles(List workloadProfiles); } - /** The stage of the ManagedEnvironment update allowing to specify kedaConfiguration. */ + /** + * The stage of the ManagedEnvironment update allowing to specify kedaConfiguration. + */ interface WithKedaConfiguration { /** * Specifies the kedaConfiguration property: The configuration of Keda component.. - * + * * @param kedaConfiguration The configuration of Keda component. * @return the next definition stage. */ Update withKedaConfiguration(KedaConfiguration kedaConfiguration); } - /** The stage of the ManagedEnvironment update allowing to specify daprConfiguration. */ + /** + * The stage of the ManagedEnvironment update allowing to specify daprConfiguration. + */ interface WithDaprConfiguration { /** * Specifies the daprConfiguration property: The configuration of Dapr component.. - * + * * @param daprConfiguration The configuration of Dapr component. * @return the next definition stage. */ Update withDaprConfiguration(DaprConfiguration daprConfiguration); } - /** The stage of the ManagedEnvironment update allowing to specify peerAuthentication. */ + /** + * The stage of the ManagedEnvironment update allowing to specify peerAuthentication. + */ interface WithPeerAuthentication { /** * Specifies the peerAuthentication property: Peer authentication settings for the Managed Environment. - * + * * @param peerAuthentication Peer authentication settings for the Managed Environment. * @return the next definition stage. */ @@ -608,14 +766,14 @@ interface WithPeerAuthentication { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ ManagedEnvironment refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ @@ -623,13 +781,13 @@ interface WithPeerAuthentication { /** * Get auth token for a managed environment - * - *

Checks if resource name is available. - * + * + * Checks if resource name is available. + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return environment Auth Token along with {@link Response}. */ @@ -637,11 +795,11 @@ interface WithPeerAuthentication { /** * Get auth token for a managed environment - * - *

Checks if resource name is available. - * + * + * Checks if resource name is available. + * * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return environment Auth Token. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentDiagnostics.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentDiagnostics.java index b3e3c06ab879..03a0cb082365 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentDiagnostics.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentDiagnostics.java @@ -7,36 +7,38 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ManagedEnvironmentDiagnostics. */ +/** + * Resource collection API of ManagedEnvironmentDiagnostics. + */ public interface ManagedEnvironmentDiagnostics { /** * Get the list of diagnostics for a given Managed Environment. - * - *

Get the list of diagnostics for a Managed Environment used to host container apps. - * + * + * Get the list of diagnostics for a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the list of diagnostics for a Managed Environment used to host container apps along with {@link - * Response}. + * @return the list of diagnostics for a Managed Environment used to host container apps along with + * {@link Response}. */ - Response listDetectorsWithResponse( - String resourceGroupName, String environmentName, Context context); + Response listDetectorsWithResponse(String resourceGroupName, String environmentName, + Context context); /** * Get the list of diagnostics for a given Managed Environment. - * - *

Get the list of diagnostics for a Managed Environment used to host container apps. - * + * + * Get the list of diagnostics for a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the list of diagnostics for a Managed Environment used to host container apps. */ @@ -44,33 +46,33 @@ Response listDetectorsWithResponse( /** * Get the diagnostics data for a given Managed Environment. - * - *

Get the diagnostics data for a Managed Environment used to host container apps. - * + * + * Get the diagnostics data for a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param detectorName Name of the Managed Environment detector. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the diagnostics data for a Managed Environment used to host container apps along with {@link Response}. */ - Response getDetectorWithResponse( - String resourceGroupName, String environmentName, String detectorName, Context context); + Response getDetectorWithResponse(String resourceGroupName, String environmentName, String detectorName, + Context context); /** * Get the diagnostics data for a given Managed Environment. - * - *

Get the diagnostics data for a Managed Environment used to host container apps. - * + * + * Get the diagnostics data for a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param detectorName Name of the Managed Environment detector. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the diagnostics data for a Managed Environment used to host container apps. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerAuthentication.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerAuthentication.java index ce20f1532b00..53f2f9a2a4ca 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerAuthentication.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentPropertiesPeerAuthentication.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Peer authentication settings for the Managed Environment. */ +/** + * Peer authentication settings for the Managed Environment. + */ @Fluent public final class ManagedEnvironmentPropertiesPeerAuthentication { /* @@ -16,13 +18,15 @@ public final class ManagedEnvironmentPropertiesPeerAuthentication { @JsonProperty(value = "mtls") private Mtls mtls; - /** Creates an instance of ManagedEnvironmentPropertiesPeerAuthentication class. */ + /** + * Creates an instance of ManagedEnvironmentPropertiesPeerAuthentication class. + */ public ManagedEnvironmentPropertiesPeerAuthentication() { } /** * Get the mtls property: Mutual TLS authentication settings for the Managed Environment. - * + * * @return the mtls value. */ public Mtls mtls() { @@ -31,7 +35,7 @@ public Mtls mtls() { /** * Set the mtls property: Mutual TLS authentication settings for the Managed Environment. - * + * * @param mtls the mtls value to set. * @return the ManagedEnvironmentPropertiesPeerAuthentication object itself. */ @@ -42,7 +46,7 @@ public ManagedEnvironmentPropertiesPeerAuthentication withMtls(Mtls mtls) { /** * 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/ManagedEnvironmentStorage.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorage.java index 3e565811a210..2e1a0fcd4b12 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorage.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorage.java @@ -4,69 +4,87 @@ package com.azure.resourcemanager.appcontainers.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStorageInner; -/** An immutable client-side representation of ManagedEnvironmentStorage. */ +/** + * An immutable client-side representation of ManagedEnvironmentStorage. + */ public interface ManagedEnvironmentStorage { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the properties property: Storage properties. - * + * * @return the properties value. */ ManagedEnvironmentStorageProperties properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStorageInner object. - * + * * @return the inner object. */ ManagedEnvironmentStorageInner innerModel(); - /** The entirety of the ManagedEnvironmentStorage definition. */ + /** + * The entirety of the ManagedEnvironmentStorage definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The ManagedEnvironmentStorage definition stages. */ + /** + * The ManagedEnvironmentStorage definition stages. + */ interface DefinitionStages { - /** The first stage of the ManagedEnvironmentStorage definition. */ + /** + * The first stage of the ManagedEnvironmentStorage definition. + */ interface Blank extends WithParentResource { } - /** The stage of the ManagedEnvironmentStorage definition allowing to specify parent resource. */ + /** + * The stage of the ManagedEnvironmentStorage definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, environmentName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @return the next definition stage. @@ -81,25 +99,27 @@ interface WithParentResource { interface WithCreate extends DefinitionStages.WithProperties { /** * Executes the create request. - * + * * @return the created resource. */ ManagedEnvironmentStorage create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ ManagedEnvironmentStorage create(Context context); } - /** The stage of the ManagedEnvironmentStorage definition allowing to specify properties. */ + /** + * The stage of the ManagedEnvironmentStorage definition allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: Storage properties. - * + * * @param properties Storage properties. * @return the next definition stage. */ @@ -109,36 +129,42 @@ interface WithProperties { /** * Begins update for the ManagedEnvironmentStorage resource. - * + * * @return the stage of resource update. */ ManagedEnvironmentStorage.Update update(); - /** The template for ManagedEnvironmentStorage update. */ + /** + * The template for ManagedEnvironmentStorage update. + */ interface Update extends UpdateStages.WithProperties { /** * Executes the update request. - * + * * @return the updated resource. */ ManagedEnvironmentStorage apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ ManagedEnvironmentStorage apply(Context context); } - /** The ManagedEnvironmentStorage update stages. */ + /** + * The ManagedEnvironmentStorage update stages. + */ interface UpdateStages { - /** The stage of the ManagedEnvironmentStorage update allowing to specify properties. */ + /** + * The stage of the ManagedEnvironmentStorage update allowing to specify properties. + */ interface WithProperties { /** * Specifies the properties property: Storage properties. - * + * * @param properties Storage properties. * @return the next definition stage. */ @@ -148,14 +174,14 @@ interface WithProperties { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ ManagedEnvironmentStorage refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorageProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorageProperties.java index 047e29ebf282..ca7eaef51f42 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorageProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorageProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Storage properties. */ +/** + * Storage properties. + */ @Fluent public final class ManagedEnvironmentStorageProperties { /* @@ -16,13 +18,21 @@ public final class ManagedEnvironmentStorageProperties { @JsonProperty(value = "azureFile") private AzureFileProperties azureFile; - /** Creates an instance of ManagedEnvironmentStorageProperties class. */ + /* + * NFS Azure file properties + */ + @JsonProperty(value = "nfsAzureFile") + private NfsAzureFileProperties nfsAzureFile; + + /** + * Creates an instance of ManagedEnvironmentStorageProperties class. + */ public ManagedEnvironmentStorageProperties() { } /** * Get the azureFile property: Azure file properties. - * + * * @return the azureFile value. */ public AzureFileProperties azureFile() { @@ -31,7 +41,7 @@ public AzureFileProperties azureFile() { /** * Set the azureFile property: Azure file properties. - * + * * @param azureFile the azureFile value to set. * @return the ManagedEnvironmentStorageProperties object itself. */ @@ -40,14 +50,37 @@ public ManagedEnvironmentStorageProperties withAzureFile(AzureFileProperties azu return this; } + /** + * Get the nfsAzureFile property: NFS Azure file properties. + * + * @return the nfsAzureFile value. + */ + public NfsAzureFileProperties nfsAzureFile() { + return this.nfsAzureFile; + } + + /** + * Set the nfsAzureFile property: NFS Azure file properties. + * + * @param nfsAzureFile the nfsAzureFile value to set. + * @return the ManagedEnvironmentStorageProperties object itself. + */ + public ManagedEnvironmentStorageProperties withNfsAzureFile(NfsAzureFileProperties nfsAzureFile) { + this.nfsAzureFile = nfsAzureFile; + return this; + } + /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (azureFile() != null) { azureFile().validate(); } + if (nfsAzureFile() != null) { + nfsAzureFile().validate(); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStoragesCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStoragesCollection.java index c6572a452c8b..2e891809bbce 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStoragesCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStoragesCollection.java @@ -7,11 +7,13 @@ import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStoragesCollectionInner; import java.util.List; -/** An immutable client-side representation of ManagedEnvironmentStoragesCollection. */ +/** + * An immutable client-side representation of ManagedEnvironmentStoragesCollection. + */ public interface ManagedEnvironmentStoragesCollection { /** * Gets the value property: Collection of storage resources. - * + * * @return the value value. */ List value(); @@ -19,7 +21,7 @@ public interface ManagedEnvironmentStoragesCollection { /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStoragesCollectionInner * object. - * + * * @return the inner object. */ ManagedEnvironmentStoragesCollectionInner innerModel(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentUsages.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentUsages.java new file mode 100644 index 000000000000..c9c1d12477fe --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentUsages.java @@ -0,0 +1,42 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of ManagedEnvironmentUsages. + */ +public interface ManagedEnvironmentUsages { + /** + * Gets the current usage information as well as the limits for environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name 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. + * @return the current usage information as well as the limits for environment as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String environmentName); + + /** + * Gets the current usage information as well as the limits for environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name 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. + * @return the current usage information as well as the limits for environment as paginated response with + * {@link PagedIterable}. + */ + PagedIterable list(String resourceGroupName, String environmentName, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironments.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironments.java index 982eb2b0c3f5..cf2ffc7fc4f8 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 @@ -8,15 +8,17 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ManagedEnvironments. */ +/** + * Resource collection API of ManagedEnvironments. + */ public interface ManagedEnvironments { /** * Get all Environments for a subscription. - * - *

Get all Managed Environments for a subscription. - * + * + * Get all Managed Environments for a subscription. + * * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all Managed Environments for a subscription as paginated response with {@link PagedIterable}. */ @@ -24,13 +26,13 @@ public interface ManagedEnvironments { /** * Get all Environments for a subscription. - * - *

Get all Managed Environments for a subscription. - * + * + * Get all Managed Environments for a subscription. + * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all Managed Environments for a subscription as paginated response with {@link PagedIterable}. */ @@ -38,13 +40,13 @@ public interface ManagedEnvironments { /** * Get all the Environments in a resource group. - * - *

Get all the Managed Environments in a resource group. - * + * + * Get all the Managed Environments in a resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all the Managed Environments in a resource group as paginated response with {@link PagedIterable}. */ @@ -52,14 +54,14 @@ public interface ManagedEnvironments { /** * Get all the Environments in a resource group. - * - *

Get all the Managed Environments in a resource group. - * + * + * Get all the Managed Environments in a resource group. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all the Managed Environments in a resource group as paginated response with {@link PagedIterable}. */ @@ -67,31 +69,31 @@ public interface ManagedEnvironments { /** * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * + * + * Get the properties of a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Managed Environment used to host container apps along with {@link Response}. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String environmentName, Context context); + Response getByResourceGroupWithResponse(String resourceGroupName, String environmentName, + Context context); /** * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * + * + * Get the properties of a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Managed Environment used to host container apps. */ @@ -99,60 +101,60 @@ Response getByResourceGroupWithResponse( /** * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * + * + * Delete a Managed Environment if it does not have any container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteByResourceGroup(String resourceGroupName, String environmentName); /** * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * + * + * Delete a Managed Environment if it does not have any container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void delete(String resourceGroupName, String environmentName, Context context); /** * Get auth token for a managed environment - * - *

Checks if resource name is available. - * + * + * Checks if resource name is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return environment Auth Token along with {@link Response}. */ - Response getAuthTokenWithResponse( - String resourceGroupName, String environmentName, Context context); + Response getAuthTokenWithResponse(String resourceGroupName, String environmentName, + Context context); /** * Get auth token for a managed environment - * - *

Checks if resource name is available. - * + * + * Checks if resource name is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return environment Auth Token. */ @@ -160,14 +162,14 @@ Response getAuthTokenWithResponse( /** * Get all workload Profile States for a Managed Environment.. - * - *

Get all workload Profile States for a Managed Environment. - * + * + * Get all workload Profile States for a Managed Environment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all workload Profile States for a Managed Environment as paginated response with {@link PagedIterable}. */ @@ -175,30 +177,30 @@ Response getAuthTokenWithResponse( /** * Get all workload Profile States for a Managed Environment.. - * - *

Get all workload Profile States for a Managed Environment. - * + * + * Get all workload Profile States for a Managed Environment. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all workload Profile States for a Managed Environment as paginated response with {@link PagedIterable}. */ - PagedIterable listWorkloadProfileStates( - String resourceGroupName, String environmentName, Context context); + PagedIterable listWorkloadProfileStates(String resourceGroupName, String environmentName, + Context context); /** * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * + * + * Get the properties of a Managed Environment used to host container apps. + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Managed Environment used to host container apps along with {@link Response}. */ @@ -206,14 +208,14 @@ PagedIterable listWorkloadProfileStates( /** * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * + * + * Get the properties of a Managed Environment used to host container apps. + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Managed Environment used to host container apps along with {@link Response}. */ @@ -221,34 +223,34 @@ PagedIterable listWorkloadProfileStates( /** * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * + * + * Delete a Managed Environment if it does not have any container apps. + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteById(String id); /** * Delete a Managed Environment. - * - *

Delete a Managed Environment if it does not have any container apps. - * + * + * Delete a Managed Environment if it does not have any container apps. + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteByIdWithResponse(String id, Context context); /** * Begins definition for a new ManagedEnvironment resource. - * + * * @param name resource name. * @return the first stage of the new ManagedEnvironment definition. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsCollection.java index a57a3e082679..3ef87ab8253b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsCollection.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Collection of Environments. */ +/** + * Collection of Environments. + */ @Fluent public final class ManagedEnvironmentsCollection { /* @@ -25,13 +27,15 @@ public final class ManagedEnvironmentsCollection { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of ManagedEnvironmentsCollection class. */ + /** + * Creates an instance of ManagedEnvironmentsCollection class. + */ public ManagedEnvironmentsCollection() { } /** * Get the value property: Collection of resources. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: Collection of resources. - * + * * @param value the value value to set. * @return the ManagedEnvironmentsCollection object itself. */ @@ -51,7 +55,7 @@ public ManagedEnvironmentsCollection withValue(List val /** * Get the nextLink property: Link to next page of resources. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,15 +64,13 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property value in model ManagedEnvironmentsCollection")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model ManagedEnvironmentsCollection")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsDiagnostics.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsDiagnostics.java index 516893bd6ae0..f4c6fb165f76 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsDiagnostics.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsDiagnostics.java @@ -7,19 +7,21 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ManagedEnvironmentsDiagnostics. */ +/** + * Resource collection API of ManagedEnvironmentsDiagnostics. + */ public interface ManagedEnvironmentsDiagnostics { /** * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * + * + * Get the properties of a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Managed Environment used to host container apps along with {@link Response}. */ @@ -27,14 +29,14 @@ public interface ManagedEnvironmentsDiagnostics { /** * Get the properties of a Managed Environment. - * - *

Get the properties of a Managed Environment used to host container apps. - * + * + * Get the properties of a Managed Environment used to host container apps. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the properties of a Managed Environment used to host container apps. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsStorages.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsStorages.java index 4ee96342baee..a1be60b7e13a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsStorages.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsStorages.java @@ -7,31 +7,33 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ManagedEnvironmentsStorages. */ +/** + * Resource collection API of ManagedEnvironmentsStorages. + */ public interface ManagedEnvironmentsStorages { /** * Get all storages for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all storages for a managedEnvironment along with {@link Response}. */ - Response listWithResponse( - String resourceGroupName, String environmentName, Context context); + Response listWithResponse(String resourceGroupName, String environmentName, + Context context); /** * Get all storages for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name 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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return all storages for a managedEnvironment. */ @@ -39,29 +41,29 @@ Response listWithResponse( /** * Get storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return storage for a managedEnvironment along with {@link Response}. */ - Response getWithResponse( - String resourceGroupName, String environmentName, String storageName, Context context); + Response getWithResponse(String resourceGroupName, String environmentName, + String storageName, Context context); /** * Get storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return storage for a managedEnvironment. */ @@ -69,40 +71,40 @@ Response getWithResponse( /** * Delete storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String environmentName, String storageName, Context context); + Response deleteWithResponse(String resourceGroupName, String environmentName, String storageName, + Context context); /** * Delete storage for a managedEnvironment. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void delete(String resourceGroupName, String environmentName, String storageName); /** * Get storage for a managedEnvironment. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return storage for a managedEnvironment along with {@link Response}. */ @@ -110,12 +112,12 @@ Response deleteWithResponse( /** * Get storage for a managedEnvironment. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return storage for a managedEnvironment along with {@link Response}. */ @@ -123,23 +125,23 @@ Response deleteWithResponse( /** * Delete storage for a managedEnvironment. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ void deleteById(String id); /** * Delete storage for a managedEnvironment. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the {@link Response}. */ @@ -147,7 +149,7 @@ Response deleteWithResponse( /** * Begins definition for a new ManagedEnvironmentStorage resource. - * + * * @param name resource name. * @return the first stage of the new ManagedEnvironmentStorage definition. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentity.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentity.java index 0b21b71ef2e4..d4f2c257c015 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentity.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentity.java @@ -11,7 +11,9 @@ import java.util.Map; import java.util.UUID; -/** Managed service identity (system assigned and/or user assigned identities). */ +/** + * Managed service identity (system assigned and/or user assigned identities). + */ @Fluent public final class ManagedServiceIdentity { /* @@ -37,21 +39,24 @@ public final class ManagedServiceIdentity { /* * The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys * will be ARM resource ids in the form: - * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/ + * userAssignedIdentities/{identityName}. * The dictionary values can be empty objects ({}) in requests. */ @JsonProperty(value = "userAssignedIdentities") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; - /** Creates an instance of ManagedServiceIdentity class. */ + /** + * Creates an instance of ManagedServiceIdentity class. + */ public ManagedServiceIdentity() { } /** * Get the principalId property: The service principal ID of the system assigned identity. This property will only * be provided for a system assigned identity. - * + * * @return the principalId value. */ public UUID principalId() { @@ -59,9 +64,9 @@ public UUID principalId() { } /** - * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided for - * a system assigned identity. - * + * Get the tenantId property: The tenant ID of the system assigned identity. This property will only be provided + * for a system assigned identity. + * * @return the tenantId value. */ public UUID tenantId() { @@ -71,7 +76,7 @@ public UUID tenantId() { /** * Get the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are * allowed). - * + * * @return the type value. */ public ManagedServiceIdentityType type() { @@ -81,7 +86,7 @@ public ManagedServiceIdentityType type() { /** * Set the type property: Type of managed service identity (where both SystemAssigned and UserAssigned types are * allowed). - * + * * @param type the type value to set. * @return the ManagedServiceIdentity object itself. */ @@ -95,7 +100,7 @@ public ManagedServiceIdentity withType(ManagedServiceIdentityType type) { * userAssignedIdentities dictionary keys will be ARM resource ids in the form: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. * The dictionary values can be empty objects ({}) in requests. - * + * * @return the userAssignedIdentities value. */ public Map userAssignedIdentities() { @@ -107,7 +112,7 @@ public Map userAssignedIdentities() { * userAssignedIdentities dictionary keys will be ARM resource ids in the form: * '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. * The dictionary values can be empty objects ({}) in requests. - * + * * @param userAssignedIdentities the userAssignedIdentities value to set. * @return the ManagedServiceIdentity object itself. */ @@ -118,24 +123,20 @@ public ManagedServiceIdentity withUserAssignedIdentities(Map { - if (e != null) { - e.validate(); - } - }); + userAssignedIdentities().values().forEach(e -> { + if (e != null) { + e.validate(); + } + }); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentityType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentityType.java index 26bdab801b0b..5b9996316a96 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentityType.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentityType.java @@ -8,24 +8,34 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ +/** + * Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + */ public final class ManagedServiceIdentityType extends ExpandableStringEnum { - /** Static value None for ManagedServiceIdentityType. */ + /** + * Static value None for ManagedServiceIdentityType. + */ public static final ManagedServiceIdentityType NONE = fromString("None"); - /** Static value SystemAssigned for ManagedServiceIdentityType. */ + /** + * Static value SystemAssigned for ManagedServiceIdentityType. + */ public static final ManagedServiceIdentityType SYSTEM_ASSIGNED = fromString("SystemAssigned"); - /** Static value UserAssigned for ManagedServiceIdentityType. */ + /** + * Static value UserAssigned for ManagedServiceIdentityType. + */ public static final ManagedServiceIdentityType USER_ASSIGNED = fromString("UserAssigned"); - /** Static value SystemAssigned,UserAssigned for ManagedServiceIdentityType. */ - public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED = - fromString("SystemAssigned,UserAssigned"); + /** + * Static value SystemAssigned,UserAssigned for ManagedServiceIdentityType. + */ + public static final ManagedServiceIdentityType SYSTEM_ASSIGNED_USER_ASSIGNED + = fromString("SystemAssigned,UserAssigned"); /** * Creates a new instance of ManagedServiceIdentityType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -34,7 +44,7 @@ public ManagedServiceIdentityType() { /** * Creates or finds a ManagedServiceIdentityType from its string representation. - * + * * @param name a name to look for. * @return the corresponding ManagedServiceIdentityType. */ @@ -45,7 +55,7 @@ public static ManagedServiceIdentityType fromString(String name) { /** * Gets known ManagedServiceIdentityType values. - * + * * @return known ManagedServiceIdentityType values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/MetricsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/MetricsConfiguration.java new file mode 100644 index 000000000000..8087166e8689 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/MetricsConfiguration.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Configuration of Open Telemetry metrics. + */ +@Fluent +public final class MetricsConfiguration { + /* + * Open telemetry metrics destinations + */ + @JsonProperty(value = "destinations") + private List destinations; + + /** + * Creates an instance of MetricsConfiguration class. + */ + public MetricsConfiguration() { + } + + /** + * Get the destinations property: Open telemetry metrics destinations. + * + * @return the destinations value. + */ + public List destinations() { + return this.destinations; + } + + /** + * Set the destinations property: Open telemetry metrics destinations. + * + * @param destinations the destinations value to set. + * @return the MetricsConfiguration object itself. + */ + public MetricsConfiguration withDestinations(List destinations) { + this.destinations = destinations; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Mtls.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Mtls.java index 8c66d5f1c720..cc7e238c927c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Mtls.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Mtls.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Configuration properties for mutual TLS authentication. */ +/** + * Configuration properties for mutual TLS authentication. + */ @Fluent public final class Mtls { /* @@ -16,13 +18,15 @@ public final class Mtls { @JsonProperty(value = "enabled") private Boolean enabled; - /** Creates an instance of Mtls class. */ + /** + * Creates an instance of Mtls class. + */ public Mtls() { } /** * Get the enabled property: Boolean indicating whether the mutual TLS authentication is enabled. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -31,7 +35,7 @@ public Boolean enabled() { /** * Set the enabled property: Boolean indicating whether the mutual TLS authentication is enabled. - * + * * @param enabled the enabled value to set. * @return the Mtls object itself. */ @@ -42,7 +46,7 @@ public Mtls withEnabled(Boolean enabled) { /** * 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/Namespaces.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Namespaces.java index bf527d3027b7..48776943b50c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Namespaces.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Namespaces.java @@ -7,43 +7,42 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of Namespaces. */ +/** + * Resource collection API of Namespaces. + */ public interface Namespaces { /** * Checks the resource name availability. - * - *

Checks if resource name is available. - * + * + * Checks if resource name is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param checkNameAvailabilityRequest The check name availability request. * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the check availability result along with {@link Response}. */ - Response checkNameAvailabilityWithResponse( - String resourceGroupName, - String environmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest, - Context context); + Response checkNameAvailabilityWithResponse(String resourceGroupName, + String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context); /** * Checks the resource name availability. - * - *

Checks if resource name is available. - * + * + * Checks if resource name is available. + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param checkNameAvailabilityRequest The check name availability request. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return the check availability result. */ - CheckNameAvailabilityResponse checkNameAvailability( - String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest); + CheckNameAvailabilityResponse checkNameAvailability(String resourceGroupName, String environmentName, + CheckNameAvailabilityRequest checkNameAvailabilityRequest); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/NfsAzureFileProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/NfsAzureFileProperties.java new file mode 100644 index 000000000000..269e2d0149a4 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/NfsAzureFileProperties.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * NFS Azure File Properties. + */ +@Fluent +public final class NfsAzureFileProperties { + /* + * Server for NFS azure file. + */ + @JsonProperty(value = "server") + private String server; + + /* + * Access mode for storage + */ + @JsonProperty(value = "accessMode") + private AccessMode accessMode; + + /* + * NFS Azure file share name. + */ + @JsonProperty(value = "shareName") + private String shareName; + + /** + * Creates an instance of NfsAzureFileProperties class. + */ + public NfsAzureFileProperties() { + } + + /** + * Get the server property: Server for NFS azure file. + * + * @return the server value. + */ + public String server() { + return this.server; + } + + /** + * Set the server property: Server for NFS azure file. + * + * @param server the server value to set. + * @return the NfsAzureFileProperties object itself. + */ + public NfsAzureFileProperties withServer(String server) { + this.server = server; + return this; + } + + /** + * Get the accessMode property: Access mode for storage. + * + * @return the accessMode value. + */ + public AccessMode accessMode() { + return this.accessMode; + } + + /** + * Set the accessMode property: Access mode for storage. + * + * @param accessMode the accessMode value to set. + * @return the NfsAzureFileProperties object itself. + */ + public NfsAzureFileProperties withAccessMode(AccessMode accessMode) { + this.accessMode = accessMode; + return this; + } + + /** + * Get the shareName property: NFS Azure file share name. + * + * @return the shareName value. + */ + public String shareName() { + return this.shareName; + } + + /** + * Set the shareName property: NFS Azure file share name. + * + * @param shareName the shareName value to set. + * @return the NfsAzureFileProperties object itself. + */ + public NfsAzureFileProperties withShareName(String shareName) { + this.shareName = shareName; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Nonce.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Nonce.java index 92dfa219b508..804cdd2e4555 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Nonce.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Nonce.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The configuration settings of the nonce used in the login flow. */ +/** + * The configuration settings of the nonce used in the login flow. + */ @Fluent public final class Nonce { /* @@ -23,14 +25,16 @@ public final class Nonce { @JsonProperty(value = "nonceExpirationInterval") private String nonceExpirationInterval; - /** Creates an instance of Nonce class. */ + /** + * Creates an instance of Nonce class. + */ public Nonce() { } /** * Get the validateNonce property: <code>false</code> if the nonce should not be validated while * completing the login flow; otherwise, <code>true</code>. - * + * * @return the validateNonce value. */ public Boolean validateNonce() { @@ -40,7 +44,7 @@ public Boolean validateNonce() { /** * Set the validateNonce property: <code>false</code> if the nonce should not be validated while * completing the login flow; otherwise, <code>true</code>. - * + * * @param validateNonce the validateNonce value to set. * @return the Nonce object itself. */ @@ -51,7 +55,7 @@ public Nonce withValidateNonce(Boolean validateNonce) { /** * Get the nonceExpirationInterval property: The time after the request is made when the nonce should expire. - * + * * @return the nonceExpirationInterval value. */ public String nonceExpirationInterval() { @@ -60,7 +64,7 @@ public String nonceExpirationInterval() { /** * Set the nonceExpirationInterval property: The time after the request is made when the nonce should expire. - * + * * @param nonceExpirationInterval the nonceExpirationInterval value to set. * @return the Nonce object itself. */ @@ -71,7 +75,7 @@ public Nonce withNonceExpirationInterval(String nonceExpirationInterval) { /** * 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/OpenIdConnectClientCredential.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectClientCredential.java index 2331e42f625e..9bfacd2229f5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectClientCredential.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectClientCredential.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The authentication client credentials of the custom Open ID Connect provider. */ +/** + * The authentication client credentials of the custom Open ID Connect provider. + */ @Fluent public final class OpenIdConnectClientCredential { /* @@ -22,13 +24,15 @@ public final class OpenIdConnectClientCredential { @JsonProperty(value = "clientSecretSettingName") private String clientSecretSettingName; - /** Creates an instance of OpenIdConnectClientCredential class. */ + /** + * Creates an instance of OpenIdConnectClientCredential class. + */ public OpenIdConnectClientCredential() { } /** * Get the method property: The method that should be used to authenticate the user. - * + * * @return the method value. */ public ClientCredentialMethod method() { @@ -37,7 +41,7 @@ public ClientCredentialMethod method() { /** * Set the method property: The method that should be used to authenticate the user. - * + * * @param method the method value to set. * @return the OpenIdConnectClientCredential object itself. */ @@ -49,7 +53,7 @@ public OpenIdConnectClientCredential withMethod(ClientCredentialMethod method) { /** * Get the clientSecretSettingName property: The app setting that contains the client secret for the custom Open ID * Connect provider. - * + * * @return the clientSecretSettingName value. */ public String clientSecretSettingName() { @@ -59,7 +63,7 @@ public String clientSecretSettingName() { /** * Set the clientSecretSettingName property: The app setting that contains the client secret for the custom Open ID * Connect provider. - * + * * @param clientSecretSettingName the clientSecretSettingName value to set. * @return the OpenIdConnectClientCredential object itself. */ @@ -70,7 +74,7 @@ public OpenIdConnectClientCredential withClientSecretSettingName(String clientSe /** * 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/OpenIdConnectConfig.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectConfig.java index 08d9bc0e41fd..c35be9b8c3fe 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectConfig.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectConfig.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The configuration settings of the endpoints used for the custom Open ID Connect provider. */ +/** + * The configuration settings of the endpoints used for the custom Open ID Connect provider. + */ @Fluent public final class OpenIdConnectConfig { /* @@ -40,13 +42,15 @@ public final class OpenIdConnectConfig { @JsonProperty(value = "wellKnownOpenIdConfiguration") private String wellKnownOpenIdConfiguration; - /** Creates an instance of OpenIdConnectConfig class. */ + /** + * Creates an instance of OpenIdConnectConfig class. + */ public OpenIdConnectConfig() { } /** * Get the authorizationEndpoint property: The endpoint to be used to make an authorization request. - * + * * @return the authorizationEndpoint value. */ public String authorizationEndpoint() { @@ -55,7 +59,7 @@ public String authorizationEndpoint() { /** * Set the authorizationEndpoint property: The endpoint to be used to make an authorization request. - * + * * @param authorizationEndpoint the authorizationEndpoint value to set. * @return the OpenIdConnectConfig object itself. */ @@ -66,7 +70,7 @@ public OpenIdConnectConfig withAuthorizationEndpoint(String authorizationEndpoin /** * Get the tokenEndpoint property: The endpoint to be used to request a token. - * + * * @return the tokenEndpoint value. */ public String tokenEndpoint() { @@ -75,7 +79,7 @@ public String tokenEndpoint() { /** * Set the tokenEndpoint property: The endpoint to be used to request a token. - * + * * @param tokenEndpoint the tokenEndpoint value to set. * @return the OpenIdConnectConfig object itself. */ @@ -86,7 +90,7 @@ public OpenIdConnectConfig withTokenEndpoint(String tokenEndpoint) { /** * Get the issuer property: The endpoint that issues the token. - * + * * @return the issuer value. */ public String issuer() { @@ -95,7 +99,7 @@ public String issuer() { /** * Set the issuer property: The endpoint that issues the token. - * + * * @param issuer the issuer value to set. * @return the OpenIdConnectConfig object itself. */ @@ -106,7 +110,7 @@ public OpenIdConnectConfig withIssuer(String issuer) { /** * Get the certificationUri property: The endpoint that provides the keys necessary to validate the token. - * + * * @return the certificationUri value. */ public String certificationUri() { @@ -115,7 +119,7 @@ public String certificationUri() { /** * Set the certificationUri property: The endpoint that provides the keys necessary to validate the token. - * + * * @param certificationUri the certificationUri value to set. * @return the OpenIdConnectConfig object itself. */ @@ -125,9 +129,9 @@ public OpenIdConnectConfig withCertificationUri(String certificationUri) { } /** - * Get the wellKnownOpenIdConfiguration property: The endpoint that contains all the configuration endpoints for the - * provider. - * + * Get the wellKnownOpenIdConfiguration property: The endpoint that contains all the configuration endpoints for + * the provider. + * * @return the wellKnownOpenIdConfiguration value. */ public String wellKnownOpenIdConfiguration() { @@ -135,9 +139,9 @@ public String wellKnownOpenIdConfiguration() { } /** - * Set the wellKnownOpenIdConfiguration property: The endpoint that contains all the configuration endpoints for the - * provider. - * + * Set the wellKnownOpenIdConfiguration property: The endpoint that contains all the configuration endpoints for + * the provider. + * * @param wellKnownOpenIdConfiguration the wellKnownOpenIdConfiguration value to set. * @return the OpenIdConnectConfig object itself. */ @@ -148,7 +152,7 @@ public OpenIdConnectConfig withWellKnownOpenIdConfiguration(String wellKnownOpen /** * 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/OpenIdConnectLogin.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectLogin.java index 2d5eeaf03614..48e465c4d0cc 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectLogin.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectLogin.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** The configuration settings of the login flow of the custom Open ID Connect provider. */ +/** + * The configuration settings of the login flow of the custom Open ID Connect provider. + */ @Fluent public final class OpenIdConnectLogin { /* @@ -23,13 +25,15 @@ public final class OpenIdConnectLogin { @JsonProperty(value = "scopes") private List scopes; - /** Creates an instance of OpenIdConnectLogin class. */ + /** + * Creates an instance of OpenIdConnectLogin class. + */ public OpenIdConnectLogin() { } /** * Get the nameClaimType property: The name of the claim that contains the users name. - * + * * @return the nameClaimType value. */ public String nameClaimType() { @@ -38,7 +42,7 @@ public String nameClaimType() { /** * Set the nameClaimType property: The name of the claim that contains the users name. - * + * * @param nameClaimType the nameClaimType value to set. * @return the OpenIdConnectLogin object itself. */ @@ -49,7 +53,7 @@ public OpenIdConnectLogin withNameClaimType(String nameClaimType) { /** * Get the scopes property: A list of the scopes that should be requested while authenticating. - * + * * @return the scopes value. */ public List scopes() { @@ -58,7 +62,7 @@ public List scopes() { /** * Set the scopes property: A list of the scopes that should be requested while authenticating. - * + * * @param scopes the scopes value to set. * @return the OpenIdConnectLogin object itself. */ @@ -69,7 +73,7 @@ public OpenIdConnectLogin withScopes(List scopes) { /** * 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/OpenIdConnectRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectRegistration.java index 85683990f70f..626b6c1fd21c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectRegistration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectRegistration.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The configuration settings of the app registration for the custom Open ID Connect provider. */ +/** + * The configuration settings of the app registration for the custom Open ID Connect provider. + */ @Fluent public final class OpenIdConnectRegistration { /* @@ -28,13 +30,15 @@ public final class OpenIdConnectRegistration { @JsonProperty(value = "openIdConnectConfiguration") private OpenIdConnectConfig openIdConnectConfiguration; - /** Creates an instance of OpenIdConnectRegistration class. */ + /** + * Creates an instance of OpenIdConnectRegistration class. + */ public OpenIdConnectRegistration() { } /** * Get the clientId property: The client id of the custom Open ID Connect provider. - * + * * @return the clientId value. */ public String clientId() { @@ -43,7 +47,7 @@ public String clientId() { /** * Set the clientId property: The client id of the custom Open ID Connect provider. - * + * * @param clientId the clientId value to set. * @return the OpenIdConnectRegistration object itself. */ @@ -54,7 +58,7 @@ public OpenIdConnectRegistration withClientId(String clientId) { /** * Get the clientCredential property: The authentication credentials of the custom Open ID Connect provider. - * + * * @return the clientCredential value. */ public OpenIdConnectClientCredential clientCredential() { @@ -63,7 +67,7 @@ public OpenIdConnectClientCredential clientCredential() { /** * Set the clientCredential property: The authentication credentials of the custom Open ID Connect provider. - * + * * @param clientCredential the clientCredential value to set. * @return the OpenIdConnectRegistration object itself. */ @@ -73,9 +77,9 @@ public OpenIdConnectRegistration withClientCredential(OpenIdConnectClientCredent } /** - * Get the openIdConnectConfiguration property: The configuration settings of the endpoints used for the custom Open - * ID Connect provider. - * + * Get the openIdConnectConfiguration property: The configuration settings of the endpoints used for the custom + * Open ID Connect provider. + * * @return the openIdConnectConfiguration value. */ public OpenIdConnectConfig openIdConnectConfiguration() { @@ -83,9 +87,9 @@ public OpenIdConnectConfig openIdConnectConfiguration() { } /** - * Set the openIdConnectConfiguration property: The configuration settings of the endpoints used for the custom Open - * ID Connect provider. - * + * Set the openIdConnectConfiguration property: The configuration settings of the endpoints used for the custom + * Open ID Connect provider. + * * @param openIdConnectConfiguration the openIdConnectConfiguration value to set. * @return the OpenIdConnectRegistration object itself. */ @@ -96,7 +100,7 @@ public OpenIdConnectRegistration withOpenIdConnectConfiguration(OpenIdConnectCon /** * 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/OpenTelemetryConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenTelemetryConfiguration.java new file mode 100644 index 000000000000..54c6df96b74b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenTelemetryConfiguration.java @@ -0,0 +1,145 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Configuration of Open Telemetry. + */ +@Fluent +public final class OpenTelemetryConfiguration { + /* + * Open telemetry destinations configuration + */ + @JsonProperty(value = "destinationsConfiguration") + private DestinationsConfiguration destinationsConfiguration; + + /* + * Open telemetry trace configuration + */ + @JsonProperty(value = "tracesConfiguration") + private TracesConfiguration tracesConfiguration; + + /* + * Open telemetry logs configuration + */ + @JsonProperty(value = "logsConfiguration") + private LogsConfiguration logsConfiguration; + + /* + * Open telemetry metrics configuration + */ + @JsonProperty(value = "metricsConfiguration") + private MetricsConfiguration metricsConfiguration; + + /** + * Creates an instance of OpenTelemetryConfiguration class. + */ + public OpenTelemetryConfiguration() { + } + + /** + * Get the destinationsConfiguration property: Open telemetry destinations configuration. + * + * @return the destinationsConfiguration value. + */ + public DestinationsConfiguration destinationsConfiguration() { + return this.destinationsConfiguration; + } + + /** + * Set the destinationsConfiguration property: Open telemetry destinations configuration. + * + * @param destinationsConfiguration the destinationsConfiguration value to set. + * @return the OpenTelemetryConfiguration object itself. + */ + public OpenTelemetryConfiguration + withDestinationsConfiguration(DestinationsConfiguration destinationsConfiguration) { + this.destinationsConfiguration = destinationsConfiguration; + return this; + } + + /** + * Get the tracesConfiguration property: Open telemetry trace configuration. + * + * @return the tracesConfiguration value. + */ + public TracesConfiguration tracesConfiguration() { + return this.tracesConfiguration; + } + + /** + * Set the tracesConfiguration property: Open telemetry trace configuration. + * + * @param tracesConfiguration the tracesConfiguration value to set. + * @return the OpenTelemetryConfiguration object itself. + */ + public OpenTelemetryConfiguration withTracesConfiguration(TracesConfiguration tracesConfiguration) { + this.tracesConfiguration = tracesConfiguration; + return this; + } + + /** + * Get the logsConfiguration property: Open telemetry logs configuration. + * + * @return the logsConfiguration value. + */ + public LogsConfiguration logsConfiguration() { + return this.logsConfiguration; + } + + /** + * Set the logsConfiguration property: Open telemetry logs configuration. + * + * @param logsConfiguration the logsConfiguration value to set. + * @return the OpenTelemetryConfiguration object itself. + */ + public OpenTelemetryConfiguration withLogsConfiguration(LogsConfiguration logsConfiguration) { + this.logsConfiguration = logsConfiguration; + return this; + } + + /** + * Get the metricsConfiguration property: Open telemetry metrics configuration. + * + * @return the metricsConfiguration value. + */ + public MetricsConfiguration metricsConfiguration() { + return this.metricsConfiguration; + } + + /** + * Set the metricsConfiguration property: Open telemetry metrics configuration. + * + * @param metricsConfiguration the metricsConfiguration value to set. + * @return the OpenTelemetryConfiguration object itself. + */ + public OpenTelemetryConfiguration withMetricsConfiguration(MetricsConfiguration metricsConfiguration) { + this.metricsConfiguration = metricsConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (destinationsConfiguration() != null) { + destinationsConfiguration().validate(); + } + if (tracesConfiguration() != null) { + tracesConfiguration().validate(); + } + if (logsConfiguration() != null) { + logsConfiguration().validate(); + } + if (metricsConfiguration() != null) { + metricsConfiguration().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDetail.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDetail.java index 1feb34ba8329..e3796d6840cc 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDetail.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDetail.java @@ -6,39 +6,41 @@ import com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner; -/** An immutable client-side representation of OperationDetail. */ +/** + * An immutable client-side representation of OperationDetail. + */ public interface OperationDetail { /** * Gets the name property: Name of the operation. - * + * * @return the name value. */ String name(); /** * Gets the isDataAction property: Indicates whether the operation is a data action. - * + * * @return the isDataAction value. */ Boolean isDataAction(); /** * Gets the display property: Display of the operation. - * + * * @return the display value. */ OperationDisplay display(); /** * Gets the origin property: Origin of the operation. - * + * * @return the origin value. */ String origin(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner object. - * + * * @return the inner object. */ OperationDetailInner innerModel(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDisplay.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDisplay.java index 2233a26203b5..a9e2cc05d789 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDisplay.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDisplay.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Operation display payload. */ +/** + * Operation display payload. + */ @Fluent public final class OperationDisplay { /* @@ -34,13 +36,15 @@ public final class OperationDisplay { @JsonProperty(value = "description") private String description; - /** Creates an instance of OperationDisplay class. */ + /** + * Creates an instance of OperationDisplay class. + */ public OperationDisplay() { } /** * Get the provider property: Resource provider of the operation. - * + * * @return the provider value. */ public String provider() { @@ -49,7 +53,7 @@ public String provider() { /** * Set the provider property: Resource provider of the operation. - * + * * @param provider the provider value to set. * @return the OperationDisplay object itself. */ @@ -60,7 +64,7 @@ public OperationDisplay withProvider(String provider) { /** * Get the resource property: Resource of the operation. - * + * * @return the resource value. */ public String resource() { @@ -69,7 +73,7 @@ public String resource() { /** * Set the resource property: Resource of the operation. - * + * * @param resource the resource value to set. * @return the OperationDisplay object itself. */ @@ -80,7 +84,7 @@ public OperationDisplay withResource(String resource) { /** * Get the operation property: Localized friendly name for the operation. - * + * * @return the operation value. */ public String operation() { @@ -89,7 +93,7 @@ public String operation() { /** * Set the operation property: Localized friendly name for the operation. - * + * * @param operation the operation value to set. * @return the OperationDisplay object itself. */ @@ -100,7 +104,7 @@ public OperationDisplay withOperation(String operation) { /** * Get the description property: Localized friendly description for the operation. - * + * * @return the description value. */ public String description() { @@ -109,7 +113,7 @@ public String description() { /** * Set the description property: Localized friendly description for the operation. - * + * * @param description the description value to set. * @return the OperationDisplay object itself. */ @@ -120,7 +124,7 @@ public OperationDisplay withDescription(String description) { /** * 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/Operations.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Operations.java index d9cf37c1461d..387a605db0d2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Operations.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Operations.java @@ -7,13 +7,15 @@ import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; -/** Resource collection API of Operations. */ +/** + * Resource collection API of Operations. + */ public interface Operations { /** * Lists all of the available RP operations. - * + * * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return available operations of the service as paginated response with {@link PagedIterable}. */ @@ -21,11 +23,11 @@ public interface Operations { /** * Lists all of the available RP operations. - * + * * @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. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return available operations of the service as paginated response with {@link PagedIterable}. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OtlpConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OtlpConfiguration.java new file mode 100644 index 000000000000..019b028484f2 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OtlpConfiguration.java @@ -0,0 +1,136 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Configuration of otlp. + */ +@Fluent +public final class OtlpConfiguration { + /* + * The name of otlp configuration + */ + @JsonProperty(value = "name") + private String name; + + /* + * The endpoint of otlp configuration + */ + @JsonProperty(value = "endpoint") + private String endpoint; + + /* + * Boolean indicating if otlp configuration is insecure + */ + @JsonProperty(value = "insecure") + private Boolean insecure; + + /* + * Headers of otlp configurations + */ + @JsonProperty(value = "headers") + private List

headers; + + /** + * Creates an instance of OtlpConfiguration class. + */ + public OtlpConfiguration() { + } + + /** + * Get the name property: The name of otlp configuration. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of otlp configuration. + * + * @param name the name value to set. + * @return the OtlpConfiguration object itself. + */ + public OtlpConfiguration withName(String name) { + this.name = name; + return this; + } + + /** + * Get the endpoint property: The endpoint of otlp configuration. + * + * @return the endpoint value. + */ + public String endpoint() { + return this.endpoint; + } + + /** + * Set the endpoint property: The endpoint of otlp configuration. + * + * @param endpoint the endpoint value to set. + * @return the OtlpConfiguration object itself. + */ + public OtlpConfiguration withEndpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + + /** + * Get the insecure property: Boolean indicating if otlp configuration is insecure. + * + * @return the insecure value. + */ + public Boolean insecure() { + return this.insecure; + } + + /** + * Set the insecure property: Boolean indicating if otlp configuration is insecure. + * + * @param insecure the insecure value to set. + * @return the OtlpConfiguration object itself. + */ + public OtlpConfiguration withInsecure(Boolean insecure) { + this.insecure = insecure; + return this; + } + + /** + * Get the headers property: Headers of otlp configurations. + * + * @return the headers value. + */ + public List
headers() { + return this.headers; + } + + /** + * Set the headers property: Headers of otlp configurations. + * + * @param headers the headers value to set. + * @return the OtlpConfiguration object itself. + */ + public OtlpConfiguration withHeaders(List
headers) { + this.headers = headers; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (headers() != null) { + headers().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PreBuildStep.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PreBuildStep.java new file mode 100644 index 000000000000..8f67420509b3 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/PreBuildStep.java @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Model representing a pre-build step. + */ +@Fluent +public final class PreBuildStep { + /* + * Description of the pre-build step. + */ + @JsonProperty(value = "description") + private String description; + + /* + * List of custom commands to run. + */ + @JsonProperty(value = "scripts") + private List scripts; + + /* + * Http get request to send before the build. + */ + @JsonProperty(value = "httpGet") + private HttpGet httpGet; + + /** + * Creates an instance of PreBuildStep class. + */ + public PreBuildStep() { + } + + /** + * Get the description property: Description of the pre-build step. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the pre-build step. + * + * @param description the description value to set. + * @return the PreBuildStep object itself. + */ + public PreBuildStep withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the scripts property: List of custom commands to run. + * + * @return the scripts value. + */ + public List scripts() { + return this.scripts; + } + + /** + * Set the scripts property: List of custom commands to run. + * + * @param scripts the scripts value to set. + * @return the PreBuildStep object itself. + */ + public PreBuildStep withScripts(List scripts) { + this.scripts = scripts; + return this; + } + + /** + * Get the httpGet property: Http get request to send before the build. + * + * @return the httpGet value. + */ + public HttpGet httpGet() { + return this.httpGet; + } + + /** + * Set the httpGet property: Http get request to send before the build. + * + * @param httpGet the httpGet value to set. + * @return the PreBuildStep object itself. + */ + public PreBuildStep withHttpGet(HttpGet httpGet) { + this.httpGet = httpGet; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (httpGet() != null) { + httpGet().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/QueueScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/QueueScaleRule.java index cfbffd1cecb8..aef1fb3523f6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/QueueScaleRule.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/QueueScaleRule.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Container App container Azure Queue based scaling rule. */ +/** + * Container App container Azure Queue based scaling rule. + */ @Fluent public final class QueueScaleRule { /* @@ -29,13 +31,15 @@ public final class QueueScaleRule { @JsonProperty(value = "auth") private List auth; - /** Creates an instance of QueueScaleRule class. */ + /** + * Creates an instance of QueueScaleRule class. + */ public QueueScaleRule() { } /** * Get the queueName property: Queue name. - * + * * @return the queueName value. */ public String queueName() { @@ -44,7 +48,7 @@ public String queueName() { /** * Set the queueName property: Queue name. - * + * * @param queueName the queueName value to set. * @return the QueueScaleRule object itself. */ @@ -55,7 +59,7 @@ public QueueScaleRule withQueueName(String queueName) { /** * Get the queueLength property: Queue length. - * + * * @return the queueLength value. */ public Integer queueLength() { @@ -64,7 +68,7 @@ public Integer queueLength() { /** * Set the queueLength property: Queue length. - * + * * @param queueLength the queueLength value to set. * @return the QueueScaleRule object itself. */ @@ -75,7 +79,7 @@ public QueueScaleRule withQueueLength(Integer queueLength) { /** * Get the auth property: Authentication secrets for the queue scale rule. - * + * * @return the auth value. */ public List auth() { @@ -84,7 +88,7 @@ public List auth() { /** * Set the auth property: Authentication secrets for the queue scale rule. - * + * * @param auth the auth value to set. * @return the QueueScaleRule object itself. */ @@ -95,7 +99,7 @@ public QueueScaleRule withAuth(List auth) { /** * 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/RegistryCredentials.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryCredentials.java index bb5b53a159fa..a20caa49d999 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryCredentials.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryCredentials.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Container App Private Registry. */ +/** + * Container App Private Registry. + */ @Fluent public final class RegistryCredentials { /* @@ -35,13 +37,15 @@ public final class RegistryCredentials { @JsonProperty(value = "identity") private String identity; - /** Creates an instance of RegistryCredentials class. */ + /** + * Creates an instance of RegistryCredentials class. + */ public RegistryCredentials() { } /** * Get the server property: Container Registry Server. - * + * * @return the server value. */ public String server() { @@ -50,7 +54,7 @@ public String server() { /** * Set the server property: Container Registry Server. - * + * * @param server the server value to set. * @return the RegistryCredentials object itself. */ @@ -61,7 +65,7 @@ public RegistryCredentials withServer(String server) { /** * Get the username property: Container Registry Username. - * + * * @return the username value. */ public String username() { @@ -70,7 +74,7 @@ public String username() { /** * Set the username property: Container Registry Username. - * + * * @param username the username value to set. * @return the RegistryCredentials object itself. */ @@ -81,7 +85,7 @@ public RegistryCredentials withUsername(String username) { /** * Get the passwordSecretRef property: The name of the Secret that contains the registry login password. - * + * * @return the passwordSecretRef value. */ public String passwordSecretRef() { @@ -90,7 +94,7 @@ public String passwordSecretRef() { /** * Set the passwordSecretRef property: The name of the Secret that contains the registry login password. - * + * * @param passwordSecretRef the passwordSecretRef value to set. * @return the RegistryCredentials object itself. */ @@ -103,7 +107,7 @@ public RegistryCredentials withPasswordSecretRef(String passwordSecretRef) { * Get the identity property: A Managed Identity to use to authenticate with Azure Container Registry. For * user-assigned identities, use the full user-assigned identity Resource ID. For system-assigned identities, use * 'system'. - * + * * @return the identity value. */ public String identity() { @@ -114,7 +118,7 @@ public String identity() { * Set the identity property: A Managed Identity to use to authenticate with Azure Container Registry. For * user-assigned identities, use the full user-assigned identity Resource ID. For system-assigned identities, use * 'system'. - * + * * @param identity the identity value to set. * @return the RegistryCredentials object itself. */ @@ -125,7 +129,7 @@ public RegistryCredentials withIdentity(String identity) { /** * 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/RegistryInfo.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryInfo.java index 719abbb378b5..ba74fd170270 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryInfo.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryInfo.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Container App registry information. */ +/** + * Container App registry information. + */ @Fluent public final class RegistryInfo { /* @@ -28,13 +30,15 @@ public final class RegistryInfo { @JsonProperty(value = "registryPassword") private String registryPassword; - /** Creates an instance of RegistryInfo class. */ + /** + * Creates an instance of RegistryInfo class. + */ public RegistryInfo() { } /** * Get the registryUrl property: registry server Url. - * + * * @return the registryUrl value. */ public String registryUrl() { @@ -43,7 +47,7 @@ public String registryUrl() { /** * Set the registryUrl property: registry server Url. - * + * * @param registryUrl the registryUrl value to set. * @return the RegistryInfo object itself. */ @@ -54,7 +58,7 @@ public RegistryInfo withRegistryUrl(String registryUrl) { /** * Get the registryUsername property: registry username. - * + * * @return the registryUsername value. */ public String registryUsername() { @@ -63,7 +67,7 @@ public String registryUsername() { /** * Set the registryUsername property: registry username. - * + * * @param registryUsername the registryUsername value to set. * @return the RegistryInfo object itself. */ @@ -74,7 +78,7 @@ public RegistryInfo withRegistryUsername(String registryUsername) { /** * Get the registryPassword property: registry secret. - * + * * @return the registryPassword value. */ public String registryPassword() { @@ -83,7 +87,7 @@ public String registryPassword() { /** * Set the registryPassword property: registry secret. - * + * * @param registryPassword the registryPassword value to set. * @return the RegistryInfo object itself. */ @@ -94,7 +98,7 @@ public RegistryInfo withRegistryPassword(String registryPassword) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Replica.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Replica.java index f3df8cdf13fe..7c9a93485af9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Replica.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Replica.java @@ -4,71 +4,81 @@ package com.azure.resourcemanager.appcontainers.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; import java.time.OffsetDateTime; import java.util.List; -/** An immutable client-side representation of Replica. */ +/** + * An immutable client-side representation of Replica. + */ public interface Replica { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the createdTime property: Timestamp describing when the pod was created by controller. - * + * * @return the createdTime value. */ OffsetDateTime createdTime(); /** * Gets the runningState property: Current running state of the replica. - * + * * @return the runningState value. */ ContainerAppReplicaRunningState runningState(); /** * Gets the runningStateDetails property: The details of replica current running state. - * + * * @return the runningStateDetails value. */ String runningStateDetails(); /** * Gets the containers property: The containers collection under a replica. - * + * * @return the containers value. */ List containers(); /** * Gets the initContainers property: The init containers collection under a replica. - * + * * @return the initContainers value. */ List initContainers(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner object. - * + * * @return the inner object. */ ReplicaInner innerModel(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaCollection.java index a0ccd84658a1..5f224d043a2a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaCollection.java @@ -7,18 +7,20 @@ import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaCollectionInner; import java.util.List; -/** An immutable client-side representation of ReplicaCollection. */ +/** + * An immutable client-side representation of ReplicaCollection. + */ public interface ReplicaCollection { /** * Gets the value property: Collection of resources. - * + * * @return the value value. */ List value(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ReplicaCollectionInner object. - * + * * @return the inner object. */ ReplicaCollectionInner innerModel(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaContainer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaContainer.java index 129d1e0ff42b..8f05e41336c6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaContainer.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaContainer.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Container object under Container App Revision Replica. */ +/** + * Container object under Container App Revision Replica. + */ @Fluent public final class ReplicaContainer { /* @@ -64,13 +66,15 @@ public final class ReplicaContainer { @JsonProperty(value = "execEndpoint", access = JsonProperty.Access.WRITE_ONLY) private String execEndpoint; - /** Creates an instance of ReplicaContainer class. */ + /** + * Creates an instance of ReplicaContainer class. + */ public ReplicaContainer() { } /** * Get the name property: The Name of the Container. - * + * * @return the name value. */ public String name() { @@ -79,7 +83,7 @@ public String name() { /** * Set the name property: The Name of the Container. - * + * * @param name the name value to set. * @return the ReplicaContainer object itself. */ @@ -90,7 +94,7 @@ public ReplicaContainer withName(String name) { /** * Get the containerId property: The Id of the Container. - * + * * @return the containerId value. */ public String containerId() { @@ -99,7 +103,7 @@ public String containerId() { /** * Set the containerId property: The Id of the Container. - * + * * @param containerId the containerId value to set. * @return the ReplicaContainer object itself. */ @@ -110,7 +114,7 @@ public ReplicaContainer withContainerId(String containerId) { /** * Get the ready property: The container ready status. - * + * * @return the ready value. */ public Boolean ready() { @@ -119,7 +123,7 @@ public Boolean ready() { /** * Set the ready property: The container ready status. - * + * * @param ready the ready value to set. * @return the ReplicaContainer object itself. */ @@ -130,7 +134,7 @@ public ReplicaContainer withReady(Boolean ready) { /** * Get the started property: The container start status. - * + * * @return the started value. */ public Boolean started() { @@ -139,7 +143,7 @@ public Boolean started() { /** * Set the started property: The container start status. - * + * * @param started the started value to set. * @return the ReplicaContainer object itself. */ @@ -150,7 +154,7 @@ public ReplicaContainer withStarted(Boolean started) { /** * Get the restartCount property: The container restart count. - * + * * @return the restartCount value. */ public Integer restartCount() { @@ -159,7 +163,7 @@ public Integer restartCount() { /** * Set the restartCount property: The container restart count. - * + * * @param restartCount the restartCount value to set. * @return the ReplicaContainer object itself. */ @@ -170,7 +174,7 @@ public ReplicaContainer withRestartCount(Integer restartCount) { /** * Get the runningState property: Current running state of the container. - * + * * @return the runningState value. */ public ContainerAppContainerRunningState runningState() { @@ -179,7 +183,7 @@ public ContainerAppContainerRunningState runningState() { /** * Get the runningStateDetails property: The details of container current running state. - * + * * @return the runningStateDetails value. */ public String runningStateDetails() { @@ -188,7 +192,7 @@ public String runningStateDetails() { /** * Get the logStreamEndpoint property: Log Stream endpoint. - * + * * @return the logStreamEndpoint value. */ public String logStreamEndpoint() { @@ -197,7 +201,7 @@ public String logStreamEndpoint() { /** * Get the execEndpoint property: Container exec endpoint. - * + * * @return the execEndpoint value. */ public String execEndpoint() { @@ -206,7 +210,7 @@ public String execEndpoint() { /** * 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/ResourceProviders.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ResourceProviders.java index 548ce7518279..11d4944e9880 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ResourceProviders.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ResourceProviders.java @@ -7,35 +7,59 @@ import com.azure.core.http.rest.Response; import com.azure.core.util.Context; -/** Resource collection API of ResourceProviders. */ +/** + * Resource collection API of ResourceProviders. + */ public interface ResourceProviders { /** * Get details of a single job execution. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return details of a single job execution along with {@link Response}. */ - Response jobExecutionWithResponse( - String resourceGroupName, String jobName, String jobExecutionName, Context context); + Response jobExecutionWithResponse(String resourceGroupName, String jobName, String jobExecutionName, + Context context); /** * Get details of a single job execution. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param jobName Job Name. * @param jobExecutionName Job execution name. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. * @return details of a single job execution. */ JobExecution jobExecution(String resourceGroupName, String jobName, String jobExecutionName); + + /** + * Get the verification id of a subscription used for verifying custom domains. + * + * @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 verification id of a subscription used for verifying custom domains along with {@link Response}. + */ + Response getCustomDomainVerificationIdWithResponse(Context context); + + /** + * Get the verification id of a subscription used for verifying custom domains. + * + * @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 verification id of a subscription used for verifying custom domains. + */ + String getCustomDomainVerificationId(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Revision.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Revision.java index 5e2eeb58945e..5f83c296e50c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Revision.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Revision.java @@ -4,35 +4,46 @@ package com.azure.resourcemanager.appcontainers.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; import java.time.OffsetDateTime; -/** An immutable client-side representation of Revision. */ +/** + * An immutable client-side representation of Revision. + */ public interface Revision { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** - * Gets the createdTime property: Timestamp describing when the revision was created by controller. - * + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the createdTime property: Timestamp describing when the revision was created + * by controller. + * * @return the createdTime value. */ OffsetDateTime createdTime(); @@ -40,78 +51,79 @@ public interface Revision { /** * Gets the lastActiveTime property: Timestamp describing when the revision was last active. Only meaningful when * revision is inactive. - * + * * @return the lastActiveTime value. */ OffsetDateTime lastActiveTime(); /** * Gets the fqdn property: Fully qualified domain name of the revision. - * + * * @return the fqdn value. */ String fqdn(); /** - * Gets the template property: Container App Revision Template with all possible settings and the defaults if user - * did not provide them. The defaults are populated as they were at the creation time. - * + * Gets the template property: Container App Revision Template with all possible settings and the + * defaults if user did not provide them. The defaults are populated + * as they were at the creation time. + * * @return the template value. */ Template template(); /** * Gets the active property: Boolean describing if the Revision is Active. - * + * * @return the active value. */ Boolean active(); /** * Gets the replicas property: Number of pods currently running for this revision. - * + * * @return the replicas value. */ Integer replicas(); /** * Gets the trafficWeight property: Traffic weight assigned to this revision. - * + * * @return the trafficWeight value. */ Integer trafficWeight(); /** * Gets the provisioningError property: Optional Field - Platform Error Message. - * + * * @return the provisioningError value. */ String provisioningError(); /** * Gets the healthState property: Current health State of the revision. - * + * * @return the healthState value. */ RevisionHealthState healthState(); /** * Gets the provisioningState property: Current provisioning State of the revision. - * + * * @return the provisioningState value. */ RevisionProvisioningState provisioningState(); /** * Gets the runningState property: Current running state of the revision. - * + * * @return the runningState value. */ RevisionRunningState runningState(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner object. - * + * * @return the inner object. */ RevisionInner innerModel(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionCollection.java index 18b8b90d9908..a9efc54b85d5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionCollection.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Container App Revisions collection ARM resource. */ +/** + * Container App Revisions collection ARM resource. + */ @Fluent public final class RevisionCollection { /* @@ -25,13 +27,15 @@ public final class RevisionCollection { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of RevisionCollection class. */ + /** + * Creates an instance of RevisionCollection class. + */ public RevisionCollection() { } /** * Get the value property: Collection of resources. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: Collection of resources. - * + * * @param value the value value to set. * @return the RevisionCollection object itself. */ @@ -51,7 +55,7 @@ public RevisionCollection withValue(List value) { /** * Get the nextLink property: Link to next page of resources. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,14 +64,13 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model RevisionCollection")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model RevisionCollection")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionHealthState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionHealthState.java index 788dab697cd4..9c7e078b6837 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionHealthState.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionHealthState.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Current health State of the revision. */ +/** + * Current health State of the revision. + */ public final class RevisionHealthState extends ExpandableStringEnum { - /** Static value Healthy for RevisionHealthState. */ + /** + * Static value Healthy for RevisionHealthState. + */ public static final RevisionHealthState HEALTHY = fromString("Healthy"); - /** Static value Unhealthy for RevisionHealthState. */ + /** + * Static value Unhealthy for RevisionHealthState. + */ public static final RevisionHealthState UNHEALTHY = fromString("Unhealthy"); - /** Static value None for RevisionHealthState. */ + /** + * Static value None for RevisionHealthState. + */ public static final RevisionHealthState NONE = fromString("None"); /** * Creates a new instance of RevisionHealthState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public RevisionHealthState() { /** * Creates or finds a RevisionHealthState from its string representation. - * + * * @param name a name to look for. * @return the corresponding RevisionHealthState. */ @@ -41,7 +49,7 @@ public static RevisionHealthState fromString(String name) { /** * Gets known RevisionHealthState values. - * + * * @return known RevisionHealthState values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionProvisioningState.java index 28f51f9d0fbf..48a5bb326456 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionProvisioningState.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionProvisioningState.java @@ -8,26 +8,38 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Current provisioning State of the revision. */ +/** + * Current provisioning State of the revision. + */ public final class RevisionProvisioningState extends ExpandableStringEnum { - /** Static value Provisioning for RevisionProvisioningState. */ + /** + * Static value Provisioning for RevisionProvisioningState. + */ public static final RevisionProvisioningState PROVISIONING = fromString("Provisioning"); - /** Static value Provisioned for RevisionProvisioningState. */ + /** + * Static value Provisioned for RevisionProvisioningState. + */ public static final RevisionProvisioningState PROVISIONED = fromString("Provisioned"); - /** Static value Failed for RevisionProvisioningState. */ + /** + * Static value Failed for RevisionProvisioningState. + */ public static final RevisionProvisioningState FAILED = fromString("Failed"); - /** Static value Deprovisioning for RevisionProvisioningState. */ + /** + * Static value Deprovisioning for RevisionProvisioningState. + */ public static final RevisionProvisioningState DEPROVISIONING = fromString("Deprovisioning"); - /** Static value Deprovisioned for RevisionProvisioningState. */ + /** + * Static value Deprovisioned for RevisionProvisioningState. + */ public static final RevisionProvisioningState DEPROVISIONED = fromString("Deprovisioned"); /** * Creates a new instance of RevisionProvisioningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -36,7 +48,7 @@ public RevisionProvisioningState() { /** * Creates or finds a RevisionProvisioningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding RevisionProvisioningState. */ @@ -47,7 +59,7 @@ public static RevisionProvisioningState fromString(String name) { /** * Gets known RevisionProvisioningState values. - * + * * @return known RevisionProvisioningState values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionRunningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionRunningState.java index 347a898eb596..517991e24dc7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionRunningState.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionRunningState.java @@ -8,29 +8,43 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Current running state of the revision. */ +/** + * Current running state of the revision. + */ public final class RevisionRunningState extends ExpandableStringEnum { - /** Static value Running for RevisionRunningState. */ + /** + * Static value Running for RevisionRunningState. + */ public static final RevisionRunningState RUNNING = fromString("Running"); - /** Static value Processing for RevisionRunningState. */ + /** + * Static value Processing for RevisionRunningState. + */ public static final RevisionRunningState PROCESSING = fromString("Processing"); - /** Static value Stopped for RevisionRunningState. */ + /** + * Static value Stopped for RevisionRunningState. + */ public static final RevisionRunningState STOPPED = fromString("Stopped"); - /** Static value Degraded for RevisionRunningState. */ + /** + * Static value Degraded for RevisionRunningState. + */ public static final RevisionRunningState DEGRADED = fromString("Degraded"); - /** Static value Failed for RevisionRunningState. */ + /** + * Static value Failed for RevisionRunningState. + */ public static final RevisionRunningState FAILED = fromString("Failed"); - /** Static value Unknown for RevisionRunningState. */ + /** + * Static value Unknown for RevisionRunningState. + */ public static final RevisionRunningState UNKNOWN = fromString("Unknown"); /** * Creates a new instance of RevisionRunningState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -39,7 +53,7 @@ public RevisionRunningState() { /** * Creates or finds a RevisionRunningState from its string representation. - * + * * @param name a name to look for. * @return the corresponding RevisionRunningState. */ @@ -50,7 +64,7 @@ public static RevisionRunningState fromString(String name) { /** * Gets known RevisionRunningState values. - * + * * @return known RevisionRunningState values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Runtime.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Runtime.java new file mode 100644 index 000000000000..4db435c3aa6e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Runtime.java @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Container App Runtime configuration. + */ +@Fluent +public final class Runtime { + /* + * Java app configuration + */ + @JsonProperty(value = "java") + private RuntimeJava java; + + /* + * .NET app configuration + */ + @JsonProperty(value = "dotnet") + private RuntimeDotnet dotnet; + + /** + * Creates an instance of Runtime class. + */ + public Runtime() { + } + + /** + * Get the java property: Java app configuration. + * + * @return the java value. + */ + public RuntimeJava java() { + return this.java; + } + + /** + * Set the java property: Java app configuration. + * + * @param java the java value to set. + * @return the Runtime object itself. + */ + public Runtime withJava(RuntimeJava java) { + this.java = java; + return this; + } + + /** + * Get the dotnet property: .NET app configuration. + * + * @return the dotnet value. + */ + public RuntimeDotnet dotnet() { + return this.dotnet; + } + + /** + * Set the dotnet property: .NET app configuration. + * + * @param dotnet the dotnet value to set. + * @return the Runtime object itself. + */ + public Runtime withDotnet(RuntimeDotnet dotnet) { + this.dotnet = dotnet; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (java() != null) { + java().validate(); + } + if (dotnet() != null) { + dotnet().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeDotnet.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeDotnet.java new file mode 100644 index 000000000000..c43f8333a4a0 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeDotnet.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * .NET app configuration. + */ +@Fluent +public final class RuntimeDotnet { + /* + * Auto configure the ASP.NET Core Data Protection feature + */ + @JsonProperty(value = "autoConfigureDataProtection") + private Boolean autoConfigureDataProtection; + + /** + * Creates an instance of RuntimeDotnet class. + */ + public RuntimeDotnet() { + } + + /** + * Get the autoConfigureDataProtection property: Auto configure the ASP.NET Core Data Protection feature. + * + * @return the autoConfigureDataProtection value. + */ + public Boolean autoConfigureDataProtection() { + return this.autoConfigureDataProtection; + } + + /** + * Set the autoConfigureDataProtection property: Auto configure the ASP.NET Core Data Protection feature. + * + * @param autoConfigureDataProtection the autoConfigureDataProtection value to set. + * @return the RuntimeDotnet object itself. + */ + public RuntimeDotnet withAutoConfigureDataProtection(Boolean autoConfigureDataProtection) { + this.autoConfigureDataProtection = autoConfigureDataProtection; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJava.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJava.java new file mode 100644 index 000000000000..45836e24396a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RuntimeJava.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Java app configuration. + */ +@Fluent +public final class RuntimeJava { + /* + * Enable jmx core metrics for the java app + */ + @JsonProperty(value = "enableMetrics") + private Boolean enableMetrics; + + /** + * Creates an instance of RuntimeJava class. + */ + public RuntimeJava() { + } + + /** + * Get the enableMetrics property: Enable jmx core metrics for the java app. + * + * @return the enableMetrics value. + */ + public Boolean enableMetrics() { + return this.enableMetrics; + } + + /** + * Set the enableMetrics property: Enable jmx core metrics for the java app. + * + * @param enableMetrics the enableMetrics value to set. + * @return the RuntimeJava object itself. + */ + public RuntimeJava withEnableMetrics(Boolean enableMetrics) { + this.enableMetrics = enableMetrics; + return this; + } + + /** + * 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/Scale.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scale.java index 4880d5368288..99a5cfe707b4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scale.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scale.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Container App scaling configurations. */ +/** + * Container App scaling configurations. + */ @Fluent public final class Scale { /* @@ -29,13 +31,15 @@ public final class Scale { @JsonProperty(value = "rules") private List rules; - /** Creates an instance of Scale class. */ + /** + * Creates an instance of Scale class. + */ public Scale() { } /** * Get the minReplicas property: Optional. Minimum number of container replicas. - * + * * @return the minReplicas value. */ public Integer minReplicas() { @@ -44,7 +48,7 @@ public Integer minReplicas() { /** * Set the minReplicas property: Optional. Minimum number of container replicas. - * + * * @param minReplicas the minReplicas value to set. * @return the Scale object itself. */ @@ -55,7 +59,7 @@ public Scale withMinReplicas(Integer minReplicas) { /** * Get the maxReplicas property: Optional. Maximum number of container replicas. Defaults to 10 if not set. - * + * * @return the maxReplicas value. */ public Integer maxReplicas() { @@ -64,7 +68,7 @@ public Integer maxReplicas() { /** * Set the maxReplicas property: Optional. Maximum number of container replicas. Defaults to 10 if not set. - * + * * @param maxReplicas the maxReplicas value to set. * @return the Scale object itself. */ @@ -75,7 +79,7 @@ public Scale withMaxReplicas(Integer maxReplicas) { /** * Get the rules property: Scaling rules. - * + * * @return the rules value. */ public List rules() { @@ -84,7 +88,7 @@ public List rules() { /** * Set the rules property: Scaling rules. - * + * * @param rules the rules value to set. * @return the Scale object itself. */ @@ -95,7 +99,7 @@ public Scale withRules(List rules) { /** * 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/ScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRule.java index 7072b43fc40b..84dbae8b7efc 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRule.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRule.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Container App container scaling rule. */ +/** + * Container App container scaling rule. + */ @Fluent public final class ScaleRule { /* @@ -40,13 +42,15 @@ public final class ScaleRule { @JsonProperty(value = "tcp") private TcpScaleRule tcp; - /** Creates an instance of ScaleRule class. */ + /** + * Creates an instance of ScaleRule class. + */ public ScaleRule() { } /** * Get the name property: Scale Rule Name. - * + * * @return the name value. */ public String name() { @@ -55,7 +59,7 @@ public String name() { /** * Set the name property: Scale Rule Name. - * + * * @param name the name value to set. * @return the ScaleRule object itself. */ @@ -66,7 +70,7 @@ public ScaleRule withName(String name) { /** * Get the azureQueue property: Azure Queue based scaling. - * + * * @return the azureQueue value. */ public QueueScaleRule azureQueue() { @@ -75,7 +79,7 @@ public QueueScaleRule azureQueue() { /** * Set the azureQueue property: Azure Queue based scaling. - * + * * @param azureQueue the azureQueue value to set. * @return the ScaleRule object itself. */ @@ -86,7 +90,7 @@ public ScaleRule withAzureQueue(QueueScaleRule azureQueue) { /** * Get the custom property: Custom scale rule. - * + * * @return the custom value. */ public CustomScaleRule custom() { @@ -95,7 +99,7 @@ public CustomScaleRule custom() { /** * Set the custom property: Custom scale rule. - * + * * @param custom the custom value to set. * @return the ScaleRule object itself. */ @@ -106,7 +110,7 @@ public ScaleRule withCustom(CustomScaleRule custom) { /** * Get the http property: HTTP requests based scaling. - * + * * @return the http value. */ public HttpScaleRule http() { @@ -115,7 +119,7 @@ public HttpScaleRule http() { /** * Set the http property: HTTP requests based scaling. - * + * * @param http the http value to set. * @return the ScaleRule object itself. */ @@ -126,7 +130,7 @@ public ScaleRule withHttp(HttpScaleRule http) { /** * Get the tcp property: Tcp requests based scaling. - * + * * @return the tcp value. */ public TcpScaleRule tcp() { @@ -135,7 +139,7 @@ public TcpScaleRule tcp() { /** * Set the tcp property: Tcp requests based scaling. - * + * * @param tcp the tcp value to set. * @return the ScaleRule object itself. */ @@ -146,7 +150,7 @@ public ScaleRule withTcp(TcpScaleRule tcp) { /** * 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/ScaleRuleAuth.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRuleAuth.java index 08b69ad41a06..d957279f9c95 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRuleAuth.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRuleAuth.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Auth Secrets for Scale Rule. */ +/** + * Auth Secrets for Scale Rule. + */ @Fluent public final class ScaleRuleAuth { /* @@ -22,13 +24,15 @@ public final class ScaleRuleAuth { @JsonProperty(value = "triggerParameter") private String triggerParameter; - /** Creates an instance of ScaleRuleAuth class. */ + /** + * Creates an instance of ScaleRuleAuth class. + */ public ScaleRuleAuth() { } /** * Get the secretRef property: Name of the secret from which to pull the auth params. - * + * * @return the secretRef value. */ public String secretRef() { @@ -37,7 +41,7 @@ public String secretRef() { /** * Set the secretRef property: Name of the secret from which to pull the auth params. - * + * * @param secretRef the secretRef value to set. * @return the ScaleRuleAuth object itself. */ @@ -48,7 +52,7 @@ public ScaleRuleAuth withSecretRef(String secretRef) { /** * Get the triggerParameter property: Trigger Parameter that uses the secret. - * + * * @return the triggerParameter value. */ public String triggerParameter() { @@ -57,7 +61,7 @@ public String triggerParameter() { /** * Set the triggerParameter property: Trigger Parameter that uses the secret. - * + * * @param triggerParameter the triggerParameter value to set. * @return the ScaleRuleAuth object itself. */ @@ -68,7 +72,7 @@ public ScaleRuleAuth withTriggerParameter(String triggerParameter) { /** * 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/Scheme.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scheme.java index 5ea43b744e22..84f4c144aa00 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scheme.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scheme.java @@ -8,17 +8,23 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Scheme to use for connecting to the host. Defaults to HTTP. */ +/** + * Scheme to use for connecting to the host. Defaults to HTTP. + */ public final class Scheme extends ExpandableStringEnum { - /** Static value HTTP for Scheme. */ + /** + * Static value HTTP for Scheme. + */ public static final Scheme HTTP = fromString("HTTP"); - /** Static value HTTPS for Scheme. */ + /** + * Static value HTTPS for Scheme. + */ public static final Scheme HTTPS = fromString("HTTPS"); /** * Creates a new instance of Scheme value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -27,7 +33,7 @@ public Scheme() { /** * Creates or finds a Scheme from its string representation. - * + * * @param name a name to look for. * @return the corresponding Scheme. */ @@ -38,7 +44,7 @@ public static Scheme fromString(String name) { /** * Gets known Scheme values. - * + * * @return known Scheme values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Secret.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Secret.java index 219d53c773e9..984042a638af 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Secret.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Secret.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Secret definition. */ +/** + * Secret definition. + */ @Fluent public final class Secret { /* @@ -35,13 +37,15 @@ public final class Secret { @JsonProperty(value = "keyVaultUrl") private String keyVaultUrl; - /** Creates an instance of Secret class. */ + /** + * Creates an instance of Secret class. + */ public Secret() { } /** * Get the name property: Secret Name. - * + * * @return the name value. */ public String name() { @@ -50,7 +54,7 @@ public String name() { /** * Set the name property: Secret Name. - * + * * @param name the name value to set. * @return the Secret object itself. */ @@ -61,7 +65,7 @@ public Secret withName(String name) { /** * Get the value property: Secret Value. - * + * * @return the value value. */ public String value() { @@ -70,7 +74,7 @@ public String value() { /** * Set the value property: Secret Value. - * + * * @param value the value value to set. * @return the Secret object itself. */ @@ -82,7 +86,7 @@ public Secret withValue(String value) { /** * Get the identity property: Resource ID of a managed identity to authenticate with Azure Key Vault, or System to * use a system-assigned identity. - * + * * @return the identity value. */ public String identity() { @@ -92,7 +96,7 @@ public String identity() { /** * Set the identity property: Resource ID of a managed identity to authenticate with Azure Key Vault, or System to * use a system-assigned identity. - * + * * @param identity the identity value to set. * @return the Secret object itself. */ @@ -103,7 +107,7 @@ public Secret withIdentity(String identity) { /** * Get the keyVaultUrl property: Azure Key Vault URL pointing to the secret referenced by the container app. - * + * * @return the keyVaultUrl value. */ public String keyVaultUrl() { @@ -112,7 +116,7 @@ public String keyVaultUrl() { /** * Set the keyVaultUrl property: Azure Key Vault URL pointing to the secret referenced by the container app. - * + * * @param keyVaultUrl the keyVaultUrl value to set. * @return the Secret object itself. */ @@ -123,7 +127,7 @@ public Secret withKeyVaultUrl(String keyVaultUrl) { /** * 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/SecretVolumeItem.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SecretVolumeItem.java index 9d4e2ddaa5a2..55d91e2015a8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SecretVolumeItem.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SecretVolumeItem.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Secret to be added to volume. */ +/** + * Secret to be added to volume. + */ @Fluent public final class SecretVolumeItem { /* @@ -22,13 +24,15 @@ public final class SecretVolumeItem { @JsonProperty(value = "path") private String path; - /** Creates an instance of SecretVolumeItem class. */ + /** + * Creates an instance of SecretVolumeItem class. + */ public SecretVolumeItem() { } /** * Get the secretRef property: Name of the Container App secret from which to pull the secret value. - * + * * @return the secretRef value. */ public String secretRef() { @@ -37,7 +41,7 @@ public String secretRef() { /** * Set the secretRef property: Name of the Container App secret from which to pull the secret value. - * + * * @param secretRef the secretRef value to set. * @return the SecretVolumeItem object itself. */ @@ -49,7 +53,7 @@ public SecretVolumeItem withSecretRef(String secretRef) { /** * Get the path property: Path to project secret to. If no path is provided, path defaults to name of secret listed * in secretRef. - * + * * @return the path value. */ public String path() { @@ -59,7 +63,7 @@ public String path() { /** * Set the path property: Path to project secret to. If no path is provided, path defaults to name of secret listed * in secretRef. - * + * * @param path the path value to set. * @return the SecretVolumeItem object itself. */ @@ -70,7 +74,7 @@ public SecretVolumeItem withPath(String path) { /** * 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/SecretsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SecretsCollection.java index cb2a5d815cb4..a7c46963e8e3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SecretsCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SecretsCollection.java @@ -7,18 +7,20 @@ import com.azure.resourcemanager.appcontainers.fluent.models.SecretsCollectionInner; import java.util.List; -/** An immutable client-side representation of SecretsCollection. */ +/** + * An immutable client-side representation of SecretsCollection. + */ public interface SecretsCollection { /** * Gets the value property: Collection of resources. - * + * * @return the value value. */ List value(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.SecretsCollectionInner object. - * + * * @return the inner object. */ SecretsCollectionInner innerModel(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Service.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Service.java index 5673a1e1ce38..af26a69c5fe2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Service.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Service.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Container App to be a dev service. */ +/** + * Container App to be a dev service. + */ @Fluent public final class Service { /* @@ -17,13 +19,15 @@ public final class Service { @JsonProperty(value = "type", required = true) private String type; - /** Creates an instance of Service class. */ + /** + * Creates an instance of Service class. + */ public Service() { } /** * Get the type property: Dev ContainerApp service type. - * + * * @return the type value. */ public String type() { @@ -32,7 +36,7 @@ public String type() { /** * Set the type property: Dev ContainerApp service type. - * + * * @param type the type value to set. * @return the Service object itself. */ @@ -43,7 +47,7 @@ public Service withType(String type) { /** * 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/ServiceBind.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ServiceBind.java index 85afd1e257ec..f78914381442 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ServiceBind.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ServiceBind.java @@ -5,9 +5,13 @@ package com.azure.resourcemanager.appcontainers.models; import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; -/** Configuration to bind a ContainerApp to a dev ContainerApp Service. */ +/** + * Configuration to bind a ContainerApp to a dev ContainerApp Service. + */ @Fluent public final class ServiceBind { /* @@ -22,13 +26,28 @@ public final class ServiceBind { @JsonProperty(value = "name") private String name; - /** Creates an instance of ServiceBind class. */ + /* + * Type of the client to be used to connect to the service + */ + @JsonProperty(value = "clientType") + private String clientType; + + /* + * Customized keys for customizing injected values to the app + */ + @JsonProperty(value = "customizedKeys") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map customizedKeys; + + /** + * Creates an instance of ServiceBind class. + */ public ServiceBind() { } /** * Get the serviceId property: Resource id of the target service. - * + * * @return the serviceId value. */ public String serviceId() { @@ -37,7 +56,7 @@ public String serviceId() { /** * Set the serviceId property: Resource id of the target service. - * + * * @param serviceId the serviceId value to set. * @return the ServiceBind object itself. */ @@ -48,7 +67,7 @@ public ServiceBind withServiceId(String serviceId) { /** * Get the name property: Name of the service bind. - * + * * @return the name value. */ public String name() { @@ -57,7 +76,7 @@ public String name() { /** * Set the name property: Name of the service bind. - * + * * @param name the name value to set. * @return the ServiceBind object itself. */ @@ -66,9 +85,49 @@ public ServiceBind withName(String name) { return this; } + /** + * Get the clientType property: Type of the client to be used to connect to the service. + * + * @return the clientType value. + */ + public String clientType() { + return this.clientType; + } + + /** + * Set the clientType property: Type of the client to be used to connect to the service. + * + * @param clientType the clientType value to set. + * @return the ServiceBind object itself. + */ + public ServiceBind withClientType(String clientType) { + this.clientType = clientType; + return this; + } + + /** + * Get the customizedKeys property: Customized keys for customizing injected values to the app. + * + * @return the customizedKeys value. + */ + public Map customizedKeys() { + return this.customizedKeys; + } + + /** + * Set the customizedKeys property: Customized keys for customizing injected values to the app. + * + * @param customizedKeys the customizedKeys value to set. + * @return the ServiceBind object itself. + */ + public ServiceBind withCustomizedKeys(Map customizedKeys) { + this.customizedKeys = customizedKeys; + return this; + } + /** * Validates the instance. - * + * * @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/SourceControl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControl.java index e1e9cf9f4935..14349f87c7ce 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControl.java @@ -4,91 +4,110 @@ package com.azure.resourcemanager.appcontainers.models; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.SourceControlInner; -/** An immutable client-side representation of SourceControl. */ +/** + * An immutable client-side representation of SourceControl. + */ public interface SourceControl { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the operationState property: Current provisioning State of the operation. - * + * * @return the operationState value. */ SourceControlOperationState operationState(); /** * Gets the repoUrl property: The repo url which will be integrated to ContainerApp. - * + * * @return the repoUrl value. */ String repoUrl(); /** * Gets the branch property: The branch which will trigger the auto deployment. - * + * * @return the branch value. */ String branch(); /** * Gets the githubActionConfiguration property: Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated as they were at the creation time. - * + * defaults if user did not provide them. The defaults are populated + * as they were at the creation time. + * * @return the githubActionConfiguration value. */ GithubActionConfiguration githubActionConfiguration(); /** * Gets the name of the resource group. - * + * * @return the name of the resource group. */ String resourceGroupName(); /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.SourceControlInner object. - * + * * @return the inner object. */ SourceControlInner innerModel(); - /** The entirety of the SourceControl definition. */ + /** + * The entirety of the SourceControl definition. + */ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { } - /** The SourceControl definition stages. */ + /** + * The SourceControl definition stages. + */ interface DefinitionStages { - /** The first stage of the SourceControl definition. */ + /** + * The first stage of the SourceControl definition. + */ interface Blank extends WithParentResource { } - /** The stage of the SourceControl definition allowing to specify parent resource. */ + /** + * The stage of the SourceControl definition allowing to specify parent resource. + */ interface WithParentResource { /** * Specifies resourceGroupName, containerAppName. - * + * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @return the next definition stage. @@ -100,57 +119,63 @@ interface WithParentResource { * The stage of the SourceControl definition which contains all the minimum required properties for the resource * to be created, but also allows for any other optional properties to be specified. */ - interface WithCreate - extends DefinitionStages.WithRepoUrl, - DefinitionStages.WithBranch, - DefinitionStages.WithGithubActionConfiguration { + interface WithCreate extends DefinitionStages.WithRepoUrl, DefinitionStages.WithBranch, + DefinitionStages.WithGithubActionConfiguration { /** * Executes the create request. - * + * * @return the created resource. */ SourceControl create(); /** * Executes the create request. - * + * * @param context The context to associate with this operation. * @return the created resource. */ SourceControl create(Context context); } - /** The stage of the SourceControl definition allowing to specify repoUrl. */ + /** + * The stage of the SourceControl definition allowing to specify repoUrl. + */ interface WithRepoUrl { /** * Specifies the repoUrl property: The repo url which will be integrated to ContainerApp.. - * + * * @param repoUrl The repo url which will be integrated to ContainerApp. * @return the next definition stage. */ WithCreate withRepoUrl(String repoUrl); } - /** The stage of the SourceControl definition allowing to specify branch. */ + /** + * The stage of the SourceControl definition allowing to specify branch. + */ interface WithBranch { /** * Specifies the branch property: The branch which will trigger the auto deployment. - * + * * @param branch The branch which will trigger the auto deployment. * @return the next definition stage. */ WithCreate withBranch(String branch); } - /** The stage of the SourceControl definition allowing to specify githubActionConfiguration. */ + /** + * The stage of the SourceControl definition allowing to specify githubActionConfiguration. + */ interface WithGithubActionConfiguration { /** * Specifies the githubActionConfiguration property: Container App Revision Template with all possible - * settings and the defaults if user did not provide them. The defaults are populated as they were at the - * creation time. - * + * settings and the + * defaults if user did not provide them. The defaults are populated + * as they were at the creation time. + * * @param githubActionConfiguration Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated as they were at the creation time. + * defaults if user did not provide them. The defaults are populated + * as they were at the creation time. * @return the next definition stage. */ WithCreate withGithubActionConfiguration(GithubActionConfiguration githubActionConfiguration); @@ -159,63 +184,75 @@ interface WithGithubActionConfiguration { /** * Begins update for the SourceControl resource. - * + * * @return the stage of resource update. */ SourceControl.Update update(); - /** The template for SourceControl update. */ + /** + * The template for SourceControl update. + */ interface Update extends UpdateStages.WithRepoUrl, UpdateStages.WithBranch, UpdateStages.WithGithubActionConfiguration { /** * Executes the update request. - * + * * @return the updated resource. */ SourceControl apply(); /** * Executes the update request. - * + * * @param context The context to associate with this operation. * @return the updated resource. */ SourceControl apply(Context context); } - /** The SourceControl update stages. */ + /** + * The SourceControl update stages. + */ interface UpdateStages { - /** The stage of the SourceControl update allowing to specify repoUrl. */ + /** + * The stage of the SourceControl update allowing to specify repoUrl. + */ interface WithRepoUrl { /** * Specifies the repoUrl property: The repo url which will be integrated to ContainerApp.. - * + * * @param repoUrl The repo url which will be integrated to ContainerApp. * @return the next definition stage. */ Update withRepoUrl(String repoUrl); } - /** The stage of the SourceControl update allowing to specify branch. */ + /** + * The stage of the SourceControl update allowing to specify branch. + */ interface WithBranch { /** * Specifies the branch property: The branch which will trigger the auto deployment. - * + * * @param branch The branch which will trigger the auto deployment. * @return the next definition stage. */ Update withBranch(String branch); } - /** The stage of the SourceControl update allowing to specify githubActionConfiguration. */ + /** + * The stage of the SourceControl update allowing to specify githubActionConfiguration. + */ interface WithGithubActionConfiguration { /** * Specifies the githubActionConfiguration property: Container App Revision Template with all possible - * settings and the defaults if user did not provide them. The defaults are populated as they were at the - * creation time. - * + * settings and the + * defaults if user did not provide them. The defaults are populated + * as they were at the creation time. + * * @param githubActionConfiguration Container App Revision Template with all possible settings and the - * defaults if user did not provide them. The defaults are populated as they were at the creation time. + * defaults if user did not provide them. The defaults are populated + * as they were at the creation time. * @return the next definition stage. */ Update withGithubActionConfiguration(GithubActionConfiguration githubActionConfiguration); @@ -224,14 +261,14 @@ interface WithGithubActionConfiguration { /** * Refreshes the resource to sync with Azure. - * + * * @return the refreshed resource. */ SourceControl refresh(); /** * Refreshes the resource to sync with Azure. - * + * * @param context The context to associate with this operation. * @return the refreshed resource. */ diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlCollection.java index ba48d5e1579d..652bfc58a835 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlCollection.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** SourceControl collection ARM resource. */ +/** + * SourceControl collection ARM resource. + */ @Fluent public final class SourceControlCollection { /* @@ -25,13 +27,15 @@ public final class SourceControlCollection { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of SourceControlCollection class. */ + /** + * Creates an instance of SourceControlCollection class. + */ public SourceControlCollection() { } /** * Get the value property: Collection of resources. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: Collection of resources. - * + * * @param value the value value to set. * @return the SourceControlCollection object itself. */ @@ -51,7 +55,7 @@ public SourceControlCollection withValue(List value) { /** * Get the nextLink property: Link to next page of resources. - * + * * @return the nextLink value. */ public String nextLink() { @@ -60,14 +64,13 @@ public String nextLink() { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (value() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property value in model SourceControlCollection")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property value in model SourceControlCollection")); } else { value().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlOperationState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlOperationState.java index 5c1f3d14d013..ce792cdf36ab 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlOperationState.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlOperationState.java @@ -8,23 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Current provisioning State of the operation. */ +/** + * Current provisioning State of the operation. + */ public final class SourceControlOperationState extends ExpandableStringEnum { - /** Static value InProgress for SourceControlOperationState. */ + /** + * Static value InProgress for SourceControlOperationState. + */ public static final SourceControlOperationState IN_PROGRESS = fromString("InProgress"); - /** Static value Succeeded for SourceControlOperationState. */ + /** + * Static value Succeeded for SourceControlOperationState. + */ public static final SourceControlOperationState SUCCEEDED = fromString("Succeeded"); - /** Static value Failed for SourceControlOperationState. */ + /** + * Static value Failed for SourceControlOperationState. + */ public static final SourceControlOperationState FAILED = fromString("Failed"); - /** Static value Canceled for SourceControlOperationState. */ + /** + * Static value Canceled for SourceControlOperationState. + */ public static final SourceControlOperationState CANCELED = fromString("Canceled"); /** * Creates a new instance of SourceControlOperationState value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -33,7 +43,7 @@ public SourceControlOperationState() { /** * Creates or finds a SourceControlOperationState from its string representation. - * + * * @param name a name to look for. * @return the corresponding SourceControlOperationState. */ @@ -44,7 +54,7 @@ public static SourceControlOperationState fromString(String name) { /** * Gets known SourceControlOperationState values. - * + * * @return known SourceControlOperationState values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/StorageType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/StorageType.java index e62d9cffc489..07da6d736766 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/StorageType.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/StorageType.java @@ -8,20 +8,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Storage type for the volume. If not provided, use EmptyDir. */ +/** + * Storage type for the volume. If not provided, use EmptyDir. + */ public final class StorageType extends ExpandableStringEnum { - /** Static value AzureFile for StorageType. */ + /** + * Static value AzureFile for StorageType. + */ public static final StorageType AZURE_FILE = fromString("AzureFile"); - /** Static value EmptyDir for StorageType. */ + /** + * Static value EmptyDir for StorageType. + */ public static final StorageType EMPTY_DIR = fromString("EmptyDir"); - /** Static value Secret for StorageType. */ + /** + * Static value Secret for StorageType. + */ public static final StorageType SECRET = fromString("Secret"); + /** + * Static value NfsAzureFile for StorageType. + */ + public static final StorageType NFS_AZURE_FILE = fromString("NfsAzureFile"); + /** * Creates a new instance of StorageType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +43,7 @@ public StorageType() { /** * Creates or finds a StorageType from its string representation. - * + * * @param name a name to look for. * @return the corresponding StorageType. */ @@ -41,7 +54,7 @@ public static StorageType fromString(String name) { /** * Gets known StorageType values. - * + * * @return known StorageType values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpConnectionPool.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpConnectionPool.java new file mode 100644 index 000000000000..041eb1c8dde5 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpConnectionPool.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Defines parameters for tcp connection pooling. + */ +@Fluent +public final class TcpConnectionPool { + /* + * Maximum number of tcp connections allowed + */ + @JsonProperty(value = "maxConnections") + private Integer maxConnections; + + /** + * Creates an instance of TcpConnectionPool class. + */ + public TcpConnectionPool() { + } + + /** + * Get the maxConnections property: Maximum number of tcp connections allowed. + * + * @return the maxConnections value. + */ + public Integer maxConnections() { + return this.maxConnections; + } + + /** + * Set the maxConnections property: Maximum number of tcp connections allowed. + * + * @param maxConnections the maxConnections value to set. + * @return the TcpConnectionPool object itself. + */ + public TcpConnectionPool withMaxConnections(Integer maxConnections) { + this.maxConnections = maxConnections; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpRetryPolicy.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpRetryPolicy.java new file mode 100644 index 000000000000..885dd643742c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpRetryPolicy.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Policy that defines tcp request retry conditions. + */ +@Fluent +public final class TcpRetryPolicy { + /* + * Maximum number of attempts to connect to the tcp service + */ + @JsonProperty(value = "maxConnectAttempts") + private Integer maxConnectAttempts; + + /** + * Creates an instance of TcpRetryPolicy class. + */ + public TcpRetryPolicy() { + } + + /** + * Get the maxConnectAttempts property: Maximum number of attempts to connect to the tcp service. + * + * @return the maxConnectAttempts value. + */ + public Integer maxConnectAttempts() { + return this.maxConnectAttempts; + } + + /** + * Set the maxConnectAttempts property: Maximum number of attempts to connect to the tcp service. + * + * @param maxConnectAttempts the maxConnectAttempts value to set. + * @return the TcpRetryPolicy object itself. + */ + public TcpRetryPolicy withMaxConnectAttempts(Integer maxConnectAttempts) { + this.maxConnectAttempts = maxConnectAttempts; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpScaleRule.java index f297d3d3bf85..d8b26124d95c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpScaleRule.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpScaleRule.java @@ -10,7 +10,9 @@ import java.util.List; import java.util.Map; -/** Container App container Tcp scaling rule. */ +/** + * Container App container Tcp scaling rule. + */ @Fluent public final class TcpScaleRule { /* @@ -26,13 +28,15 @@ public final class TcpScaleRule { @JsonProperty(value = "auth") private List auth; - /** Creates an instance of TcpScaleRule class. */ + /** + * Creates an instance of TcpScaleRule class. + */ public TcpScaleRule() { } /** * Get the metadata property: Metadata properties to describe tcp scale rule. - * + * * @return the metadata value. */ public Map metadata() { @@ -41,7 +45,7 @@ public Map metadata() { /** * Set the metadata property: Metadata properties to describe tcp scale rule. - * + * * @param metadata the metadata value to set. * @return the TcpScaleRule object itself. */ @@ -52,7 +56,7 @@ public TcpScaleRule withMetadata(Map metadata) { /** * Get the auth property: Authentication secrets for the tcp scale rule. - * + * * @return the auth value. */ public List auth() { @@ -61,7 +65,7 @@ public List auth() { /** * Set the auth property: Authentication secrets for the tcp scale rule. - * + * * @param auth the auth value to set. * @return the TcpScaleRule object itself. */ @@ -72,7 +76,7 @@ public TcpScaleRule withAuth(List auth) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java index a2ac12509918..a5b91a04bc38 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java @@ -9,8 +9,9 @@ import java.util.List; /** - * Container App versioned application definition. Defines the desired state of an immutable revision. Any changes to - * this section Will result in a new revision being created. + * Container App versioned application definition. + * Defines the desired state of an immutable revision. + * Any changes to this section Will result in a new revision being created. */ @Fluent public final class Template { @@ -59,13 +60,15 @@ public final class Template { @JsonProperty(value = "serviceBinds") private List serviceBinds; - /** Creates an instance of Template class. */ + /** + * Creates an instance of Template class. + */ public Template() { } /** * Get the revisionSuffix property: User friendly suffix that is appended to the revision name. - * + * * @return the revisionSuffix value. */ public String revisionSuffix() { @@ -74,7 +77,7 @@ public String revisionSuffix() { /** * Set the revisionSuffix property: User friendly suffix that is appended to the revision name. - * + * * @param revisionSuffix the revisionSuffix value to set. * @return the Template object itself. */ @@ -88,7 +91,7 @@ public Template withRevisionSuffix(String revisionSuffix) { * terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill * signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. Set * this value longer than the expected cleanup time for your process. Defaults to 30 seconds. - * + * * @return the terminationGracePeriodSeconds value. */ public Long terminationGracePeriodSeconds() { @@ -100,7 +103,7 @@ public Long terminationGracePeriodSeconds() { * terminate gracefully. Value must be non-negative integer. The value zero indicates stop immediately via the kill * signal (no opportunity to shut down). If this value is nil, the default grace period will be used instead. Set * this value longer than the expected cleanup time for your process. Defaults to 30 seconds. - * + * * @param terminationGracePeriodSeconds the terminationGracePeriodSeconds value to set. * @return the Template object itself. */ @@ -111,7 +114,7 @@ public Template withTerminationGracePeriodSeconds(Long terminationGracePeriodSec /** * Get the initContainers property: List of specialized containers that run before app containers. - * + * * @return the initContainers value. */ public List initContainers() { @@ -120,7 +123,7 @@ public List initContainers() { /** * Set the initContainers property: List of specialized containers that run before app containers. - * + * * @param initContainers the initContainers value to set. * @return the Template object itself. */ @@ -131,7 +134,7 @@ public Template withInitContainers(List initContainers) { /** * Get the containers property: List of container definitions for the Container App. - * + * * @return the containers value. */ public List containers() { @@ -140,7 +143,7 @@ public List containers() { /** * Set the containers property: List of container definitions for the Container App. - * + * * @param containers the containers value to set. * @return the Template object itself. */ @@ -151,7 +154,7 @@ public Template withContainers(List containers) { /** * Get the scale property: Scaling properties for the Container App. - * + * * @return the scale value. */ public Scale scale() { @@ -160,7 +163,7 @@ public Scale scale() { /** * Set the scale property: Scaling properties for the Container App. - * + * * @param scale the scale value to set. * @return the Template object itself. */ @@ -171,7 +174,7 @@ public Template withScale(Scale scale) { /** * Get the volumes property: List of volume definitions for the Container App. - * + * * @return the volumes value. */ public List volumes() { @@ -180,7 +183,7 @@ public List volumes() { /** * Set the volumes property: List of volume definitions for the Container App. - * + * * @param volumes the volumes value to set. * @return the Template object itself. */ @@ -191,7 +194,7 @@ public Template withVolumes(List volumes) { /** * Get the serviceBinds property: List of container app services bound to the app. - * + * * @return the serviceBinds value. */ public List serviceBinds() { @@ -200,7 +203,7 @@ public List serviceBinds() { /** * Set the serviceBinds property: List of container app services bound to the app. - * + * * @param serviceBinds the serviceBinds value to set. * @return the Template object itself. */ @@ -211,7 +214,7 @@ public Template withServiceBinds(List serviceBinds) { /** * 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/TimeoutPolicy.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TimeoutPolicy.java new file mode 100644 index 000000000000..1b529b5b065c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TimeoutPolicy.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Policy to set request timeouts. + */ +@Fluent +public final class TimeoutPolicy { + /* + * Timeout, in seconds, for a request to respond + */ + @JsonProperty(value = "responseTimeoutInSeconds") + private Integer responseTimeoutInSeconds; + + /* + * Timeout, in seconds, for a request to initiate a connection + */ + @JsonProperty(value = "connectionTimeoutInSeconds") + private Integer connectionTimeoutInSeconds; + + /** + * Creates an instance of TimeoutPolicy class. + */ + public TimeoutPolicy() { + } + + /** + * Get the responseTimeoutInSeconds property: Timeout, in seconds, for a request to respond. + * + * @return the responseTimeoutInSeconds value. + */ + public Integer responseTimeoutInSeconds() { + return this.responseTimeoutInSeconds; + } + + /** + * Set the responseTimeoutInSeconds property: Timeout, in seconds, for a request to respond. + * + * @param responseTimeoutInSeconds the responseTimeoutInSeconds value to set. + * @return the TimeoutPolicy object itself. + */ + public TimeoutPolicy withResponseTimeoutInSeconds(Integer responseTimeoutInSeconds) { + this.responseTimeoutInSeconds = responseTimeoutInSeconds; + return this; + } + + /** + * Get the connectionTimeoutInSeconds property: Timeout, in seconds, for a request to initiate a connection. + * + * @return the connectionTimeoutInSeconds value. + */ + public Integer connectionTimeoutInSeconds() { + return this.connectionTimeoutInSeconds; + } + + /** + * Set the connectionTimeoutInSeconds property: Timeout, in seconds, for a request to initiate a connection. + * + * @param connectionTimeoutInSeconds the connectionTimeoutInSeconds value to set. + * @return the TimeoutPolicy object itself. + */ + public TimeoutPolicy withConnectionTimeoutInSeconds(Integer connectionTimeoutInSeconds) { + this.connectionTimeoutInSeconds = connectionTimeoutInSeconds; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TokenStore.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TokenStore.java new file mode 100644 index 000000000000..3214e366a176 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TokenStore.java @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The configuration settings of the token store. + */ +@Fluent +public final class TokenStore { + /* + * true to durably store platform-specific security tokens that are obtained during login flows; + * otherwise, false. + * The default is false. + */ + @JsonProperty(value = "enabled") + private Boolean enabled; + + /* + * The number of hours after session token expiration that a session token can be used to + * call the token refresh API. The default is 72 hours. + */ + @JsonProperty(value = "tokenRefreshExtensionHours") + private Double tokenRefreshExtensionHours; + + /* + * The configuration settings of the storage of the tokens if blob storage is used. + */ + @JsonProperty(value = "azureBlobStorage") + private BlobStorageTokenStore azureBlobStorage; + + /** + * Creates an instance of TokenStore class. + */ + public TokenStore() { + } + + /** + * Get the enabled property: <code>true</code> to durably store platform-specific security tokens that + * are obtained during login flows; otherwise, <code>false</code>. + * The default is <code>false</code>. + * + * @return the enabled value. + */ + public Boolean enabled() { + return this.enabled; + } + + /** + * Set the enabled property: <code>true</code> to durably store platform-specific security tokens that + * are obtained during login flows; otherwise, <code>false</code>. + * The default is <code>false</code>. + * + * @param enabled the enabled value to set. + * @return the TokenStore object itself. + */ + public TokenStore withEnabled(Boolean enabled) { + this.enabled = enabled; + return this; + } + + /** + * Get the tokenRefreshExtensionHours property: The number of hours after session token expiration that a session + * token can be used to + * call the token refresh API. The default is 72 hours. + * + * @return the tokenRefreshExtensionHours value. + */ + public Double tokenRefreshExtensionHours() { + return this.tokenRefreshExtensionHours; + } + + /** + * Set the tokenRefreshExtensionHours property: The number of hours after session token expiration that a session + * token can be used to + * call the token refresh API. The default is 72 hours. + * + * @param tokenRefreshExtensionHours the tokenRefreshExtensionHours value to set. + * @return the TokenStore object itself. + */ + public TokenStore withTokenRefreshExtensionHours(Double tokenRefreshExtensionHours) { + this.tokenRefreshExtensionHours = tokenRefreshExtensionHours; + return this; + } + + /** + * Get the azureBlobStorage property: The configuration settings of the storage of the tokens if blob storage is + * used. + * + * @return the azureBlobStorage value. + */ + public BlobStorageTokenStore azureBlobStorage() { + return this.azureBlobStorage; + } + + /** + * Set the azureBlobStorage property: The configuration settings of the storage of the tokens if blob storage is + * used. + * + * @param azureBlobStorage the azureBlobStorage value to set. + * @return the TokenStore object itself. + */ + public TokenStore withAzureBlobStorage(BlobStorageTokenStore azureBlobStorage) { + this.azureBlobStorage = azureBlobStorage; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (azureBlobStorage() != null) { + azureBlobStorage().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TracesConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TracesConfiguration.java new file mode 100644 index 000000000000..e84da4bc067f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TracesConfiguration.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Configuration of Open Telemetry traces. + */ +@Fluent +public final class TracesConfiguration { + /* + * Open telemetry traces destinations + */ + @JsonProperty(value = "destinations") + private List destinations; + + /** + * Creates an instance of TracesConfiguration class. + */ + public TracesConfiguration() { + } + + /** + * Get the destinations property: Open telemetry traces destinations. + * + * @return the destinations value. + */ + public List destinations() { + return this.destinations; + } + + /** + * Set the destinations property: Open telemetry traces destinations. + * + * @param destinations the destinations value to set. + * @return the TracesConfiguration object itself. + */ + public TracesConfiguration withDestinations(List destinations) { + this.destinations = destinations; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TrafficWeight.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TrafficWeight.java index bf509ea5c3ce..06240037edf0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TrafficWeight.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TrafficWeight.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Traffic weight assigned to a revision. */ +/** + * Traffic weight assigned to a revision. + */ @Fluent public final class TrafficWeight { /* @@ -34,13 +36,15 @@ public final class TrafficWeight { @JsonProperty(value = "label") private String label; - /** Creates an instance of TrafficWeight class. */ + /** + * Creates an instance of TrafficWeight class. + */ public TrafficWeight() { } /** * Get the revisionName property: Name of a revision. - * + * * @return the revisionName value. */ public String revisionName() { @@ -49,7 +53,7 @@ public String revisionName() { /** * Set the revisionName property: Name of a revision. - * + * * @param revisionName the revisionName value to set. * @return the TrafficWeight object itself. */ @@ -60,7 +64,7 @@ public TrafficWeight withRevisionName(String revisionName) { /** * Get the weight property: Traffic weight assigned to a revision. - * + * * @return the weight value. */ public Integer weight() { @@ -69,7 +73,7 @@ public Integer weight() { /** * Set the weight property: Traffic weight assigned to a revision. - * + * * @param weight the weight value to set. * @return the TrafficWeight object itself. */ @@ -80,7 +84,7 @@ public TrafficWeight withWeight(Integer weight) { /** * Get the latestRevision property: Indicates that the traffic weight belongs to a latest stable revision. - * + * * @return the latestRevision value. */ public Boolean latestRevision() { @@ -89,7 +93,7 @@ public Boolean latestRevision() { /** * Set the latestRevision property: Indicates that the traffic weight belongs to a latest stable revision. - * + * * @param latestRevision the latestRevision value to set. * @return the TrafficWeight object itself. */ @@ -100,7 +104,7 @@ public TrafficWeight withLatestRevision(Boolean latestRevision) { /** * Get the label property: Associates a traffic label with a revision. - * + * * @return the label value. */ public String label() { @@ -109,7 +113,7 @@ public String label() { /** * Set the label property: Associates a traffic label with a revision. - * + * * @param label the label value to set. * @return the TrafficWeight object itself. */ @@ -120,7 +124,7 @@ public TrafficWeight withLabel(String label) { /** * 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/TriggerType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TriggerType.java index 9bffe6ca49be..c30ffffb4ae9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TriggerType.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TriggerType.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Trigger type of the job. */ +/** + * Trigger type of the job. + */ public final class TriggerType extends ExpandableStringEnum { - /** Static value Schedule for TriggerType. */ + /** + * Static value Schedule for TriggerType. + */ public static final TriggerType SCHEDULE = fromString("Schedule"); - /** Static value Event for TriggerType. */ + /** + * Static value Event for TriggerType. + */ public static final TriggerType EVENT = fromString("Event"); - /** Static value Manual for TriggerType. */ + /** + * Static value Manual for TriggerType. + */ public static final TriggerType MANUAL = fromString("Manual"); /** * Creates a new instance of TriggerType value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public TriggerType() { /** * Creates or finds a TriggerType from its string representation. - * + * * @param name a name to look for. * @return the corresponding TriggerType. */ @@ -41,7 +49,7 @@ public static TriggerType fromString(String name) { /** * Gets known TriggerType values. - * + * * @return known TriggerType values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Twitter.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Twitter.java index 2cd7a0a5a635..a23d0f0b96ff 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Twitter.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Twitter.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The configuration settings of the Twitter provider. */ +/** + * The configuration settings of the Twitter provider. + */ @Fluent public final class Twitter { /* @@ -23,14 +25,16 @@ public final class Twitter { @JsonProperty(value = "registration") private TwitterRegistration registration; - /** Creates an instance of Twitter class. */ + /** + * Creates an instance of Twitter class. + */ public Twitter() { } /** * Get the enabled property: <code>false</code> if the Twitter provider should not be enabled despite * the set registration; otherwise, <code>true</code>. - * + * * @return the enabled value. */ public Boolean enabled() { @@ -40,7 +44,7 @@ public Boolean enabled() { /** * Set the enabled property: <code>false</code> if the Twitter provider should not be enabled despite * the set registration; otherwise, <code>true</code>. - * + * * @param enabled the enabled value to set. * @return the Twitter object itself. */ @@ -51,7 +55,7 @@ public Twitter withEnabled(Boolean enabled) { /** * Get the registration property: The configuration settings of the app registration for the Twitter provider. - * + * * @return the registration value. */ public TwitterRegistration registration() { @@ -60,7 +64,7 @@ public TwitterRegistration registration() { /** * Set the registration property: The configuration settings of the app registration for the Twitter provider. - * + * * @param registration the registration value to set. * @return the Twitter object itself. */ @@ -71,7 +75,7 @@ public Twitter withRegistration(TwitterRegistration registration) { /** * 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/TwitterRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TwitterRegistration.java index 26f1599daa13..293488655d99 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TwitterRegistration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TwitterRegistration.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** The configuration settings of the app registration for the Twitter provider. */ +/** + * The configuration settings of the app registration for the Twitter provider. + */ @Fluent public final class TwitterRegistration { /* @@ -25,15 +27,17 @@ public final class TwitterRegistration { @JsonProperty(value = "consumerSecretSettingName") private String consumerSecretSettingName; - /** Creates an instance of TwitterRegistration class. */ + /** + * Creates an instance of TwitterRegistration class. + */ public TwitterRegistration() { } /** - * Get the consumerKey property: The OAuth 1.0a consumer key of the Twitter application used for sign-in. This - * setting is required for enabling Twitter Sign-In. Twitter Sign-In documentation: - * https://dev.twitter.com/web/sign-in. - * + * Get the consumerKey property: The OAuth 1.0a consumer key of the Twitter application used for sign-in. + * This setting is required for enabling Twitter Sign-In. + * Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in. + * * @return the consumerKey value. */ public String consumerKey() { @@ -41,10 +45,10 @@ public String consumerKey() { } /** - * Set the consumerKey property: The OAuth 1.0a consumer key of the Twitter application used for sign-in. This - * setting is required for enabling Twitter Sign-In. Twitter Sign-In documentation: - * https://dev.twitter.com/web/sign-in. - * + * Set the consumerKey property: The OAuth 1.0a consumer key of the Twitter application used for sign-in. + * This setting is required for enabling Twitter Sign-In. + * Twitter Sign-In documentation: https://dev.twitter.com/web/sign-in. + * * @param consumerKey the consumerKey value to set. * @return the TwitterRegistration object itself. */ @@ -55,8 +59,9 @@ public TwitterRegistration withConsumerKey(String consumerKey) { /** * Get the consumerSecretSettingName property: The app setting name that contains the OAuth 1.0a consumer secret of - * the Twitter application used for sign-in. - * + * the Twitter + * application used for sign-in. + * * @return the consumerSecretSettingName value. */ public String consumerSecretSettingName() { @@ -65,8 +70,9 @@ public String consumerSecretSettingName() { /** * Set the consumerSecretSettingName property: The app setting name that contains the OAuth 1.0a consumer secret of - * the Twitter application used for sign-in. - * + * the Twitter + * application used for sign-in. + * * @param consumerSecretSettingName the consumerSecretSettingName value to set. * @return the TwitterRegistration object itself. */ @@ -77,7 +83,7 @@ public TwitterRegistration withConsumerSecretSettingName(String consumerSecretSe /** * 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/Type.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Type.java index d7c75a6a0542..82941e75731d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Type.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Type.java @@ -8,20 +8,28 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** The type of probe. */ +/** + * The type of probe. + */ public final class Type extends ExpandableStringEnum { - /** Static value Liveness for Type. */ + /** + * Static value Liveness for Type. + */ public static final Type LIVENESS = fromString("Liveness"); - /** Static value Readiness for Type. */ + /** + * Static value Readiness for Type. + */ public static final Type READINESS = fromString("Readiness"); - /** Static value Startup for Type. */ + /** + * Static value Startup for Type. + */ public static final Type STARTUP = fromString("Startup"); /** * Creates a new instance of Type value. - * + * * @deprecated Use the {@link #fromString(String)} factory method. */ @Deprecated @@ -30,7 +38,7 @@ public Type() { /** * Creates or finds a Type from its string representation. - * + * * @param name a name to look for. * @return the corresponding Type. */ @@ -41,7 +49,7 @@ public static Type fromString(String name) { /** * Gets known Type values. - * + * * @return known Type values. */ public static Collection values() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UnauthenticatedClientActionV2.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UnauthenticatedClientActionV2.java index 0cc5de4ca521..549054393533 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UnauthenticatedClientActionV2.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UnauthenticatedClientActionV2.java @@ -7,21 +7,33 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** The action to take when an unauthenticated client attempts to access the app. */ +/** + * The action to take when an unauthenticated client attempts to access the app. + */ public enum UnauthenticatedClientActionV2 { - /** Enum value RedirectToLoginPage. */ + /** + * Enum value RedirectToLoginPage. + */ REDIRECT_TO_LOGIN_PAGE("RedirectToLoginPage"), - /** Enum value AllowAnonymous. */ + /** + * Enum value AllowAnonymous. + */ ALLOW_ANONYMOUS("AllowAnonymous"), - /** Enum value Return401. */ + /** + * Enum value Return401. + */ RETURN401("Return401"), - /** Enum value Return403. */ + /** + * Enum value Return403. + */ RETURN403("Return403"); - /** The actual serialized value for a UnauthenticatedClientActionV2 instance. */ + /** + * The actual serialized value for a UnauthenticatedClientActionV2 instance. + */ private final String value; UnauthenticatedClientActionV2(String value) { @@ -30,7 +42,7 @@ public enum UnauthenticatedClientActionV2 { /** * Parses a serialized value to a UnauthenticatedClientActionV2 instance. - * + * * @param value the serialized value to parse. * @return the parsed UnauthenticatedClientActionV2 object, or null if unable to parse. */ @@ -48,7 +60,9 @@ public static UnauthenticatedClientActionV2 fromString(String value) { return null; } - /** {@inheritDoc} */ + /** + * {@inheritDoc} + */ @JsonValue @Override public String toString() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Usage.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Usage.java new file mode 100644 index 000000000000..a47794e3061b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Usage.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.resourcemanager.appcontainers.fluent.models.UsageInner; + +/** + * An immutable client-side representation of Usage. + */ +public interface Usage { + /** + * Gets the unit property: An enum describing the unit of usage measurement. + * + * @return the unit value. + */ + String unit(); + + /** + * Gets the currentValue property: The current usage of the resource. + * + * @return the currentValue value. + */ + float currentValue(); + + /** + * Gets the limit property: The maximum permitted usage of the resource. + * + * @return the limit value. + */ + float limit(); + + /** + * Gets the name property: The name of the type of usage. + * + * @return the name value. + */ + UsageName name(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.UsageInner object. + * + * @return the inner object. + */ + UsageInner innerModel(); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UsageName.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UsageName.java new file mode 100644 index 000000000000..aab56b1c68b0 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UsageName.java @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Usage Names. + */ +@Fluent +public final class UsageName { + /* + * The name of the resource. + */ + @JsonProperty(value = "value") + private String value; + + /* + * The localized name of the resource. + */ + @JsonProperty(value = "localizedValue") + private String localizedValue; + + /** + * Creates an instance of UsageName class. + */ + public UsageName() { + } + + /** + * Get the value property: The name of the resource. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: The name of the resource. + * + * @param value the value value to set. + * @return the UsageName object itself. + */ + public UsageName withValue(String value) { + this.value = value; + return this; + } + + /** + * Get the localizedValue property: The localized name of the resource. + * + * @return the localizedValue value. + */ + public String localizedValue() { + return this.localizedValue; + } + + /** + * Set the localizedValue property: The localized name of the resource. + * + * @param localizedValue the localizedValue value to set. + * @return the UsageName object itself. + */ + public UsageName withLocalizedValue(String localizedValue) { + this.localizedValue = localizedValue; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Usages.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Usages.java new file mode 100644 index 000000000000..8121f34a3248 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Usages.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** + * Resource collection API of Usages. + */ +public interface Usages { + /** + * Gets, for the specified location, the current resource usage information as well as the limits under the + * subscription. + * + * @param location The location for which resource usage is queried. + * @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 paginated response with {@link PagedIterable}. + */ + PagedIterable list(String location); + + /** + * Gets, for the specified location, the current resource usage information as well as the limits under the + * subscription. + * + * @param location The location for which resource usage is queried. + * @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 paginated response with {@link PagedIterable}. + */ + PagedIterable list(String location, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UserAssignedIdentity.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UserAssignedIdentity.java index 5d590ce71821..0ab010bee657 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UserAssignedIdentity.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UserAssignedIdentity.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.UUID; -/** User assigned identity properties. */ +/** + * User assigned identity properties. + */ @Immutable public final class UserAssignedIdentity { /* @@ -23,13 +25,15 @@ public final class UserAssignedIdentity { @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) private UUID clientId; - /** Creates an instance of UserAssignedIdentity class. */ + /** + * Creates an instance of UserAssignedIdentity class. + */ public UserAssignedIdentity() { } /** * Get the principalId property: The principal ID of the assigned identity. - * + * * @return the principalId value. */ public UUID principalId() { @@ -38,7 +42,7 @@ public UUID principalId() { /** * Get the clientId property: The client ID of the assigned identity. - * + * * @return the clientId value. */ public UUID clientId() { @@ -47,7 +51,7 @@ public UUID clientId() { /** * 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/VnetConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VnetConfiguration.java index 9ab43cd34439..acc516dd8093 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VnetConfiguration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VnetConfiguration.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Configuration properties for apps environment to join a Virtual Network. */ +/** + * Configuration properties for apps environment to join a Virtual Network. + */ @Fluent public final class VnetConfiguration { /* @@ -44,7 +46,9 @@ public final class VnetConfiguration { @JsonProperty(value = "platformReservedDnsIP") private String platformReservedDnsIp; - /** Creates an instance of VnetConfiguration class. */ + /** + * Creates an instance of VnetConfiguration class. + */ public VnetConfiguration() { } @@ -52,7 +56,7 @@ public VnetConfiguration() { * Get the internal property: Boolean indicating the environment only has an internal load balancer. These * environments do not have a public static IP resource. They must provide infrastructureSubnetId if enabling this * property. - * + * * @return the internal value. */ public Boolean internal() { @@ -63,7 +67,7 @@ public Boolean internal() { * Set the internal property: Boolean indicating the environment only has an internal load balancer. These * environments do not have a public static IP resource. They must provide infrastructureSubnetId if enabling this * property. - * + * * @param internal the internal value to set. * @return the VnetConfiguration object itself. */ @@ -75,7 +79,7 @@ public VnetConfiguration withInternal(Boolean internal) { /** * Get the infrastructureSubnetId property: Resource ID of a subnet for infrastructure components. Must not overlap * with any other provided IP ranges. - * + * * @return the infrastructureSubnetId value. */ public String infrastructureSubnetId() { @@ -85,7 +89,7 @@ public String infrastructureSubnetId() { /** * Set the infrastructureSubnetId property: Resource ID of a subnet for infrastructure components. Must not overlap * with any other provided IP ranges. - * + * * @param infrastructureSubnetId the infrastructureSubnetId value to set. * @return the VnetConfiguration object itself. */ @@ -97,7 +101,7 @@ public VnetConfiguration withInfrastructureSubnetId(String infrastructureSubnetI /** * Get the dockerBridgeCidr property: CIDR notation IP range assigned to the Docker bridge, network. Must not * overlap with any other provided IP ranges. - * + * * @return the dockerBridgeCidr value. */ public String dockerBridgeCidr() { @@ -107,7 +111,7 @@ public String dockerBridgeCidr() { /** * Set the dockerBridgeCidr property: CIDR notation IP range assigned to the Docker bridge, network. Must not * overlap with any other provided IP ranges. - * + * * @param dockerBridgeCidr the dockerBridgeCidr value to set. * @return the VnetConfiguration object itself. */ @@ -119,7 +123,7 @@ public VnetConfiguration withDockerBridgeCidr(String dockerBridgeCidr) { /** * Get the platformReservedCidr property: IP range in CIDR notation that can be reserved for environment * infrastructure IP addresses. Must not overlap with any other provided IP ranges. - * + * * @return the platformReservedCidr value. */ public String platformReservedCidr() { @@ -129,7 +133,7 @@ public String platformReservedCidr() { /** * Set the platformReservedCidr property: IP range in CIDR notation that can be reserved for environment * infrastructure IP addresses. Must not overlap with any other provided IP ranges. - * + * * @param platformReservedCidr the platformReservedCidr value to set. * @return the VnetConfiguration object itself. */ @@ -139,9 +143,9 @@ public VnetConfiguration withPlatformReservedCidr(String platformReservedCidr) { } /** - * Get the platformReservedDnsIp property: An IP address from the IP range defined by platformReservedCidr that will - * be reserved for the internal DNS server. - * + * Get the platformReservedDnsIp property: An IP address from the IP range defined by platformReservedCidr that + * will be reserved for the internal DNS server. + * * @return the platformReservedDnsIp value. */ public String platformReservedDnsIp() { @@ -149,9 +153,9 @@ public String platformReservedDnsIp() { } /** - * Set the platformReservedDnsIp property: An IP address from the IP range defined by platformReservedCidr that will - * be reserved for the internal DNS server. - * + * Set the platformReservedDnsIp property: An IP address from the IP range defined by platformReservedCidr that + * will be reserved for the internal DNS server. + * * @param platformReservedDnsIp the platformReservedDnsIp value to set. * @return the VnetConfiguration object itself. */ @@ -162,7 +166,7 @@ public VnetConfiguration withPlatformReservedDnsIp(String platformReservedDnsIp) /** * 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/Volume.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Volume.java index c14298b76ec7..5f0f95c517a1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Volume.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Volume.java @@ -8,7 +8,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Volume definitions for the Container App. */ +/** + * Volume definitions for the Container App. + */ @Fluent public final class Volume { /* @@ -37,18 +39,21 @@ public final class Volume { private List secrets; /* - * Mount options used while mounting the AzureFile. Must be a comma-separated string. + * Mount options used while mounting the Azure file share or NFS Azure file share. Must be a comma-separated + * string. */ @JsonProperty(value = "mountOptions") private String mountOptions; - /** Creates an instance of Volume class. */ + /** + * Creates an instance of Volume class. + */ public Volume() { } /** * Get the name property: Volume name. - * + * * @return the name value. */ public String name() { @@ -57,7 +62,7 @@ public String name() { /** * Set the name property: Volume name. - * + * * @param name the name value to set. * @return the Volume object itself. */ @@ -68,7 +73,7 @@ public Volume withName(String name) { /** * Get the storageType property: Storage type for the volume. If not provided, use EmptyDir. - * + * * @return the storageType value. */ public StorageType storageType() { @@ -77,7 +82,7 @@ public StorageType storageType() { /** * Set the storageType property: Storage type for the volume. If not provided, use EmptyDir. - * + * * @param storageType the storageType value to set. * @return the Volume object itself. */ @@ -88,7 +93,7 @@ public Volume withStorageType(StorageType storageType) { /** * Get the storageName property: Name of storage resource. No need to provide for EmptyDir and Secret. - * + * * @return the storageName value. */ public String storageName() { @@ -97,7 +102,7 @@ public String storageName() { /** * Set the storageName property: Name of storage resource. No need to provide for EmptyDir and Secret. - * + * * @param storageName the storageName value to set. * @return the Volume object itself. */ @@ -109,7 +114,7 @@ public Volume withStorageName(String storageName) { /** * Get the secrets property: List of secrets to be added in volume. If no secrets are provided, all secrets in * collection will be added to volume. - * + * * @return the secrets value. */ public List secrets() { @@ -119,7 +124,7 @@ public List secrets() { /** * Set the secrets property: List of secrets to be added in volume. If no secrets are provided, all secrets in * collection will be added to volume. - * + * * @param secrets the secrets value to set. * @return the Volume object itself. */ @@ -129,8 +134,9 @@ public Volume withSecrets(List secrets) { } /** - * Get the mountOptions property: Mount options used while mounting the AzureFile. Must be a comma-separated string. - * + * Get the mountOptions property: Mount options used while mounting the Azure file share or NFS Azure file share. + * Must be a comma-separated string. + * * @return the mountOptions value. */ public String mountOptions() { @@ -138,8 +144,9 @@ public String mountOptions() { } /** - * Set the mountOptions property: Mount options used while mounting the AzureFile. Must be a comma-separated string. - * + * Set the mountOptions property: Mount options used while mounting the Azure file share or NFS Azure file share. + * Must be a comma-separated string. + * * @param mountOptions the mountOptions value to set. * @return the Volume object itself. */ @@ -150,7 +157,7 @@ public Volume withMountOptions(String mountOptions) { /** * 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/VolumeMount.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VolumeMount.java index ad15f4101e73..8e5dd84d45d8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VolumeMount.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/VolumeMount.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Volume mount for the Container App. */ +/** + * Volume mount for the Container App. + */ @Fluent public final class VolumeMount { /* @@ -28,13 +30,15 @@ public final class VolumeMount { @JsonProperty(value = "subPath") private String subPath; - /** Creates an instance of VolumeMount class. */ + /** + * Creates an instance of VolumeMount class. + */ public VolumeMount() { } /** * Get the volumeName property: This must match the Name of a Volume. - * + * * @return the volumeName value. */ public String volumeName() { @@ -43,7 +47,7 @@ public String volumeName() { /** * Set the volumeName property: This must match the Name of a Volume. - * + * * @param volumeName the volumeName value to set. * @return the VolumeMount object itself. */ @@ -53,8 +57,9 @@ public VolumeMount withVolumeName(String volumeName) { } /** - * Get the mountPath property: Path within the container at which the volume should be mounted.Must not contain ':'. - * + * Get the mountPath property: Path within the container at which the volume should be mounted.Must not contain + * ':'. + * * @return the mountPath value. */ public String mountPath() { @@ -62,8 +67,9 @@ public String mountPath() { } /** - * Set the mountPath property: Path within the container at which the volume should be mounted.Must not contain ':'. - * + * Set the mountPath property: Path within the container at which the volume should be mounted.Must not contain + * ':'. + * * @param mountPath the mountPath value to set. * @return the VolumeMount object itself. */ @@ -73,9 +79,9 @@ public VolumeMount withMountPath(String mountPath) { } /** - * Get the subPath property: Path within the volume from which the container's volume should be mounted. Defaults to - * "" (volume's root). - * + * Get the subPath property: Path within the volume from which the container's volume should be mounted. Defaults + * to "" (volume's root). + * * @return the subPath value. */ public String subPath() { @@ -83,9 +89,9 @@ public String subPath() { } /** - * Set the subPath property: Path within the volume from which the container's volume should be mounted. Defaults to - * "" (volume's root). - * + * Set the subPath property: Path within the volume from which the container's volume should be mounted. Defaults + * to "" (volume's root). + * * @param subPath the subPath value to set. * @return the VolumeMount object itself. */ @@ -96,7 +102,7 @@ public VolumeMount withSubPath(String subPath) { /** * 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/WorkloadProfile.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfile.java index 045be9814561..066d2ac72069 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfile.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfile.java @@ -8,7 +8,9 @@ import com.azure.core.util.logging.ClientLogger; import com.fasterxml.jackson.annotation.JsonProperty; -/** Workload profile to scope container app execution. */ +/** + * Workload profile to scope container app execution. + */ @Fluent public final class WorkloadProfile { /* @@ -35,13 +37,15 @@ public final class WorkloadProfile { @JsonProperty(value = "maximumCount") private Integer maximumCount; - /** Creates an instance of WorkloadProfile class. */ + /** + * Creates an instance of WorkloadProfile class. + */ public WorkloadProfile() { } /** * Get the name property: Workload profile type for the workloads to run on. - * + * * @return the name value. */ public String name() { @@ -50,7 +54,7 @@ public String name() { /** * Set the name property: Workload profile type for the workloads to run on. - * + * * @param name the name value to set. * @return the WorkloadProfile object itself. */ @@ -61,7 +65,7 @@ public WorkloadProfile withName(String name) { /** * Get the workloadProfileType property: Workload profile type for the workloads to run on. - * + * * @return the workloadProfileType value. */ public String workloadProfileType() { @@ -70,7 +74,7 @@ public String workloadProfileType() { /** * Set the workloadProfileType property: Workload profile type for the workloads to run on. - * + * * @param workloadProfileType the workloadProfileType value to set. * @return the WorkloadProfile object itself. */ @@ -81,7 +85,7 @@ public WorkloadProfile withWorkloadProfileType(String workloadProfileType) { /** * Get the minimumCount property: The minimum capacity. - * + * * @return the minimumCount value. */ public Integer minimumCount() { @@ -90,7 +94,7 @@ public Integer minimumCount() { /** * Set the minimumCount property: The minimum capacity. - * + * * @param minimumCount the minimumCount value to set. * @return the WorkloadProfile object itself. */ @@ -101,7 +105,7 @@ public WorkloadProfile withMinimumCount(Integer minimumCount) { /** * Get the maximumCount property: The maximum capacity. - * + * * @return the maximumCount value. */ public Integer maximumCount() { @@ -110,7 +114,7 @@ public Integer maximumCount() { /** * Set the maximumCount property: The maximum capacity. - * + * * @param maximumCount the maximumCount value to set. * @return the WorkloadProfile object itself. */ @@ -121,20 +125,17 @@ public WorkloadProfile withMaximumCount(Integer maximumCount) { /** * Validates the instance. - * + * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { if (name() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException("Missing required property name in model WorkloadProfile")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property name in model WorkloadProfile")); } if (workloadProfileType() == null) { - throw LOGGER - .logExceptionAsError( - new IllegalArgumentException( - "Missing required property workloadProfileType in model WorkloadProfile")); + throw LOGGER.logExceptionAsError( + new IllegalArgumentException("Missing required property workloadProfileType in model WorkloadProfile")); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStates.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStates.java index db01b9b5bb5a..68703405f012 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStates.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStates.java @@ -4,41 +4,51 @@ package com.azure.resourcemanager.appcontainers.models; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; -/** An immutable client-side representation of WorkloadProfileStates. */ +/** + * An immutable client-side representation of WorkloadProfileStates. + */ public interface WorkloadProfileStates { /** * Gets the id property: Fully qualified resource Id for the resource. - * + * * @return the id value. */ String id(); /** * Gets the name property: The name of the resource. - * + * * @return the name value. */ String name(); /** * Gets the type property: The type of the resource. - * + * * @return the type value. */ String type(); /** * Gets the properties property: Workload Profile resource specific properties. - * + * * @return the properties value. */ WorkloadProfileStatesProperties properties(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner object. - * + * * @return the inner object. */ WorkloadProfileStatesInner innerModel(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesCollection.java index b863517afddd..d8e70bc82c76 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesCollection.java @@ -10,7 +10,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Collection of workloadProfileStates. */ +/** + * Collection of workloadProfileStates. + */ @Fluent public final class WorkloadProfileStatesCollection { /* @@ -25,13 +27,15 @@ public final class WorkloadProfileStatesCollection { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; - /** Creates an instance of WorkloadProfileStatesCollection class. */ + /** + * Creates an instance of WorkloadProfileStatesCollection class. + */ public WorkloadProfileStatesCollection() { } /** * Get the value property: Collection of resources. - * + * * @return the value value. */ public List value() { @@ -40,7 +44,7 @@ public List value() { /** * Set the value property: Collection of resources. - * + * * @param value the value value to set. * @return the WorkloadProfileStatesCollection object itself. */ @@ -51,7 +55,7 @@ public WorkloadProfileStatesCollection withValue(List e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesProperties.java index f38519788088..1c4937e687ff 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesProperties.java @@ -7,7 +7,9 @@ import com.azure.core.annotation.Fluent; import com.fasterxml.jackson.annotation.JsonProperty; -/** Workload Profile resource specific properties. */ +/** + * Workload Profile resource specific properties. + */ @Fluent public final class WorkloadProfileStatesProperties { /* @@ -28,13 +30,15 @@ public final class WorkloadProfileStatesProperties { @JsonProperty(value = "currentCount") private Integer currentCount; - /** Creates an instance of WorkloadProfileStatesProperties class. */ + /** + * Creates an instance of WorkloadProfileStatesProperties class. + */ public WorkloadProfileStatesProperties() { } /** * Get the minimumCount property: Minimum count of instances. - * + * * @return the minimumCount value. */ public Integer minimumCount() { @@ -43,7 +47,7 @@ public Integer minimumCount() { /** * Set the minimumCount property: Minimum count of instances. - * + * * @param minimumCount the minimumCount value to set. * @return the WorkloadProfileStatesProperties object itself. */ @@ -54,7 +58,7 @@ public WorkloadProfileStatesProperties withMinimumCount(Integer minimumCount) { /** * Get the maximumCount property: Maximum count of nodes. - * + * * @return the maximumCount value. */ public Integer maximumCount() { @@ -63,7 +67,7 @@ public Integer maximumCount() { /** * Set the maximumCount property: Maximum count of nodes. - * + * * @param maximumCount the maximumCount value to set. * @return the WorkloadProfileStatesProperties object itself. */ @@ -74,7 +78,7 @@ public WorkloadProfileStatesProperties withMaximumCount(Integer maximumCount) { /** * Get the currentCount property: Current count of nodes. - * + * * @return the currentCount value. */ public Integer currentCount() { @@ -83,7 +87,7 @@ public Integer currentCount() { /** * Set the currentCount property: Current count of nodes. - * + * * @param currentCount the currentCount value to set. * @return the WorkloadProfileStatesProperties object itself. */ @@ -94,7 +98,7 @@ public WorkloadProfileStatesProperties withCurrentCount(Integer currentCount) { /** * 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/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/package-info.java index 8fa357d7560c..c0b9d82b3bd0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/package-info.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/package-info.java @@ -2,5 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the data models for ContainerAppsApiClient. null. */ +/** + * Package containing the data models for ContainerAppsApiClient. + * Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the + * function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions + * extension resource. + */ package com.azure.resourcemanager.appcontainers.models; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/package-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/package-info.java index ed78d2648843..5e8cbf3c1591 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/package-info.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/package-info.java @@ -2,5 +2,10 @@ // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. -/** Package containing the classes for ContainerAppsApiClient. null. */ +/** + * Package containing the classes for ContainerAppsApiClient. + * Functions is an extension resource to revisions and the api listed is used to proxy the call from Web RP to the + * function app's host process, this api is not exposed to users and only Web RP is allowed to invoke functions + * extension resource. + */ package com.azure.resourcemanager.appcontainers; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/module-info.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/module-info.java index 465278559546..e63ceaf542d1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/module-info.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/module-info.java @@ -4,16 +4,10 @@ module com.azure.resourcemanager.appcontainers { requires transitive com.azure.core.management; - exports com.azure.resourcemanager.appcontainers; exports com.azure.resourcemanager.appcontainers.fluent; exports com.azure.resourcemanager.appcontainers.fluent.models; exports com.azure.resourcemanager.appcontainers.models; - - opens com.azure.resourcemanager.appcontainers.fluent.models to - com.azure.core, - com.fasterxml.jackson.databind; - opens com.azure.resourcemanager.appcontainers.models to - com.azure.core, - com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.appcontainers.fluent.models to com.azure.core, com.fasterxml.jackson.databind; + opens com.azure.resourcemanager.appcontainers.models to com.azure.core, com.fasterxml.jackson.databind; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/proxy-config.json b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/proxy-config.json new file mode 100644 index 000000000000..492da04c92fd --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/proxy-config.json @@ -0,0 +1 @@ +[ [ "com.azure.resourcemanager.appcontainers.implementation.AppResilienciesClientImpl$AppResilienciesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsAuthConfigsClientImpl$ContainerAppsAuthConfigsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.AvailableWorkloadProfilesClientImpl$AvailableWorkloadProfilesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BillingMetersClientImpl$BillingMetersService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BuildersClientImpl$BuildersService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BuildsByBuilderResourcesClientImpl$BuildsByBuilderResourcesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BuildsClientImpl$BuildsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.BuildAuthTokensClientImpl$BuildAuthTokensService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsClientImpl$ConnectedEnvironmentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsCertificatesClientImpl$ConnectedEnvironmentsCertificatesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsDaprComponentsClientImpl$ConnectedEnvironmentsDaprComponentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsStoragesClientImpl$ConnectedEnvironmentsStoragesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsClientImpl$ContainerAppsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionsClientImpl$ContainerAppsRevisionsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsRevisionReplicasClientImpl$ContainerAppsRevisionReplicasService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsDiagnosticsClientImpl$ContainerAppsDiagnosticsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentDiagnosticsClientImpl$ManagedEnvironmentDiagnosticsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsDiagnosticsClientImpl$ManagedEnvironmentsDiagnosticsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.JobsClientImpl$JobsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.DotNetComponentsClientImpl$DotNetComponentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.OperationsClientImpl$OperationsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.JavaComponentsClientImpl$JavaComponentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.JobsExecutionsClientImpl$JobsExecutionsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ResourceProvidersClientImpl$ResourceProvidersService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsClientImpl$ManagedEnvironmentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.CertificatesClientImpl$CertificatesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedCertificatesClientImpl$ManagedCertificatesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.NamespacesClientImpl$NamespacesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.DaprComponentResiliencyPoliciesClientImpl$DaprComponentResiliencyPoliciesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.DaprComponentsClientImpl$DaprComponentsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.DaprSubscriptionsClientImpl$DaprSubscriptionsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentsStoragesClientImpl$ManagedEnvironmentsStoragesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ContainerAppsSourceControlsClientImpl$ContainerAppsSourceControlsService" ], [ "com.azure.resourcemanager.appcontainers.implementation.UsagesClientImpl$UsagesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentUsagesClientImpl$ManagedEnvironmentUsagesService" ], [ "com.azure.resourcemanager.appcontainers.implementation.FunctionsExtensionsClientImpl$FunctionsExtensionsService" ] ] \ No newline at end of file diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/reflect-config.json b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/reflect-config.json new file mode 100644 index 000000000000..423ea6c118a4 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/resources/META-INF/native-image/com.azure.resourcemanager/azure-resourcemanager-appcontainers/reflect-config.json @@ -0,0 +1,1501 @@ +[ { + "name" : "com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.AppResiliencyInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.AppResiliencyProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.TimeoutPolicy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.HttpRetryPolicy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.HttpRetryPolicyRetryBackOff", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.HttpRetryPolicyMatches", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.HeaderMatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.HeaderMatchMatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.TcpRetryPolicy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.CircuitBreakerPolicy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.HttpConnectionPool", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.TcpConnectionPool", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseError", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.AppResiliencyCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.AuthConfigCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.AuthPlatform", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.GlobalValidation", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.IdentityProviders", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.AzureActiveDirectory", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryRegistration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryLogin", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryValidation", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JwtClaimChecks", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DefaultAuthorizationPolicy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.AllowedPrincipals", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Facebook", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.AppRegistration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.LoginScopes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.GitHub", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ClientRegistration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Google", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.AllowedAudiencesValidation", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Twitter", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.TwitterRegistration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Apple", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.AppleRegistration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.AzureStaticWebApps", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.AzureStaticWebAppsRegistration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.CustomOpenIdConnectProvider", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.OpenIdConnectRegistration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.OpenIdConnectClientCredential", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.OpenIdConnectConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.OpenIdConnectLogin", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Login", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.LoginRoutes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.TokenStore", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.BlobStorageTokenStore", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.CookieExpiration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Nonce", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.HttpSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.HttpSettingsRoutes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ForwardProxy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.EncryptionSettings", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfilesCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.BillingMeter", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.BillingMeterProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.BuilderCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.BuilderProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ContainerRegistry", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.BuilderResourceUpdate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.BuilderResourceUpdateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.BuildCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.BuildResourceInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.BuildProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.BuildConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.EnvironmentVariable", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.PreBuildStep", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.HttpGet", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.BuildTokenInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ExtendedLocation", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.CertificateKeyVaultProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.CertificateCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.CertificateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.CertificatePatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DaprComponentsCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Secret", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DaprMetadata", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DaprServiceBindMetadata", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DaprSecret", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorageProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.AzureFileProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ContainerAppCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Configuration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Ingress", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.TrafficWeight", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.CustomDomain", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.IngressStickySessions", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.CorsPolicy", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.IngressPortMapping", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.RegistryCredentials", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Dapr", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Runtime", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.RuntimeJava", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.RuntimeDotnet", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Service", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Template", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.InitContainer", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.BaseContainer", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.EnvironmentVar", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ContainerResources", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.VolumeMount", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Container", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ContainerAppProbe", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Scale", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ScaleRule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.QueueScaleRule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ScaleRuleAuth", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.CustomScaleRule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.HttpScaleRule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.TcpScaleRule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Volume", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.SecretVolumeItem", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ServiceBind", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.SecretsCollectionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ContainerAppSecret", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppAuthTokenInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppAuthTokenProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.RevisionCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.RevisionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.ReplicaProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ReplicaContainer", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.ReplicaCollectionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DiagnosticRendering", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.VnetConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.LogAnalyticsConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.AppInsightsConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DestinationsConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DataDogConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.OtlpConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Header", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.TracesConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.LogsConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.MetricsConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.WorkloadProfile", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.KedaConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DaprConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Mtls", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.JobInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.JobProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JobConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JobConfigurationManualTriggerConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JobConfigurationScheduleTriggerConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JobConfigurationEventTriggerConfig", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JobScale", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JobScaleRule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JobTemplate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentsCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.DotNetComponentProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.AvailableOperations", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.OperationDisplay", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentsCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.JavaComponentProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JobsCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JobPatchProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JobPatchPropertiesProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JobExecutionContainer", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionBaseInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppJobExecutionsInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.JobSecretsCollectionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentsCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.ManagedCertificateInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ManagedCertificateProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ManagedCertificatePatch", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ManagedCertificateCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.EnvironmentAuthTokenInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.EnvironmentAuthTokenProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPoliciesCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentResiliencyPolicyProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DaprSubscriptionsCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.DaprSubscriptionProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStoragesCollectionInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentStorageInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorageProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.NfsAzureFileProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.SourceControlCollection", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.SourceControlInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.SourceControlProperties", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.RegistryInfo", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.AzureCredentials", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ListUsagesResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.fluent.models.UsageInner", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.UsageName", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Applicability", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.BuilderProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.BuildProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.BuildStatus", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReason", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.CertificateProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.CertificateType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.AccessMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ContainerAppProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ActiveRevisionsMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.IngressTransportMethod", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.BindingType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Action", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Affinity", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.IngressClientCertificateMode", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.IngressTargetPortHttpScheme", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.AppProtocol", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.LogLevel", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Scheme", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.Type", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.StorageType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.RevisionHealthState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.RevisionProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.RevisionRunningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ContainerAppReplicaRunningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ContainerAppContainerRunningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.EnvironmentProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JobProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.TriggerType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DotNetComponentProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentType", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JavaComponentProvisioningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.JobExecutionRunningState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ManagedCertificateDomainControlValidation", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.SourceControlOperationState", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.CookieExpirationConvention", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ForwardProxyConvention", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.DnsVerificationTestResult", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +}, { + "name" : "com.azure.resourcemanager.appcontainers.models.ClientCredentialMethod", + "allDeclaredConstructors" : true, + "allDeclaredFields" : true, + "allDeclaredMethods" : true +} ] \ No newline at end of file diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyCreateOrUpdateSamples.java new file mode 100644 index 000000000000..11732fdd87f2 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyCreateOrUpdateSamples.java @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.resourcemanager.appcontainers.models.CircuitBreakerPolicy; +import com.azure.resourcemanager.appcontainers.models.HeaderMatch; +import com.azure.resourcemanager.appcontainers.models.HttpConnectionPool; +import com.azure.resourcemanager.appcontainers.models.HttpRetryPolicy; +import com.azure.resourcemanager.appcontainers.models.TcpConnectionPool; +import com.azure.resourcemanager.appcontainers.models.TcpRetryPolicy; +import com.azure.resourcemanager.appcontainers.models.TimeoutPolicy; +import java.util.Arrays; + +/** + * Samples for AppResiliency CreateOrUpdate. + */ +public final class AppResiliencyCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_CreateOrUpdate + * .json + */ + /** + * Sample code: Create or Update App Resiliency. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + createOrUpdateAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.appResiliencies().define("resiliency-policy-1").withExistingContainerApp("rg", "testcontainerApp0") + .withTimeoutPolicy(new TimeoutPolicy().withResponseTimeoutInSeconds(15).withConnectionTimeoutInSeconds(5)) + .withHttpRetryPolicy(new HttpRetryPolicy().withMaxRetries(5).withInitialDelayInMilliseconds(1000L) + .withMaxIntervalInMilliseconds(10000L) + .withHeaders( + Arrays.asList(new HeaderMatch().withHeaderProperty("X-Content-Type").withPrefixMatch("GOATS"))) + .withHttpStatusCodes(Arrays.asList(502, 503)).withErrors( + Arrays.asList("5xx", "connect-failure", "reset", "retriable-headers", "retriable-status-codes"))) + .withTcpRetryPolicy(new TcpRetryPolicy().withMaxConnectAttempts(3)) + .withCircuitBreakerPolicy(new CircuitBreakerPolicy().withConsecutiveErrors(5).withIntervalInSeconds(10) + .withMaxEjectionPercent(50)) + .withHttpConnectionPool( + new HttpConnectionPool().withHttp1MaxPendingRequests(1024).withHttp2MaxRequests(1024)) + .withTcpConnectionPool(new TcpConnectionPool().withMaxConnections(100)).create(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyDeleteSamples.java new file mode 100644 index 000000000000..b1603ef98beb --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for AppResiliency Delete. + */ +public final class AppResiliencyDeleteSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_Delete.json + */ + /** + * Sample code: Delete App Resiliency. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void deleteAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.appResiliencies().deleteWithResponse("rg", "testcontainerApp0", "resiliency-policy-1", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyGetSamples.java new file mode 100644 index 000000000000..6bbf4d5fbb80 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for AppResiliency Get. + */ +public final class AppResiliencyGetSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_Get.json + */ + /** + * Sample code: Get App Resiliency. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.appResiliencies().getWithResponse("rg", "testcontainerApp0", "resiliency-policy-1", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyListSamples.java new file mode 100644 index 000000000000..3c54e4b22bb0 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for AppResiliency List. + */ +public final class AppResiliencyListSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_List.json + */ + /** + * Sample code: List App Resiliency. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.appResiliencies().list("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyUpdateSamples.java new file mode 100644 index 000000000000..44a49d80582b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AppResiliencyUpdateSamples.java @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.resourcemanager.appcontainers.models.AppResiliency; +import com.azure.resourcemanager.appcontainers.models.TimeoutPolicy; + +/** + * Samples for AppResiliency Update. + */ +public final class AppResiliencyUpdateSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AppResiliency_Patch.json + */ + /** + * Sample code: Update App Resiliency. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void updateAppResiliency(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + AppResiliency resource = manager.appResiliencies() + .getWithResponse("rg", "testcontainerApp0", "resiliency-policy-1", com.azure.core.util.Context.NONE) + .getValue(); + resource.update() + .withTimeoutPolicy(new TimeoutPolicy().withResponseTimeoutInSeconds(30).withConnectionTimeoutInSeconds(40)) + .apply(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.java index fc26f7c84d77..c36bfc958c02 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for AvailableWorkloadProfiles Get. */ +/** + * Samples for AvailableWorkloadProfiles Get. + */ public final class AvailableWorkloadProfilesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AvailableWorkloadProfiles_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * AvailableWorkloadProfiles_Get.json */ /** * Sample code: BillingMeters_Get. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void billingMetersGet(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { 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 2d96fe6be149..a16e5dc0011f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for BillingMeters Get. */ +/** + * Samples for BillingMeters Get. + */ public final class BillingMetersGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/BillingMeters_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/BillingMeters_Get.json */ /** * Sample code: BillingMeters_Get. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void billingMetersGet(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildAuthTokenListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildAuthTokenListSamples.java new file mode 100644 index 000000000000..bda7b21c35ae --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildAuthTokenListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for BuildAuthToken List. + */ +public final class BuildAuthTokenListSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_ListAuthToken.json + */ + /** + * Sample code: Get Build Auth Token. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getBuildAuthToken(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.buildAuthTokens().listWithResponse("rg", "testBuilder", "testBuild", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateSamples.java new file mode 100644 index 000000000000..b94a065b33cc --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersCreateOrUpdateSamples.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.resourcemanager.appcontainers.models.ContainerRegistry; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Builders CreateOrUpdate. + */ +public final class BuildersCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_CreateOrUpdate.json + */ + /** + * Sample code: Builders_CreateOrUpdate_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + buildersCreateOrUpdate0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builders().define("testBuilder").withRegion("eastus").withExistingResourceGroup("rg") + .withTags(mapOf("company", "Microsoft")) + .withIdentity(new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1", + new UserAssignedIdentity()))) + .withEnvironmentId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg/providers/Microsoft.App/managedEnvironments/testEnv") + .withContainerRegistries(Arrays.asList( + new ContainerRegistry().withContainerRegistryServer("test.azurecr.io").withIdentityResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"), + new ContainerRegistry().withContainerRegistryServer("test2.azurecr.io").withIdentityResourceId( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rg1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/identity1"))) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersDeleteSamples.java new file mode 100644 index 000000000000..cebc42f463e9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for Builders Delete. + */ +public final class BuildersDeleteSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_Delete.json + */ + /** + * Sample code: Builders_Delete_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildersDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builders().delete("rg", "testBuilder", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupSamples.java new file mode 100644 index 000000000000..155344fdce08 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersGetByResourceGroupSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for Builders GetByResourceGroup. + */ +public final class BuildersGetByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_Get.json + */ + /** + * Sample code: Builders_Get_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildersGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builders().getByResourceGroupWithResponse("rg", "testBuilder", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupSamples.java new file mode 100644 index 000000000000..0d1b5a048c25 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListByResourceGroupSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for Builders ListByResourceGroup. + */ +public final class BuildersListByResourceGroupSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_ListByResourceGroup + * .json + */ + /** + * Sample code: Builders_ListByResourceGroup_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + buildersListByResourceGroup0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builders().listByResourceGroup("rg", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListSamples.java new file mode 100644 index 000000000000..cb33157e5d10 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersListSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for Builders List. + */ +public final class BuildersListSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_ListBySubscription. + * json + */ + /** + * Sample code: Builders_ListBySubscription_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + buildersListBySubscription0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builders().list(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersUpdateSamples.java new file mode 100644 index 000000000000..434aa6d749a2 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildersUpdateSamples.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.resourcemanager.appcontainers.models.BuilderResource; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for Builders Update. + */ +public final class BuildersUpdateSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builders_Update.json + */ + /** + * Sample code: Builders_Update_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildersUpdate0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + BuilderResource resource = manager.builders() + .getByResourceGroupWithResponse("rg", "testBuilder", com.azure.core.util.Context.NONE).getValue(); + resource.update().withTags(mapOf("mytag1", "myvalue1")).apply(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsByBuilderResourceListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsByBuilderResourceListSamples.java new file mode 100644 index 000000000000..d910e0ef6a90 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsByBuilderResourceListSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for BuildsByBuilderResource List. + */ +public final class BuildsByBuilderResourceListSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_ListByBuilderResource + * .json + */ + /** + * Sample code: Builds_ListByBuilderResource_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + buildsListByBuilderResource0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.buildsByBuilderResources().list("rg", "testBuilder", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..dac35dfc5783 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsCreateOrUpdateSamples.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.resourcemanager.appcontainers.models.BuildConfiguration; +import com.azure.resourcemanager.appcontainers.models.ContainerRegistryWithCustomImage; +import com.azure.resourcemanager.appcontainers.models.EnvironmentVariable; +import com.azure.resourcemanager.appcontainers.models.HttpGet; +import com.azure.resourcemanager.appcontainers.models.PreBuildStep; +import java.util.Arrays; + +/** + * Samples for Builds CreateOrUpdate. + */ +public final class BuildsCreateOrUpdateSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_CreateOrUpdate.json + */ + /** + * Sample code: Builds_CreateOrUpdate_WithConfig. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + buildsCreateOrUpdateWithConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builds().define("testBuild-123456789az").withExistingBuilder("rg", "testBuilder") + .withDestinationContainerRegistry(new ContainerRegistryWithCustomImage().withServer("test.azurecr.io") + .withImage("test.azurecr.io/repo:tag")) + .withConfiguration( + new BuildConfiguration().withBaseOs("DebianBullseye").withPlatform("dotnetcore") + .withPlatformVersion("7.0") + .withEnvironmentVariables( + Arrays.asList(new EnvironmentVariable().withName("foo1").withValue("bar1"), + new EnvironmentVariable().withName("foo2").withValue("bar2"))) + .withPreBuildSteps(Arrays.asList( + new PreBuildStep().withDescription("First pre build step.") + .withScripts(Arrays.asList("echo 'hello'", "echo 'world'")) + .withHttpGet(new HttpGet().withUrl("https://microsoft.com").withFileName("output.txt") + .withHeaders(Arrays.asList("foo", "bar"))), + new PreBuildStep().withDescription("Second pre build step.") + .withScripts(Arrays.asList("echo 'hello'", "echo 'again'")) + .withHttpGet(new HttpGet().withUrl("https://microsoft.com").withFileName("output.txt") + .withHeaders(Arrays.asList("foo")))))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * Builds_CreateOrUpdate_NoConfig.json + */ + /** + * Sample code: Builds_CreateOrUpdate_NoConfig. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + buildsCreateOrUpdateNoConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builds().define("testBuild").withExistingBuilder("rg", "testBuilder").create(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsDeleteSamples.java new file mode 100644 index 000000000000..5cecebbd7498 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsDeleteSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for Builds Delete. + */ +public final class BuildsDeleteSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_Delete.json + */ + /** + * Sample code: Builds_Delete_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildsDelete0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builds().delete("rg", "testBuilder", "testBuild", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsGetSamples.java new file mode 100644 index 000000000000..a6e9edaa8f30 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BuildsGetSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for Builds Get. + */ +public final class BuildsGetSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Builds_Get.json + */ + /** + * Sample code: Builds_Get_0. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void buildsGet0(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.builds().getWithResponse("rg", "testBuilder", "testBuild", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java index 7d3ada534087..df24ceb3de0d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java @@ -5,32 +5,50 @@ package com.azure.resourcemanager.appcontainers.generated; import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; +import com.azure.resourcemanager.appcontainers.models.CertificateKeyVaultProperties; import com.azure.resourcemanager.appcontainers.models.CertificateProperties; +import com.azure.resourcemanager.appcontainers.models.CertificateType; -/** Samples for Certificates CreateOrUpdate. */ +/** + * Samples for Certificates CreateOrUpdate. + */ public final class CertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * Certificate_CreateOrUpdate_FromKeyVault.json */ /** - * Sample code: Create or Update Certificate. - * + * Sample code: Create or Update Certificate using Managed Identity. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateCertificate( + public static void createOrUpdateCertificateUsingManagedIdentity( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .certificates() - .createOrUpdateWithResponse( - "examplerg", - "testcontainerenv", - "certificate-firendly-name", - new CertificateInner() - .withLocation("East US") - .withProperties( - new CertificateProperties() - .withPassword("fakeTokenPlaceholder") - .withValue("Y2VydA==".getBytes())), - com.azure.core.util.Context.NONE); + manager.certificates().createOrUpdateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + new CertificateInner().withLocation("East US").withProperties(new CertificateProperties() + .withCertificateKeyVaultProperties(new CertificateKeyVaultProperties().withIdentity( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test-rg/providers/microsoft.managedidentity/userassignedidentities/test-user-mi") + .withKeyVaultUrl("fakeTokenPlaceholder")) + .withCertificateType(CertificateType.SERVER_SSLCERTIFICATE)), + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificate_CreateOrUpdate. + * json + */ + /** + * Sample code: Create or Update Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + createOrUpdateCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.certificates().createOrUpdateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + new CertificateInner().withLocation("East US") + .withProperties(new CertificateProperties().withPassword("fakeTokenPlaceholder") + .withValue("Y2VydA==".getBytes()).withCertificateType(CertificateType.IMAGE_PULL_TRUSTED_CA)), + com.azure.core.util.Context.NONE); } } 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 cc39bc23942e..9b640db24190 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for Certificates Delete. */ +/** + * Samples for Certificates Delete. + */ public final class CertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificate_Delete.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificate_Delete.json */ /** * Sample code: Delete Certificate. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .certificates() - .deleteWithResponse( - "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); + manager.certificates().deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE); } } 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 cd2c70dc99a4..cec4a1171d47 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for Certificates Get. */ +/** + * Samples for Certificates Get. + */ public final class CertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificate_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificate_Get.json */ /** * Sample code: Get Certificate. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .certificates() - .getWithResponse( - "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); + manager.certificates().getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE); } } 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 b22269ab3bdb..20193ded522d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java @@ -4,18 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for Certificates List. */ +/** + * Samples for Certificates List. + */ public final class CertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificates_ListByManagedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * Certificates_ListByManagedEnvironment.json */ /** * Sample code: List Certificates by Managed Environment. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listCertificatesByManagedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + listCertificatesByManagedEnvironment(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.certificates().list("examplerg", "testcontainerenv", com.azure.core.util.Context.NONE); } } 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 709fe08925a6..1a0d7ee405c9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java @@ -8,25 +8,23 @@ import java.util.HashMap; import java.util.Map; -/** Samples for Certificates Update. */ +/** + * Samples for Certificates Update. + */ public final class CertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificates_Patch.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Certificates_Patch.json */ /** * Sample code: Patch Certificate. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .certificates() - .updateWithResponse( - "examplerg", - "testcontainerenv", - "certificate-firendly-name", - new CertificatePatch().withTags(mapOf("tag1", "value1", "tag2", "value2")), - com.azure.core.util.Context.NONE); + manager.certificates().updateWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + new CertificatePatch().withTags(mapOf("tag1", "value1", "tag2", "value2")), + com.azure.core.util.Context.NONE); } // Use "Map.of" if available 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 34426b12ab87..407d75b5687d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java @@ -6,22 +6,22 @@ import com.azure.resourcemanager.appcontainers.models.CertificateProperties; -/** Samples for ConnectedEnvironmentsCertificates CreateOrUpdate. */ +/** + * Samples for ConnectedEnvironmentsCertificates CreateOrUpdate. + */ public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsCertificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateCertificate( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsCertificates() - .define("certificate-firendly-name") - .withRegion("East US") + public static void + createOrUpdateCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsCertificates().define("certificate-firendly-name").withRegion("East US") .withExistingConnectedEnvironment("examplerg", "testcontainerenv") .withProperties( new CertificateProperties().withPassword("fakeTokenPlaceholder").withValue("Y2VydA==".getBytes())) 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 d61ec9dbec42..b0ca09c05182 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ConnectedEnvironmentsCertificates Delete. */ +/** + * Samples for ConnectedEnvironmentsCertificates Delete. + */ public final class ConnectedEnvironmentsCertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsCertificate_Delete.json */ /** * Sample code: Delete Certificate. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsCertificates() - .deleteWithResponse( - "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsCertificates().deleteWithResponse("examplerg", "testcontainerenv", + "certificate-firendly-name", com.azure.core.util.Context.NONE); } } 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 e6631de95ac4..4cb0333bb32f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ConnectedEnvironmentsCertificates Get. */ +/** + * Samples for ConnectedEnvironmentsCertificates Get. + */ public final class ConnectedEnvironmentsCertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsCertificate_Get.json */ /** * Sample code: Get Certificate. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsCertificates() - .getWithResponse( - "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsCertificates().getWithResponse("examplerg", "testcontainerenv", + "certificate-firendly-name", com.azure.core.util.Context.NONE); } } 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 2c2a8fd6e499..f3a813215daa 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ConnectedEnvironmentsCertificates List. */ +/** + * Samples for ConnectedEnvironmentsCertificates List. + */ public final class ConnectedEnvironmentsCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json */ /** * Sample code: List Certificates by Connected Environment. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void listCertificatesByConnectedEnvironment( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsCertificates() - .list("examplerg", "testcontainerenv", com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsCertificates().list("examplerg", "testcontainerenv", + com.azure.core.util.Context.NONE); } } 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 2ad18da66708..2f5d69594ca6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.java @@ -8,23 +8,22 @@ import java.util.HashMap; import java.util.Map; -/** Samples for ConnectedEnvironmentsCertificates Update. */ +/** + * Samples for ConnectedEnvironmentsCertificates Update. + */ public final class ConnectedEnvironmentsCertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsCertificates_Patch.json */ /** * Sample code: Patch Certificate. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - Certificate resource = - manager - .connectedEnvironmentsCertificates() - .getWithResponse( - "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE) - .getValue(); + Certificate resource = manager.connectedEnvironmentsCertificates().getWithResponse("examplerg", + "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE).getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } 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 0d86087d5782..a91b3bce17d8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java @@ -6,26 +6,24 @@ import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -/** Samples for ConnectedEnvironments CheckNameAvailability. */ +/** + * Samples for ConnectedEnvironments CheckNameAvailability. + */ public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsCertificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void certificatesCheckNameAvailability( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironments() - .checkNameAvailabilityWithResponse( - "examplerg", - "testcontainerenv", - new CheckNameAvailabilityRequest() - .withName("testcertificatename") - .withType("Microsoft.App/connectedEnvironments/certificates"), + public static void + certificatesCheckNameAvailability(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironments() + .checkNameAvailabilityWithResponse("examplerg", "testcontainerenv", new CheckNameAvailabilityRequest() + .withName("testcertificatename").withType("Microsoft.App/connectedEnvironments/certificates"), com.azure.core.util.Context.NONE); } } 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 e6faa26d9ac2..d4ee034a23b7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java @@ -6,30 +6,26 @@ import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; -/** Samples for ConnectedEnvironments CreateOrUpdate. */ +/** + * Samples for ConnectedEnvironments CreateOrUpdate. + */ public final class ConnectedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create kube environments. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void createKubeEnvironments(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironments() - .define("testenv") - .withRegion("East US") - .withExistingResourceGroup("examplerg") + manager.connectedEnvironments().define("testenv").withRegion("East US").withExistingResourceGroup("examplerg") .withStaticIp("1.2.3.4") .withDaprAIConnectionString( "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") - .withCustomDomainConfiguration( - new CustomDomainConfiguration() - .withDnsSuffix("www.my-name.com") - .withCertificateValue("Y2VydA==".getBytes()) - .withCertificatePassword("fakeTokenPlaceholder")) + .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("www.my-name.com") + .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 0f41b4e6ae47..2d8a5133673e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.java @@ -4,39 +4,40 @@ package com.azure.resourcemanager.appcontainers.generated; +import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; import com.azure.resourcemanager.appcontainers.models.DaprMetadata; +import com.azure.resourcemanager.appcontainers.models.DaprServiceBindMetadata; import com.azure.resourcemanager.appcontainers.models.Secret; import java.util.Arrays; -/** Samples for ConnectedEnvironmentsDaprComponents CreateOrUpdate. */ +/** + * Samples for ConnectedEnvironmentsDaprComponents CreateOrUpdate. + */ public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json */ /** * Sample code: Create or update dapr component. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateDaprComponent( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsDaprComponents() - .define("reddog") - .withExistingConnectedEnvironment("examplerg", "myenvironment") - .withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") + public static void + createOrUpdateDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsDaprComponents().define("reddog") + .withExistingConnectedEnvironment("examplerg", "myenvironment").withComponentType("state.azure.cosmosdb") + .withVersion("v1").withIgnoreErrors(false).withInitTimeout("50s") .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) - .withMetadata( - Arrays - .asList( - new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) + .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .withServiceComponentBind(Arrays.asList(new DaprComponentServiceBinding().withName("statestore") + .withServiceId( + "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") + .withMetadata(new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind")))) .create(); } } 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 08213cdf047d..9ede8991dd6e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ConnectedEnvironmentsDaprComponents Delete. */ +/** + * Samples for ConnectedEnvironmentsDaprComponents Delete. + */ public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsDaprComponents_Delete.json */ /** * Sample code: Delete dapr component. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsDaprComponents() - .deleteWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsDaprComponents().deleteWithResponse("examplerg", "myenvironment", "reddog", + com.azure.core.util.Context.NONE); } } 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 c315b1ce87e1..058c0da33e62 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ConnectedEnvironmentsDaprComponents Get. */ +/** + * Samples for ConnectedEnvironmentsDaprComponents Get. + */ public final class ConnectedEnvironmentsDaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsDaprComponents_Get.json */ /** * Sample code: Get Dapr Component. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsDaprComponents() - .getWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsDaprComponents().getWithResponse("examplerg", "myenvironment", "reddog", + com.azure.core.util.Context.NONE); } } 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 48092b3d64ff..215e2390cd5f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ConnectedEnvironmentsDaprComponents List. */ +/** + * Samples for ConnectedEnvironmentsDaprComponents List. + */ public final class ConnectedEnvironmentsDaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsDaprComponents_List.json */ /** * Sample code: List Dapr Components. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void listDaprComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsDaprComponents() - .list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsDaprComponents().list("examplerg", "myenvironment", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java index 905baafb6198..cabb8147975a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ConnectedEnvironmentsDaprComponents ListSecrets. */ +/** + * Samples for ConnectedEnvironmentsDaprComponents ListSecrets. + */ public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsDaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listContainerAppsSecrets( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsDaprComponents() - .listSecretsWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); + public static void + listContainerAppsSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsDaprComponents().listSecretsWithResponse("examplerg", "myenvironment", "reddog", + com.azure.core.util.Context.NONE); } } 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 a2ab7dbff31a..66683fb3cab1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.java @@ -4,14 +4,18 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ConnectedEnvironments Delete. */ +/** + * Samples for ConnectedEnvironments Delete. + */ public final class ConnectedEnvironmentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_Delete.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironments_Delete + * .json */ /** * Sample code: Delete connected environment by connectedEnvironmentName. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteConnectedEnvironmentByConnectedEnvironmentName( 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 87c6e351dc17..ea8aa9241080 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ConnectedEnvironments GetByResourceGroup. */ +/** + * Samples for ConnectedEnvironments GetByResourceGroup. + */ public final class ConnectedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironments_Get. + * json */ /** * Sample code: Get connected environment by connectedEnvironmentName. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getConnectedEnvironmentByConnectedEnvironmentName( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironments() - .getByResourceGroupWithResponse("examplerg", "examplekenv", com.azure.core.util.Context.NONE); + manager.connectedEnvironments().getByResourceGroupWithResponse("examplerg", "examplekenv", + com.azure.core.util.Context.NONE); } } 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 24e8daf8315b..5b73ee3002b1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.java @@ -4,18 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ConnectedEnvironments ListByResourceGroup. */ +/** + * Samples for ConnectedEnvironments ListByResourceGroup. + */ public final class ConnectedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listEnvironmentsByResourceGroup( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + listEnvironmentsByResourceGroup(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.connectedEnvironments().listByResourceGroup("examplerg", com.azure.core.util.Context.NONE); } } 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 c902a717b52b..efbbbb3269fc 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ConnectedEnvironments List. */ +/** + * Samples for ConnectedEnvironments List. + */ public final class ConnectedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironments_ListBySubscription.json */ /** * Sample code: List connected environments by subscription. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void listConnectedEnvironmentsBySubscription( 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 3139a930bc9f..479f734b1431 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.java @@ -8,30 +8,26 @@ import com.azure.resourcemanager.appcontainers.models.AzureFileProperties; import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorageProperties; -/** Samples for ConnectedEnvironmentsStorages CreateOrUpdate. */ +/** + * Samples for ConnectedEnvironmentsStorages CreateOrUpdate. + */ public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateEnvironmentsStorage( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsStorages() - .define("jlaw-demo1") + public static void + createOrUpdateEnvironmentsStorage(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsStorages().define("jlaw-demo1") .withExistingConnectedEnvironment("examplerg", "env") - .withProperties( - new ConnectedEnvironmentStorageProperties() - .withAzureFile( - new AzureFileProperties() - .withAccountName("account1") - .withAccountKey("fakeTokenPlaceholder") - .withAccessMode(AccessMode.READ_ONLY) - .withShareName("share1"))) + .withProperties(new ConnectedEnvironmentStorageProperties().withAzureFile( + new AzureFileProperties().withAccountName("account1").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 b6501e6c33f9..d4b77dff688a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ConnectedEnvironmentsStorages Delete. */ +/** + * Samples for ConnectedEnvironmentsStorages Delete. + */ public final class ConnectedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsStorages() - .deleteWithResponse("examplerg", "env", "jlaw-demo1", com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsStorages().deleteWithResponse("examplerg", "env", "jlaw-demo1", + com.azure.core.util.Context.NONE); } } 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 890dbec72134..a274e727698d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ConnectedEnvironmentsStorages Get. */ +/** + * Samples for ConnectedEnvironmentsStorages Get. + */ public final class ConnectedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage properties by subscription. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getAEnvironmentsStoragePropertiesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsStorages() - .getWithResponse("examplerg", "env", "jlaw-demo1", com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsStorages().getWithResponse("examplerg", "env", "jlaw-demo1", + com.azure.core.util.Context.NONE); } } 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 e0c78e04ddf8..171e1dbceb49 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ConnectedEnvironmentsStorages List. */ +/** + * Samples for ConnectedEnvironmentsStorages List. + */ public final class ConnectedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ConnectedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .connectedEnvironmentsStorages() - .listWithResponse("examplerg", "managedEnv", com.azure.core.util.Context.NONE); + manager.connectedEnvironmentsStorages().listWithResponse("examplerg", "managedEnv", + com.azure.core.util.Context.NONE); } } 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 da3c24d3decc..a82fe9610eb2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ConnectedEnvironments Update. */ +/** + * Samples for ConnectedEnvironments Update. + */ public final class ConnectedEnvironmentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ConnectedEnvironments_Patch.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ConnectedEnvironments_Patch. + * json */ /** * Sample code: Patch Managed Environment. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void patchManagedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + patchManagedEnvironment(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.connectedEnvironments().updateWithResponse("examplerg", "testenv", com.azure.core.util.Context.NONE); } } 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 9241aee1c436..f4c38f613bf6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java @@ -6,38 +6,38 @@ import com.azure.resourcemanager.appcontainers.models.AppRegistration; import com.azure.resourcemanager.appcontainers.models.AuthPlatform; +import com.azure.resourcemanager.appcontainers.models.EncryptionSettings; import com.azure.resourcemanager.appcontainers.models.Facebook; import com.azure.resourcemanager.appcontainers.models.GlobalValidation; import com.azure.resourcemanager.appcontainers.models.IdentityProviders; import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; -/** Samples for ContainerAppsAuthConfigs CreateOrUpdate. */ +/** + * Samples for ContainerAppsAuthConfigs CreateOrUpdate. + */ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AuthConfigs_CreateOrUpdate.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AuthConfigs_CreateOrUpdate. + * json */ /** * Sample code: Create or Update Container App AuthConfig. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateContainerAppAuthConfig( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsAuthConfigs() - .define("current") + public static void + createOrUpdateContainerAppAuthConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsAuthConfigs().define("current") .withExistingContainerApp("workerapps-rg-xj", "testcanadacentral") .withPlatform(new AuthPlatform().withEnabled(true)) .withGlobalValidation( new GlobalValidation().withUnauthenticatedClientAction(UnauthenticatedClientActionV2.ALLOW_ANONYMOUS)) - .withIdentityProviders( - new IdentityProviders() - .withFacebook( - new Facebook() - .withRegistration( - new AppRegistration() - .withAppId("123") - .withAppSecretSettingName("fakeTokenPlaceholder")))) + .withIdentityProviders(new IdentityProviders().withFacebook(new Facebook().withRegistration( + new AppRegistration().withAppId("123").withAppSecretSettingName("fakeTokenPlaceholder")))) + .withEncryptionSettings( + new EncryptionSettings().withContainerAppAuthEncryptionSecretName("fakeTokenPlaceholder") + .withContainerAppAuthSigningSecretName("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 8cff51959358..73ae627ac861 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerAppsAuthConfigs Delete. */ +/** + * Samples for ContainerAppsAuthConfigs Delete. + */ public final class ContainerAppsAuthConfigsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AuthConfigs_Delete.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AuthConfigs_Delete.json */ /** * Sample code: Delete Container App AuthConfig. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void deleteContainerAppAuthConfig( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsAuthConfigs() - .deleteWithResponse("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); + public static void + deleteContainerAppAuthConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsAuthConfigs().deleteWithResponse("workerapps-rg-xj", "testcanadacentral", "current", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java index c49674517140..a46b014a842d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerAppsAuthConfigs Get. */ +/** + * Samples for ContainerAppsAuthConfigs Get. + */ public final class ContainerAppsAuthConfigsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AuthConfigs_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AuthConfigs_Get.json */ /** * Sample code: Get Container App's AuthConfig. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getContainerAppSAuthConfig( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsAuthConfigs() - .getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); + public static void + getContainerAppSAuthConfig(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsAuthConfigs().getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java index 2f6c9020681d..86a6c5f06a60 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerAppsAuthConfigs ListByContainerApp. */ +/** + * Samples for ContainerAppsAuthConfigs ListByContainerApp. + */ public final class ContainerAppsAuthConfigsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/AuthConfigs_ListByContainer.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/AuthConfigs_ListByContainer. + * json */ /** * Sample code: List Auth Configs by Container Apps. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listAuthConfigsByContainerApps( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsAuthConfigs() - .listByContainerApp("workerapps-rg-xj", "testcanadacentral", com.azure.core.util.Context.NONE); + public static void + listAuthConfigsByContainerApps(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsAuthConfigs().listByContainerApp("workerapps-rg-xj", "testcanadacentral", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java index 9e67a629cb81..a2452695cad0 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 @@ -19,239 +19,238 @@ import com.azure.resourcemanager.appcontainers.models.CustomDomain; import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; import com.azure.resourcemanager.appcontainers.models.Dapr; +import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; +import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; import com.azure.resourcemanager.appcontainers.models.Ingress; import com.azure.resourcemanager.appcontainers.models.IngressClientCertificateMode; +import com.azure.resourcemanager.appcontainers.models.IngressPortMapping; import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; import com.azure.resourcemanager.appcontainers.models.InitContainer; import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; import com.azure.resourcemanager.appcontainers.models.LogLevel; +import com.azure.resourcemanager.appcontainers.models.Runtime; +import com.azure.resourcemanager.appcontainers.models.RuntimeDotnet; +import com.azure.resourcemanager.appcontainers.models.RuntimeJava; import com.azure.resourcemanager.appcontainers.models.Scale; import com.azure.resourcemanager.appcontainers.models.ScaleRule; import com.azure.resourcemanager.appcontainers.models.Service; import com.azure.resourcemanager.appcontainers.models.ServiceBind; +import com.azure.resourcemanager.appcontainers.models.StorageType; import com.azure.resourcemanager.appcontainers.models.TcpScaleRule; import com.azure.resourcemanager.appcontainers.models.Template; import com.azure.resourcemanager.appcontainers.models.TrafficWeight; import com.azure.resourcemanager.appcontainers.models.Type; +import com.azure.resourcemanager.appcontainers.models.Volume; +import com.azure.resourcemanager.appcontainers.models.VolumeMount; import java.util.Arrays; import java.util.HashMap; import java.util.Map; -/** Samples for ContainerApps CreateOrUpdate. */ +/** + * Samples for ContainerApps CreateOrUpdate. + */ public final class ContainerAppsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerApps_CreateOrUpdate_ConnectedEnvironment.json */ /** - * Sample code: Create or Update Container App. - * + * Sample code: Create or Update App On A Connected Environment. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateContainerApp( + public static void createOrUpdateAppOnAConnectedEnvironment( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerApps() - .define("testcontainerApp0") - .withRegion("East US") - .withExistingResourceGroup("rg") + manager.containerApps().define("testcontainerApp0").withRegion("East US").withExistingResourceGroup("rg") + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .withEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube") + .withConfiguration(new Configuration().withIngress(new Ingress().withExternal(true).withTargetPort(3000) + .withTraffic(Arrays.asList(new TrafficWeight().withRevisionName("testcontainerApp0-ab1234") + .withWeight(100).withLabel("production"))) + .withCustomDomains(Arrays.asList(new CustomDomain().withName("www.my-name.com") + .withBindingType(BindingType.SNI_ENABLED).withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), + new CustomDomain().withName("www.my-other-name.com").withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions(Arrays.asList( + new IpSecurityRestrictionRule().withName("Allow work IP A subnet") + .withDescription("Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/32").withAction(Action.ALLOW), + new IpSecurityRestrictionRule().withName("Allow work IP B subnet") + .withDescription("Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/8").withAction(Action.ALLOW))) + .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY)) + .withClientCertificateMode(IngressClientCertificateMode.ACCEPT) + .withCorsPolicy(new CorsPolicy() + .withAllowedOrigins(Arrays.asList("https://a.test.com", "https://b.test.com")) + .withAllowedMethods(Arrays.asList("GET", "POST")) + .withAllowedHeaders(Arrays.asList("HEADER1", "HEADER2")) + .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")).withMaxAge(1234).withAllowCredentials(true)) + .withAdditionalPortMappings( + Arrays.asList(new IngressPortMapping().withExternal(true).withTargetPort(1234), + new IngressPortMapping().withExternal(false).withTargetPort(2345).withExposedPort(3456)))) + .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000) + .withHttpReadBufferSize(30).withHttpMaxRequestSize(10).withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withRuntime(new Runtime().withJava(new RuntimeJava().withEnableMetrics(true)) + .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) + .withMaxInactiveRevisions(10)) + .withTemplate(new Template() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") + .withName("testinitcontainerApp0").withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers( + Arrays + .asList(new Container().withImage("repo/testcontainerApp0:v1").withName("testcontainerApp0") + .withProbes(Arrays.asList(new ContainerAppProbe() + .withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() + .withName("Custom-Header").withValue("Awesome"))) + .withPath("/health").withPort(8080)) + .withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) + .withScale(new Scale().withMinReplicas(1).withMaxReplicas(5) + .withRules(Arrays.asList(new ScaleRule().withName("httpscalingrule").withCustom( + new CustomScaleRule().withType("http").withMetadata(mapOf("concurrentRequests", "50"))))))) + .create(); + } + + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_CreateOrUpdate + * .json + */ + /** + * Sample code: Create or Update Container App. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + createOrUpdateContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().define("testcontainerApp0").withRegion("East US").withExistingResourceGroup("rg") .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") - .withWorkloadProfileName("My-GP-01") - .withConfiguration( - new Configuration() - .withIngress( - new Ingress() - .withExternal(true) - .withTargetPort(3000) - .withTraffic( - Arrays - .asList( - new TrafficWeight() - .withRevisionName("testcontainerApp0-ab1234") - .withWeight(100) - .withLabel("production"))) - .withCustomDomains( - Arrays - .asList( - new CustomDomain() - .withName("www.my-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), - new CustomDomain() - .withName("www.my-other-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) - .withIpSecurityRestrictions( - Arrays - .asList( - new IpSecurityRestrictionRule() - .withName("Allow work IP A subnet") - .withDescription( - "Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/32") - .withAction(Action.ALLOW), - new IpSecurityRestrictionRule() - .withName("Allow work IP B subnet") - .withDescription( - "Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/8") - .withAction(Action.ALLOW))) - .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY)) - .withClientCertificateMode(IngressClientCertificateMode.ACCEPT) - .withCorsPolicy( - new CorsPolicy() - .withAllowedOrigins(Arrays.asList("https://a.test.com", "https://b.test.com")) - .withAllowedMethods(Arrays.asList("GET", "POST")) - .withAllowedHeaders(Arrays.asList("HEADER1", "HEADER2")) - .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")) - .withMaxAge(1234) - .withAllowCredentials(true))) - .withDapr( - new Dapr() - .withEnabled(true) - .withAppProtocol(AppProtocol.HTTP) - .withAppPort(3000) - .withHttpReadBufferSize(30) - .withHttpMaxRequestSize(10) - .withLogLevel(LogLevel.DEBUG) - .withEnableApiLogging(true)) - .withMaxInactiveRevisions(10) - .withService(new Service().withType("redis"))) - .withTemplate( - new Template() - .withInitContainers( - Arrays - .asList( - new InitContainer() - .withImage("repo/testcontainerApp0:v4") - .withName("testinitcontainerApp0") - .withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers( - Arrays - .asList( - new Container() - .withImage("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( - Arrays - .asList( - new ScaleRule() - .withName("httpscalingrule") - .withCustom( - new CustomScaleRule() - .withType("http") - .withMetadata(mapOf("concurrentRequests", "50")))))) - .withServiceBinds( - Arrays - .asList( - new ServiceBind() - .withServiceId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService") - .withName("redisService")))) + .withWorkloadProfileName( + "My-GP-01") + .withConfiguration(new Configuration().withIngress(new Ingress().withExternal(true).withTargetPort(3000) + .withTraffic(Arrays.asList(new TrafficWeight().withRevisionName("testcontainerApp0-ab1234") + .withWeight(100).withLabel("production"))) + .withCustomDomains(Arrays.asList(new CustomDomain().withName("www.my-name.com") + .withBindingType(BindingType.SNI_ENABLED).withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), + new CustomDomain().withName("www.my-other-name.com").withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions(Arrays.asList( + new IpSecurityRestrictionRule().withName("Allow work IP A subnet") + .withDescription("Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/32").withAction(Action.ALLOW), + new IpSecurityRestrictionRule().withName("Allow work IP B subnet") + .withDescription("Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/8").withAction(Action.ALLOW))) + .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY)) + .withClientCertificateMode(IngressClientCertificateMode.ACCEPT) + .withCorsPolicy(new CorsPolicy() + .withAllowedOrigins(Arrays.asList("https://a.test.com", "https://b.test.com")) + .withAllowedMethods(Arrays.asList("GET", "POST")) + .withAllowedHeaders(Arrays.asList("HEADER1", "HEADER2")) + .withExposeHeaders(Arrays.asList("HEADER3", "HEADER4")).withMaxAge(1234).withAllowCredentials(true)) + .withAdditionalPortMappings( + Arrays.asList(new IngressPortMapping().withExternal(true).withTargetPort(1234), + new IngressPortMapping().withExternal(false).withTargetPort(2345).withExposedPort(3456)))) + .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000) + .withHttpReadBufferSize(30).withHttpMaxRequestSize(10).withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withRuntime(new Runtime().withJava(new RuntimeJava().withEnableMetrics(true)) + .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) + .withMaxInactiveRevisions(10).withService(new Service().withType("redis"))) + .withTemplate(new Template() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerApp0:v4") + .withName("testinitcontainerApp0").withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers( + Arrays.asList(new Container().withImage("repo/testcontainerApp0:v1").withName("testcontainerApp0") + .withVolumeMounts(Arrays.asList( + new VolumeMount().withVolumeName("azurefile").withMountPath("/mnt/path1") + .withSubPath("subPath1"), + new VolumeMount().withVolumeName("nfsazurefile").withMountPath("/mnt/path2") + .withSubPath("subPath2"))) + .withProbes(Arrays.asList(new ContainerAppProbe() + .withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() + .withName("Custom-Header").withValue("Awesome"))) + .withPath("/health").withPort(8080)) + .withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) + .withScale(new Scale().withMinReplicas(1).withMaxReplicas(5) + .withRules(Arrays.asList(new ScaleRule().withName("httpscalingrule").withCustom( + new CustomScaleRule().withType("http").withMetadata(mapOf("concurrentRequests", "50")))))) + .withVolumes(Arrays.asList( + new Volume().withName("azurefile").withStorageType(StorageType.AZURE_FILE) + .withStorageName("storage"), + new Volume().withName("nfsazurefile").withStorageType(StorageType.NFS_AZURE_FILE) + .withStorageName("nfsStorage"))) + .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/redisService") + .withName("redisService").withClientType("dotnet") + .withCustomizedKeys(mapOf("DesiredKey", "fakeTokenPlaceholder"))))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_TcpApp_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerApps_TcpApp_CreateOrUpdate.json */ /** * Sample code: Create or Update Tcp App. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void createOrUpdateTcpApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerApps() - .define("testcontainerAppTcp") - .withRegion("East US") - .withExistingResourceGroup("rg") + manager.containerApps().define("testcontainerAppTcp").withRegion("East US").withExistingResourceGroup("rg") .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") .withConfiguration( new Configuration() .withIngress( - new Ingress() - .withExternal(true) - .withTargetPort(3000) - .withExposedPort(4000) - .withTransport(IngressTransportMethod.TCP) + new Ingress().withExternal(true).withTargetPort(3000).withExposedPort(4000) + .withTransport( + IngressTransportMethod.TCP) .withTraffic( Arrays .asList( - new TrafficWeight() - .withRevisionName("testcontainerAppTcp-ab1234") - .withWeight(100))))) - .withTemplate( - new Template() - .withContainers( - Arrays - .asList( - new Container() - .withImage("repo/testcontainerAppTcp:v1") - .withName("testcontainerAppTcp") - .withProbes( - Arrays - .asList( - new ContainerAppProbe() - .withInitialDelaySeconds(3) - .withPeriodSeconds(3) - .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)) - .withType(Type.LIVENESS))))) - .withScale( - new Scale() - .withMinReplicas(1) - .withMaxReplicas(5) - .withRules( - Arrays - .asList( - new ScaleRule() - .withName("tcpscalingrule") - .withTcp( - new TcpScaleRule() - .withMetadata(mapOf("concurrentConnections", "50"))))))) + new TrafficWeight().withRevisionName( + "testcontainerAppTcp-ab1234").withWeight( + 100))))) + .withTemplate(new Template() + .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppTcp:v1") + .withName("testcontainerAppTcp") + .withProbes(Arrays.asList(new ContainerAppProbe().withInitialDelaySeconds(3).withPeriodSeconds(3) + .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)).withType(Type.LIVENESS))))) + .withScale( + new Scale().withMinReplicas(1).withMaxReplicas(5) + .withRules(Arrays.asList(new ScaleRule().withName("tcpscalingrule") + .withTcp(new TcpScaleRule().withMetadata(mapOf("concurrentConnections", "50"))))))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ManagedBy_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerApps_ManagedBy_CreateOrUpdate.json */ /** * Sample code: Create or Update ManagedBy App. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateManagedByApp( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerApps() - .define("testcontainerAppManagedBy") - .withRegion("East US") + public static void + createOrUpdateManagedByApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().define("testcontainerAppManagedBy").withRegion("East US") .withExistingResourceGroup("rg") .withManagedBy( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.AppPlatform/Spring/springapp") @@ -260,45 +259,21 @@ public static void createOrUpdateManagedByApp( .withConfiguration( new Configuration() .withIngress( - new Ingress() - .withExternal(true) - .withTargetPort(3000) - .withExposedPort(4000) - .withTransport(IngressTransportMethod.TCP) - .withTraffic( + new Ingress().withExternal(true).withTargetPort(3000).withExposedPort(4000) + .withTransport(IngressTransportMethod.TCP).withTraffic( Arrays .asList( - new TrafficWeight() - .withRevisionName("testcontainerAppManagedBy-ab1234") + new TrafficWeight().withRevisionName("testcontainerAppManagedBy-ab1234") .withWeight(100))))) - .withTemplate( - new Template() - .withContainers( - Arrays - .asList( - new Container() - .withImage("repo/testcontainerAppManagedBy:v1") - .withName("testcontainerAppManagedBy") - .withProbes( - Arrays - .asList( - new ContainerAppProbe() - .withInitialDelaySeconds(3) - .withPeriodSeconds(3) - .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)) - .withType(Type.LIVENESS))))) - .withScale( - new Scale() - .withMinReplicas(1) - .withMaxReplicas(5) - .withRules( - Arrays - .asList( - new ScaleRule() - .withName("tcpscalingrule") - .withTcp( - new TcpScaleRule() - .withMetadata(mapOf("concurrentConnections", "50"))))))) + .withTemplate(new Template() + .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerAppManagedBy:v1") + .withName("testcontainerAppManagedBy") + .withProbes(Arrays.asList(new ContainerAppProbe().withInitialDelaySeconds(3).withPeriodSeconds(3) + .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)).withType(Type.LIVENESS))))) + .withScale( + new Scale().withMinReplicas(1).withMaxReplicas(5) + .withRules(Arrays.asList(new ScaleRule().withName("tcpscalingrule") + .withTcp(new TcpScaleRule().withMetadata(mapOf("concurrentConnections", "50"))))))) .create(); } 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 d7b8bc4e1f7a..7e39013ac3d9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerApps Delete. */ +/** + * Samples for ContainerApps Delete. + */ public final class ContainerAppsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Delete.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Delete.json */ /** * Sample code: Delete Container App. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { 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 992e7aa9bb03..d5b24ab628e0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java @@ -4,24 +4,23 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerAppsDiagnostics GetDetector. */ +/** + * Samples for ContainerAppsDiagnostics GetDetector. + */ public final class ContainerAppsDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerAppsDiagnostics_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerAppsDiagnostics_Get + * .json */ /** * Sample code: Get Container App's diagnostics info. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getContainerAppSDiagnosticsInfo( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsDiagnostics() - .getDetectorWithResponse( - "mikono-workerapp-test-rg", - "mikono-capp-stage1", - "cappcontainerappnetworkIO", - com.azure.core.util.Context.NONE); + public static void + getContainerAppSDiagnosticsInfo(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsDiagnostics().getDetectorWithResponse("mikono-workerapp-test-rg", "mikono-capp-stage1", + "cappcontainerappnetworkIO", com.azure.core.util.Context.NONE); } } 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 bd0c74d90e31..21d96bf63e85 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.java @@ -4,21 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerAppsDiagnostics GetRevision. */ +/** + * Samples for ContainerAppsDiagnostics GetRevision. + */ public final class ContainerAppsDiagnosticsGetRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getContainerAppSRevision( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsDiagnostics() - .getRevisionWithResponse( - "rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); + public static void + getContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsDiagnostics().getRevisionWithResponse("rg", "testcontainerApp0", + "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); } } 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 937fbe5d46b8..b38f0f2e0974 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerAppsDiagnostics GetRoot. */ +/** + * Samples for ContainerAppsDiagnostics GetRoot. + */ public final class ContainerAppsDiagnosticsGetRootSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsDiagnostics() - .getRootWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); + manager.containerAppsDiagnostics().getRootWithResponse("rg", "testcontainerApp0", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java index 390c12f48678..adb5562735f2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerAppsDiagnostics ListDetectors. */ +/** + * Samples for ContainerAppsDiagnostics ListDetectors. + */ public final class ContainerAppsDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerAppsDiagnostics_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerAppsDiagnostics_List.json */ /** * Sample code: Get the list of available diagnostics for a given Container App. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getTheListOfAvailableDiagnosticsForAGivenContainerApp( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsDiagnostics() - .listDetectors("mikono-workerapp-test-rg", "mikono-capp-stage1", com.azure.core.util.Context.NONE); + manager.containerAppsDiagnostics().listDetectors("mikono-workerapp-test-rg", "mikono-capp-stage1", + com.azure.core.util.Context.NONE); } } 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 20d47c4b4c60..d8efb9f78d2f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerAppsDiagnostics ListRevisions. */ +/** + * Samples for ContainerAppsDiagnostics ListRevisions. + */ public final class ContainerAppsDiagnosticsListRevisionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_List.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listContainerAppSRevisions( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsDiagnostics() - .listRevisions("rg", "testcontainerApp0", null, com.azure.core.util.Context.NONE); + public static void + listContainerAppSRevisions(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsDiagnostics().listRevisions("rg", "testcontainerApp0", null, + com.azure.core.util.Context.NONE); } } 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 8b1ba6a70851..90dfacb4c9d1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerApps GetAuthToken. */ +/** + * Samples for ContainerApps GetAuthToken. + */ public final class ContainerAppsGetAuthTokenSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_GetAuthToken.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_GetAuthToken. + * json */ /** * Sample code: Get Container App Auth Token. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getContainerAppAuthToken( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + getContainerAppAuthToken(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.containerApps().getAuthTokenWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java index 9edea0317e64..9ecec432a052 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerApps GetByResourceGroup. */ +/** + * Samples for ContainerApps GetByResourceGroup. + */ public final class ContainerAppsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerApps() - .getByResourceGroupWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); + manager.containerApps().getByResourceGroupWithResponse("rg", "testcontainerApp0", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java index 7bcf0aa375b0..47549ac241be 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java @@ -4,18 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerApps ListByResourceGroup. */ +/** + * Samples for ContainerApps ListByResourceGroup. + */ public final class ContainerAppsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerApps_ListByResourceGroup.json */ /** * Sample code: List Container Apps by resource group. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listContainerAppsByResourceGroup( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + listContainerAppsByResourceGroup(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.containerApps().listByResourceGroup("rg", com.azure.core.util.Context.NONE); } } 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 52c21100e52a..6715084264da 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerApps ListCustomHostnameAnalysis. */ +/** + * Samples for ContainerApps ListCustomHostnameAnalysis. + */ public final class ContainerAppsListCustomHostnameAnalysisSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ListCustomHostNameAnalysis.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerApps_ListCustomHostNameAnalysis.json */ /** * Sample code: Analyze Custom Hostname. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void analyzeCustomHostname(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerApps() - .listCustomHostnameAnalysisWithResponse( - "rg", "testcontainerApp0", "my.name.corp", com.azure.core.util.Context.NONE); + manager.containerApps().listCustomHostnameAnalysisWithResponse("rg", "testcontainerApp0", "my.name.corp", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java index 18ab90f2c318..4ebb60d86d04 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java @@ -4,18 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerApps List. */ +/** + * Samples for ContainerApps List. + */ public final class ContainerAppsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerApps_ListBySubscription.json */ /** * Sample code: List Container Apps by subscription. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listContainerAppsBySubscription( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + listContainerAppsBySubscription(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.containerApps().list(com.azure.core.util.Context.NONE); } } 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 aeb01c17975d..489af3ae4e75 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerApps ListSecrets. */ +/** + * Samples for ContainerApps ListSecrets. + */ public final class ContainerAppsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_ListSecrets.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_ListSecrets. + * json */ /** * Sample code: List Container Apps Secrets. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listContainerAppsSecrets( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + listContainerAppsSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.containerApps().listSecretsWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java index 40ee7800d55b..f3335387ac87 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java @@ -4,25 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerAppsRevisionReplicas GetReplica. */ +/** + * Samples for ContainerAppsRevisionReplicas GetReplica. + */ public final class ContainerAppsRevisionReplicasGetReplicaSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Replicas_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Replicas_Get.json */ /** * Sample code: Get Container App's revision replica. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getContainerAppSRevisionReplica( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsRevisionReplicas() - .getReplicaWithResponse( - "workerapps-rg-xj", - "myapp", - "myapp--0wlqy09", - "myapp--0wlqy09-5d9774cff-5wnd8", - com.azure.core.util.Context.NONE); + public static void + getContainerAppSRevisionReplica(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisionReplicas().getReplicaWithResponse("workerapps-rg-xj", "myapp", "myapp--0wlqy09", + "myapp--0wlqy09-5d9774cff-5wnd8", com.azure.core.util.Context.NONE); } } 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 7e7f5f482af5..c4a1de84efd6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerAppsRevisionReplicas ListReplicas. */ +/** + * Samples for ContainerAppsRevisionReplicas ListReplicas. + */ public final class ContainerAppsRevisionReplicasListReplicasSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Replicas_List.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Replicas_List.json */ /** * Sample code: List Container App's replicas. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listContainerAppSReplicas( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsRevisionReplicas() - .listReplicasWithResponse("workerapps-rg-xj", "myapp", "myapp--0wlqy09", com.azure.core.util.Context.NONE); + public static void + listContainerAppSReplicas(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisionReplicas().listReplicasWithResponse("workerapps-rg-xj", "myapp", "myapp--0wlqy09", + com.azure.core.util.Context.NONE); } } 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 39ec41f8b767..514e2b114c1a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java @@ -4,21 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerAppsRevisions ActivateRevision. */ +/** + * Samples for ContainerAppsRevisions ActivateRevision. + */ public final class ContainerAppsRevisionsActivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Activate.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Activate.json */ /** * Sample code: Activate Container App's revision. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void activateContainerAppSRevision( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsRevisions() - .activateRevisionWithResponse( - "rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); + public static void + activateContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisions().activateRevisionWithResponse("rg", "testcontainerApp0", + "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); } } 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 5cb88570661f..fe6a223be31a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java @@ -4,21 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerAppsRevisions DeactivateRevision. */ +/** + * Samples for ContainerAppsRevisions DeactivateRevision. + */ public final class ContainerAppsRevisionsDeactivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Deactivate.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Deactivate.json */ /** * Sample code: Deactivate Container App's revision. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void deactivateContainerAppSRevision( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsRevisions() - .deactivateRevisionWithResponse( - "rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); + public static void + deactivateContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisions().deactivateRevisionWithResponse("rg", "testcontainerApp0", + "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); } } 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 97956a614376..407c19f74eaa 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java @@ -4,21 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerAppsRevisions GetRevision. */ +/** + * Samples for ContainerAppsRevisions GetRevision. + */ public final class ContainerAppsRevisionsGetRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getContainerAppSRevision( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsRevisions() - .getRevisionWithResponse( - "rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); + public static void + getContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisions().getRevisionWithResponse("rg", "testcontainerApp0", "testcontainerApp0-pjxhsye", + com.azure.core.util.Context.NONE); } } 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 985067a2c45d..a5deaf31f3a5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerAppsRevisions ListRevisions. */ +/** + * Samples for ContainerAppsRevisions ListRevisions. + */ public final class ContainerAppsRevisionsListRevisionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_List.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listContainerAppSRevisions( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsRevisions() - .listRevisions("rg", "testcontainerApp0", null, com.azure.core.util.Context.NONE); + public static void + listContainerAppSRevisions(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisions().listRevisions("rg", "testcontainerApp0", null, + com.azure.core.util.Context.NONE); } } 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 bce649a16901..01846b3dc910 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java @@ -4,21 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerAppsRevisions RestartRevision. */ +/** + * Samples for ContainerAppsRevisions RestartRevision. + */ public final class ContainerAppsRevisionsRestartRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Revisions_Restart.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Revisions_Restart.json */ /** * Sample code: Restart Container App's revision. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void restartContainerAppSRevision( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsRevisions() - .restartRevisionWithResponse( - "rg", "testStaticSite0", "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); + public static void + restartContainerAppSRevision(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsRevisions().restartRevisionWithResponse("rg", "testStaticSite0", + "testcontainerApp0-pjxhsye", com.azure.core.util.Context.NONE); } } 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 8c03624e124b..f2cca315323e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java @@ -5,43 +5,38 @@ package com.azure.resourcemanager.appcontainers.generated; import com.azure.resourcemanager.appcontainers.models.AzureCredentials; +import com.azure.resourcemanager.appcontainers.models.EnvironmentVariable; import com.azure.resourcemanager.appcontainers.models.GithubActionConfiguration; import com.azure.resourcemanager.appcontainers.models.RegistryInfo; +import java.util.Arrays; -/** Samples for ContainerAppsSourceControls CreateOrUpdate. */ +/** + * Samples for ContainerAppsSourceControls CreateOrUpdate. + */ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/SourceControls_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * SourceControls_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App SourceControl. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void createOrUpdateContainerAppSourceControl( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsSourceControls() - .define("current") + manager.containerAppsSourceControls().define("current") .withExistingContainerApp("workerapps-rg-xj", "testcanadacentral") - .withRepoUrl("https://github.com/xwang971/ghatest") - .withBranch("master") - .withGithubActionConfiguration( - new GithubActionConfiguration() - .withRegistryInfo( - new RegistryInfo() - .withRegistryUrl("test-registry.azurecr.io") - .withRegistryUsername("test-registry") - .withRegistryPassword("fakeTokenPlaceholder")) - .withAzureCredentials( - new AzureCredentials() - .withClientId("") - .withClientSecret("fakeTokenPlaceholder") - .withTenantId("") - .withKind("feaderated")) - .withContextPath("./") - .withGithubPersonalAccessToken("fakeTokenPlaceholder") - .withImage("image/tag")) + .withRepoUrl("https://github.com/xwang971/ghatest").withBranch("master") + .withGithubActionConfiguration(new GithubActionConfiguration() + .withRegistryInfo(new RegistryInfo().withRegistryUrl("test-registry.azurecr.io") + .withRegistryUsername("test-registry").withRegistryPassword("fakeTokenPlaceholder")) + .withAzureCredentials(new AzureCredentials().withClientId("") + .withClientSecret("fakeTokenPlaceholder").withTenantId("").withKind("feaderated")) + .withContextPath("./").withGithubPersonalAccessToken("fakeTokenPlaceholder").withImage("image/tag") + .withBuildEnvironmentVariables( + Arrays.asList(new EnvironmentVariable().withName("foo1").withValue("bar1"), + new EnvironmentVariable().withName("foo2").withValue("bar2")))) .create(); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteSamples.java index 54d5428861c1..a2441410da98 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerAppsSourceControls Delete. */ +/** + * Samples for ContainerAppsSourceControls Delete. + */ public final class ContainerAppsSourceControlsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/SourceControls_Delete.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SourceControls_Delete.json */ /** * Sample code: Delete Container App SourceControl. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void deleteContainerAppSourceControl( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsSourceControls() - .delete("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); + public static void + deleteContainerAppSourceControl(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSourceControls().delete("workerapps-rg-xj", "testcanadacentral", "current", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java index f4e6fa68ec2c..7f07963ec218 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerAppsSourceControls Get. */ +/** + * Samples for ContainerAppsSourceControls Get. + */ public final class ContainerAppsSourceControlsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/SourceControls_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/SourceControls_Get.json */ /** * Sample code: Get Container App's SourceControl. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getContainerAppSSourceControl( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsSourceControls() - .getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", com.azure.core.util.Context.NONE); + public static void + getContainerAppSSourceControl(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerAppsSourceControls().getWithResponse("workerapps-rg-xj", "testcanadacentral", "current", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java index 883a72b2f850..864c40e24cfe 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerAppsSourceControls ListByContainerApp. */ +/** + * Samples for ContainerAppsSourceControls ListByContainerApp. + */ public final class ContainerAppsSourceControlsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/SourceControls_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * SourceControls_ListByContainer.json */ /** * Sample code: List App's Source Controls. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void listAppSSourceControls(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .containerAppsSourceControls() - .listByContainerApp("workerapps-rg-xj", "testcanadacentral", com.azure.core.util.Context.NONE); + manager.containerAppsSourceControls().listByContainerApp("workerapps-rg-xj", "testcanadacentral", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStartSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStartSamples.java index b1f49ae8f313..e44bc17702c5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStartSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStartSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerApps Start. */ +/** + * Samples for ContainerApps Start. + */ public final class ContainerAppsStartSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Start.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Start.json */ /** * Sample code: Start Container App. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void startContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStopSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStopSamples.java index ae4ab7a00a88..9d6b7102215c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStopSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsStopSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ContainerApps Stop. */ +/** + * Samples for ContainerApps Stop. + */ public final class ContainerAppsStopSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Stop.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Stop.json */ /** * Sample code: Stop Container App. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void stopContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { 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 dcdce3b8d118..f1506466306d 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 @@ -23,6 +23,9 @@ import com.azure.resourcemanager.appcontainers.models.InitContainer; import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; import com.azure.resourcemanager.appcontainers.models.LogLevel; +import com.azure.resourcemanager.appcontainers.models.Runtime; +import com.azure.resourcemanager.appcontainers.models.RuntimeDotnet; +import com.azure.resourcemanager.appcontainers.models.RuntimeJava; import com.azure.resourcemanager.appcontainers.models.Scale; import com.azure.resourcemanager.appcontainers.models.ScaleRule; import com.azure.resourcemanager.appcontainers.models.Service; @@ -34,130 +37,67 @@ import java.util.HashMap; import java.util.Map; -/** Samples for ContainerApps Update. */ +/** + * Samples for ContainerApps Update. + */ public final class ContainerAppsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_Patch.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ContainerApps_Patch.json */ /** * Sample code: Patch Container App. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void patchContainerApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - ContainerApp resource = - manager - .containerApps() - .getByResourceGroupWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE) - .getValue(); + ContainerApp resource = manager.containerApps() + .getByResourceGroupWithResponse("rg", "testcontainerApp0", com.azure.core.util.Context.NONE).getValue(); resource - .update() - .withTags(mapOf("tag1", "value1", "tag2", "value2")) - .withConfiguration( - new Configuration() - .withIngress( - new Ingress() - .withExternal(true) - .withTargetPort(3000) - .withTraffic( - Arrays - .asList( - new TrafficWeight() - .withRevisionName("testcontainerApp0-ab1234") - .withWeight(100) - .withLabel("production"))) - .withCustomDomains( - Arrays - .asList( - new CustomDomain() - .withName("www.my-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), - new CustomDomain() - .withName("www.my-other-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) - .withIpSecurityRestrictions( - Arrays - .asList( - new IpSecurityRestrictionRule() - .withName("Allow work IP A subnet") - .withDescription( - "Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/32") - .withAction(Action.ALLOW), - new IpSecurityRestrictionRule() - .withName("Allow work IP B subnet") - .withDescription( - "Allowing all IP's within the subnet below to access containerapp") - .withIpAddressRange("192.168.1.1/8") - .withAction(Action.ALLOW))) - .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY))) - .withDapr( - new Dapr() - .withEnabled(true) - .withAppProtocol(AppProtocol.HTTP) - .withAppPort(3000) - .withHttpReadBufferSize(30) - .withHttpMaxRequestSize(10) - .withLogLevel(LogLevel.DEBUG) - .withEnableApiLogging(true)) - .withMaxInactiveRevisions(10) - .withService(new Service().withType("redis"))) + .update().withTags( + mapOf("tag1", "value1", "tag2", "value2")) + .withConfiguration(new Configuration().withIngress(new Ingress().withExternal(true).withTargetPort(3000) + .withTraffic(Arrays.asList(new TrafficWeight().withRevisionName("testcontainerApp0-ab1234") + .withWeight(100).withLabel("production"))) + .withCustomDomains(Arrays.asList(new CustomDomain().withName("www.my-name.com") + .withBindingType(BindingType.SNI_ENABLED).withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), + new CustomDomain().withName("www.my-other-name.com").withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions(Arrays.asList( + new IpSecurityRestrictionRule().withName("Allow work IP A subnet") + .withDescription("Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/32").withAction(Action.ALLOW), + new IpSecurityRestrictionRule().withName("Allow work IP B subnet") + .withDescription("Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/8").withAction(Action.ALLOW))) + .withStickySessions(new IngressStickySessions().withAffinity(Affinity.STICKY))) + .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000) + .withHttpReadBufferSize(30).withHttpMaxRequestSize(10).withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withRuntime(new Runtime().withJava(new RuntimeJava().withEnableMetrics(true)) + .withDotnet(new RuntimeDotnet().withAutoConfigureDataProtection(true))) + .withMaxInactiveRevisions(10).withService(new Service().withType("redis"))) .withTemplate( new Template() - .withInitContainers( - Arrays - .asList( - new InitContainer() - .withImage("repo/testcontainerApp0:v4") - .withName("testinitcontainerApp0") - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers( - Arrays - .asList( - new Container() - .withImage("repo/testcontainerApp0:v1") - .withName("testcontainerApp0") - .withProbes( - Arrays - .asList( - new ContainerAppProbe() - .withHttpGet( - new ContainerAppProbeHttpGet() - .withHttpHeaders( - Arrays - .asList( - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header") - .withValue("Awesome"))) - .withPath("/health") - .withPort(8080)) - .withInitialDelaySeconds(3) - .withPeriodSeconds(3) - .withType(Type.LIVENESS))))) - .withScale( - new Scale() - .withMinReplicas(1) - .withMaxReplicas(5) - .withRules( - Arrays - .asList( - new ScaleRule() - .withName("httpscalingrule") - .withCustom( - new CustomScaleRule() - .withType("http") - .withMetadata(mapOf("concurrentRequests", "50")))))) - .withServiceBinds( - Arrays - .asList( - new ServiceBind() - .withServiceId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/service") - .withName("service")))) + .withInitContainers(Arrays.asList( + new InitContainer().withImage("repo/testcontainerApp0:v4").withName("testinitcontainerApp0") + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers(Arrays.asList(new Container().withImage("repo/testcontainerApp0:v1") + .withName("testcontainerApp0").withProbes(Arrays.asList(new ContainerAppProbe() + .withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() + .withName("Custom-Header").withValue("Awesome"))) + .withPath("/health").withPort(8080)) + .withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))) + .withScale(new Scale().withMinReplicas(1).withMaxReplicas(5) + .withRules(Arrays.asList(new ScaleRule().withName("httpscalingrule").withCustom( + new CustomScaleRule().withType("http").withMetadata(mapOf("concurrentRequests", "50")))))) + .withServiceBinds(Arrays.asList(new ServiceBind().withServiceId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/containerApps/service") + .withName("service").withClientType("dotnet") + .withCustomizedKeys(mapOf("DesiredKey", "fakeTokenPlaceholder"))))) .apply(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..375eb99754b3 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesCreateOrUpdateSamples.java @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration; +import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyConfiguration; +import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration; +import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration; +import com.azure.resourcemanager.appcontainers.models.DaprComponentResiliencyPolicyTimeoutPolicyConfiguration; + +/** + * Samples for DaprComponentResiliencyPolicies CreateOrUpdate. + */ +public final class DaprComponentResiliencyPoliciesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprComponentResiliencyPolicy_CreateOrUpdate_OutboundOnly.json + */ + /** + * Sample code: Create or update dapr component resiliency policy with outbound policy only. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateDaprComponentResiliencyPolicyWithOutboundPolicyOnly( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponentResiliencyPolicies().define("myresiliencypolicy") + .withExistingDaprComponent("examplerg", "myenvironment", "mydaprcomponent") + .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() + .withHttpRetryPolicy(new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(5) + .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() + .withInitialDelayInMilliseconds(100).withMaxIntervalInMilliseconds(30000))) + .withTimeoutPolicy( + new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(12)) + .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() + .withConsecutiveErrors(3).withTimeoutInSeconds(20).withIntervalInSeconds(60))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprComponentResiliencyPolicy_CreateOrUpdate_AllOptions.json + */ + /** + * Sample code: Create or update dapr component resiliency policy with all options. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateDaprComponentResiliencyPolicyWithAllOptions( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponentResiliencyPolicies().define("myresiliencypolicy") + .withExistingDaprComponent("examplerg", "myenvironment", "mydaprcomponent") + .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() + .withHttpRetryPolicy(new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(15) + .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() + .withInitialDelayInMilliseconds(2000).withMaxIntervalInMilliseconds(5500))) + .withTimeoutPolicy( + new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(30)) + .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() + .withConsecutiveErrors(5).withTimeoutInSeconds(10).withIntervalInSeconds(4))) + .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration() + .withHttpRetryPolicy(new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(5) + .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() + .withInitialDelayInMilliseconds(100).withMaxIntervalInMilliseconds(30000))) + .withTimeoutPolicy( + new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(12)) + .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() + .withConsecutiveErrors(3).withTimeoutInSeconds(20).withIntervalInSeconds(60))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprComponentResiliencyPolicy_CreateOrUpdate_SparseOptions.json + */ + /** + * Sample code: Create or update dapr component resiliency policy with sparse options. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateDaprComponentResiliencyPolicyWithSparseOptions( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponentResiliencyPolicies().define("myresiliencypolicy") + .withExistingDaprComponent("examplerg", "myenvironment", "mydaprcomponent") + .withInboundPolicy(new DaprComponentResiliencyPolicyConfiguration() + .withHttpRetryPolicy(new DaprComponentResiliencyPolicyHttpRetryPolicyConfiguration().withMaxRetries(5) + .withRetryBackOff(new DaprComponentResiliencyPolicyHttpRetryBackOffConfiguration() + .withInitialDelayInMilliseconds(2000).withMaxIntervalInMilliseconds(5500))) + .withCircuitBreakerPolicy(new DaprComponentResiliencyPolicyCircuitBreakerPolicyConfiguration() + .withConsecutiveErrors(3).withTimeoutInSeconds(20))) + .withOutboundPolicy(new DaprComponentResiliencyPolicyConfiguration().withTimeoutPolicy( + new DaprComponentResiliencyPolicyTimeoutPolicyConfiguration().withResponseTimeoutInSeconds(12))) + .create(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteSamples.java new file mode 100644 index 000000000000..956905e7eefe --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for DaprComponentResiliencyPolicies Delete. + */ +public final class DaprComponentResiliencyPoliciesDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprComponentResiliencyPolicies_Delete.json + */ + /** + * Sample code: Delete dapr component resiliency policy. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + deleteDaprComponentResiliencyPolicy(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponentResiliencyPolicies().deleteWithResponse("examplerg", "myenvironment", "mydaprcomponent", + "myresiliencypolicy", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetSamples.java new file mode 100644 index 000000000000..029a17634c83 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesGetSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for DaprComponentResiliencyPolicies Get. + */ +public final class DaprComponentResiliencyPoliciesGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprComponentResiliencyPolicies_Get.json + */ + /** + * Sample code: Get Dapr component resiliency policy. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + getDaprComponentResiliencyPolicy(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponentResiliencyPolicies().getWithResponse("examplerg", "myenvironment", "mydaprcomponent", + "myresiliencypolicy", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListSamples.java new file mode 100644 index 000000000000..e24ac1bec18b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentResiliencyPoliciesListSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for DaprComponentResiliencyPolicies List. + */ +public final class DaprComponentResiliencyPoliciesListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprComponentResiliencyPolicies_List.json + */ + /** + * Sample code: List Dapr component resiliency policies. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + listDaprComponentResiliencyPolicies(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponentResiliencyPolicies().list("examplerg", "myenvironment", "mydaprcomponent", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCreateOrUpdateSamples.java index 30857b58e6c4..e08b66e5f242 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsCreateOrUpdateSamples.java @@ -5,75 +5,68 @@ package com.azure.resourcemanager.appcontainers.generated; import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; +import com.azure.resourcemanager.appcontainers.models.DaprComponentServiceBinding; import com.azure.resourcemanager.appcontainers.models.DaprMetadata; +import com.azure.resourcemanager.appcontainers.models.DaprServiceBindMetadata; import com.azure.resourcemanager.appcontainers.models.Secret; import java.util.Arrays; -/** Samples for DaprComponents CreateOrUpdate. */ +/** + * Samples for DaprComponents CreateOrUpdate. + */ public final class DaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_CreateOrUpdate_Secrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprComponents_CreateOrUpdate_Secrets.json */ /** * Sample code: Create or update dapr component with secrets. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void createOrUpdateDaprComponentWithSecrets( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .daprComponents() - .createOrUpdateWithResponse( - "examplerg", - "myenvironment", - "reddog", - new DaprComponentInner() - .withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) + manager.daprComponents().createOrUpdateWithResponse("examplerg", "myenvironment", "reddog", + new DaprComponentInner().withComponentType("state.azure.cosmosdb").withVersion("v1").withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) + .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .withServiceComponentBind(Arrays.asList(new DaprComponentServiceBinding().withName("statestore") + .withServiceId( + "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") .withMetadata( - Arrays - .asList( - new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")), - com.azure.core.util.Context.NONE); + new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind")))), + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprComponents_CreateOrUpdate_SecretStoreComponent.json */ /** * Sample code: Create or update dapr component with secret store component. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void createOrUpdateDaprComponentWithSecretStoreComponent( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .daprComponents() - .createOrUpdateWithResponse( - "examplerg", - "myenvironment", - "reddog", - new DaprComponentInner() - .withComponentType("state.azure.cosmosdb") - .withVersion("v1") - .withIgnoreErrors(false) - .withInitTimeout("50s") - .withSecretStoreComponent("fakeTokenPlaceholder") + manager.daprComponents().createOrUpdateWithResponse("examplerg", "myenvironment", "reddog", + new DaprComponentInner().withComponentType("state.azure.cosmosdb").withVersion("v1").withIgnoreErrors(false) + .withInitTimeout("50s").withSecretStoreComponent("fakeTokenPlaceholder") + .withMetadata(Arrays.asList(new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .withServiceComponentBind(Arrays.asList(new DaprComponentServiceBinding().withName("statestore") + .withServiceId( + "/subscriptions/9f7371f1-b593-4c3c-84e2-9167806ad358/resourceGroups/ca-syn2-group/providers/Microsoft.App/containerapps/cappredis") .withMetadata( - Arrays - .asList( - new DaprMetadata().withName("url").withValue(""), - new DaprMetadata().withName("database").withValue("itemsDB"), - new DaprMetadata().withName("collection").withValue("items"), - new DaprMetadata().withName("masterkey").withSecretRef("fakeTokenPlaceholder"))) - .withScopes(Arrays.asList("container-app-1", "container-app-2")), - com.azure.core.util.Context.NONE); + new DaprServiceBindMetadata().withName("daprcomponentBind").withValue("redis-bind")))), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java index b43543b25ff9..1a3439ae36e6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for DaprComponents Delete. */ +/** + * Samples for DaprComponents Delete. + */ public final class DaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_Delete.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_Delete.json */ /** * Sample code: Delete dapr component. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .daprComponents() - .deleteWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); + manager.daprComponents().deleteWithResponse("examplerg", "myenvironment", "reddog", + com.azure.core.util.Context.NONE); } } 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 9d78dfd7338a..afdcf654f578 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java @@ -4,35 +4,38 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for DaprComponents Get. */ +/** + * Samples for DaprComponents Get. + */ public final class DaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_Get_SecretStoreComponent.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprComponents_Get_SecretStoreComponent.json */ /** * Sample code: Get Dapr Component with secret store component. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getDaprComponentWithSecretStoreComponent( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .daprComponents() - .getWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); + manager.daprComponents().getWithResponse("examplerg", "myenvironment", "reddog", + com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_Get_Secrets.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_Get_Secrets. + * json */ /** * Sample code: Get Dapr Component with secrets. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getDaprComponentWithSecrets( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .daprComponents() - .getWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); + public static void + getDaprComponentWithSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponents().getWithResponse("examplerg", "myenvironment", "reddog", + com.azure.core.util.Context.NONE); } } 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 42a07bc73880..411a3af7a8a1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for DaprComponents List. */ +/** + * Samples for DaprComponents List. + */ public final class DaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_List.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_List.json */ /** * Sample code: List Dapr Components. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void listDaprComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { 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 a08f7ca6bfce..032f01cfd5e8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java @@ -4,20 +4,23 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for DaprComponents ListSecrets. */ +/** + * Samples for DaprComponents ListSecrets. + */ public final class DaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/DaprComponents_ListSecrets.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprComponents_ListSecrets. + * json */ /** * Sample code: List Container Apps Secrets. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listContainerAppsSecrets( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .daprComponents() - .listSecretsWithResponse("examplerg", "myenvironment", "reddog", com.azure.core.util.Context.NONE); + public static void + listContainerAppsSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponents().listSecretsWithResponse("examplerg", "myenvironment", "reddog", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..74e20abfa299 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsCreateOrUpdateSamples.java @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionBulkSubscribeOptions; +import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRouteRule; +import com.azure.resourcemanager.appcontainers.models.DaprSubscriptionRoutes; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** + * Samples for DaprSubscriptions CreateOrUpdate. + */ +public final class DaprSubscriptionsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprSubscriptions_CreateOrUpdate_RouteRulesAndMetadata.json + */ + /** + * Sample code: Create or update dapr subscription with route rules and metadata. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateDaprSubscriptionWithRouteRulesAndMetadata( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprSubscriptions().define("mysubscription") + .withExistingManagedEnvironment("examplerg", "myenvironment").withPubsubName("mypubsubcomponent") + .withTopic("inventory") + .withRoutes(new DaprSubscriptionRoutes() + .withRules(Arrays.asList( + new DaprSubscriptionRouteRule().withMatch("event.type == 'widget'").withPath("/widgets"), + new DaprSubscriptionRouteRule().withMatch("event.type == 'gadget'").withPath("/gadgets"))) + .withDefaultProperty("/products")) + .withMetadata(mapOf("foo", "bar", "hello", "world")).create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprSubscriptions_CreateOrUpdate_DefaultRoute.json + */ + /** + * Sample code: Create or update dapr subscription with default route only. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateDaprSubscriptionWithDefaultRouteOnly( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprSubscriptions().define("mysubscription") + .withExistingManagedEnvironment("examplerg", "myenvironment").withPubsubName("mypubsubcomponent") + .withTopic("inventory").withRoutes(new DaprSubscriptionRoutes().withDefaultProperty("/products")).create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprSubscriptions_CreateOrUpdate_BulkSubscribeAndScopes.json + */ + /** + * Sample code: Create or update dapr subscription with bulk subscribe configuration and scopes. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateDaprSubscriptionWithBulkSubscribeConfigurationAndScopes( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprSubscriptions().define("mysubscription") + .withExistingManagedEnvironment("examplerg", "myenvironment").withPubsubName("mypubsubcomponent") + .withTopic("inventory").withRoutes(new DaprSubscriptionRoutes().withDefaultProperty("/products")) + .withScopes(Arrays.asList("warehouseapp", "customersupportapp")) + .withBulkSubscribe(new DaprSubscriptionBulkSubscribeOptions().withEnabled(true).withMaxMessagesCount(123) + .withMaxAwaitDurationMs(500)) + .create(); + } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteSamples.java new file mode 100644 index 000000000000..0ec945ff91a3 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsDeleteSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for DaprSubscriptions Delete. + */ +public final class DaprSubscriptionsDeleteSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_Delete. + * json + */ + /** + * Sample code: Delete dapr subscription. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void deleteDaprSubscription(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprSubscriptions().deleteWithResponse("examplerg", "myenvironment", "mysubscription", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetSamples.java new file mode 100644 index 000000000000..812f907a1ee7 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsGetSamples.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for DaprSubscriptions Get. + */ +public final class DaprSubscriptionsGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprSubscriptions_Get_DefaultRoute.json + */ + /** + * Sample code: Get Dapr subscription with bulk subscribe configuration and scopes. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getDaprSubscriptionWithBulkSubscribeConfigurationAndScopes( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprSubscriptions().getWithResponse("examplerg", "myenvironment", "mypubsubcomponent", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprSubscriptions_Get_BulkSubscribeAndScopes.json + */ + /** + * Sample code: Get Dapr subscription with default route only. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getDaprSubscriptionWithDefaultRouteOnly( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprSubscriptions().getWithResponse("examplerg", "myenvironment", "mypubsubcomponent", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DaprSubscriptions_Get_RouteRulesAndMetadata.json + */ + /** + * Sample code: GetDapr subscription with route rules and metadata. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getDaprSubscriptionWithRouteRulesAndMetadata( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprSubscriptions().getWithResponse("examplerg", "myenvironment", "mypubsubcomponent", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListSamples.java new file mode 100644 index 000000000000..ef535f82329e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprSubscriptionsListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for DaprSubscriptions List. + */ +public final class DaprSubscriptionsListSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DaprSubscriptions_List.json + */ + /** + * Sample code: List Dapr subscriptions. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listDaprSubscriptions(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprSubscriptions().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..dd04a51fd285 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsCreateOrUpdateSamples.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; +import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; +import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; +import java.util.Arrays; + +/** + * Samples for DotNetComponents CreateOrUpdate. + */ +public final class DotNetComponentsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DotNetComponents_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update .NET Component. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + createOrUpdateNETComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.dotNetComponents().define("mydotnetcomponent") + .withExistingManagedEnvironment("examplerg", "myenvironment") + .withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) + .withConfigurations(Arrays.asList( + new DotNetComponentConfigurationProperty().withPropertyName("dashboard-theme").withValue("dark"))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DotNetComponents_CreateOrUpdate_ServiceBind.json + */ + /** + * Sample code: Create or Update .NET Component with ServiceBinds. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateNETComponentWithServiceBinds( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.dotNetComponents().define("mydotnetcomponent") + .withExistingManagedEnvironment("examplerg", "myenvironment") + .withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) + .withConfigurations(Arrays.asList( + new DotNetComponentConfigurationProperty().withPropertyName("dashboard-theme").withValue("dark"))) + .withServiceBinds(Arrays.asList(new DotNetComponentServiceBind().withName("yellowcat").withServiceId( + "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/dotNetComponents/yellowcat"))) + .create(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsDeleteSamples.java new file mode 100644 index 000000000000..5a3f9e2293fa --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for DotNetComponents Delete. + */ +public final class DotNetComponentsDeleteSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Delete.json + */ + /** + * Sample code: Delete .NET Component. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void deleteNETComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.dotNetComponents().delete("examplerg", "myenvironment", "mydotnetcomponent", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetSamples.java new file mode 100644 index 000000000000..998df10fd6bb --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsGetSamples.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for DotNetComponents Get. + */ +public final class DotNetComponentsGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DotNetComponents_Get_ServiceBind.json + */ + /** + * Sample code: Get .NET Component with ServiceBinds. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + getNETComponentWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.dotNetComponents().getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Get.json + */ + /** + * Sample code: Get .NET Component. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getNETComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.dotNetComponents().getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListSamples.java new file mode 100644 index 000000000000..d5995ea5ec32 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsListSamples.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for DotNetComponents List. + */ +public final class DotNetComponentsListSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_List.json + */ + /** + * Sample code: List .NET Components. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listNETComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.dotNetComponents().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DotNetComponents_List_ServiceBind.json + */ + /** + * Sample code: List .NET Components with ServiceBinds. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + listNETComponentsWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.dotNetComponents().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsUpdateSamples.java new file mode 100644 index 000000000000..ca1c2638a93b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DotNetComponentsUpdateSamples.java @@ -0,0 +1,57 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.resourcemanager.appcontainers.models.DotNetComponent; +import com.azure.resourcemanager.appcontainers.models.DotNetComponentConfigurationProperty; +import com.azure.resourcemanager.appcontainers.models.DotNetComponentServiceBind; +import com.azure.resourcemanager.appcontainers.models.DotNetComponentType; +import java.util.Arrays; + +/** + * Samples for DotNetComponents Update. + */ +public final class DotNetComponentsUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * DotNetComponents_Patch_ServiceBind.json + */ + /** + * Sample code: Patch .NET Component with ServiceBinds. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + patchNETComponentWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + DotNetComponent resource = manager.dotNetComponents() + .getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) + .withConfigurations(Arrays.asList( + new DotNetComponentConfigurationProperty().withPropertyName("dashboard-theme").withValue("dark"))) + .withServiceBinds(Arrays.asList(new DotNetComponentServiceBind().withName("yellowcat").withServiceId( + "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/dotNetComponents/yellowcat"))) + .apply(); + } + + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/DotNetComponents_Patch.json + */ + /** + * Sample code: Patch .NET Component. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchNETComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + DotNetComponent resource = manager.dotNetComponents() + .getWithResponse("examplerg", "myenvironment", "mydotnetcomponent", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withComponentType(DotNetComponentType.ASPIRE_DASHBOARD) + .withConfigurations(Arrays.asList( + new DotNetComponentConfigurationProperty().withPropertyName("dashboard-theme").withValue("dark"))) + .apply(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/FunctionsExtensionInvokeFunctionsHostSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/FunctionsExtensionInvokeFunctionsHostSamples.java new file mode 100644 index 000000000000..655a2fa8836a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/FunctionsExtensionInvokeFunctionsHostSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for FunctionsExtension InvokeFunctionsHost. + */ +public final class FunctionsExtensionInvokeFunctionsHostSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/FunctionsExtension_Post.json + */ + /** + * Sample code: Invoke Functions host using Functions Extension API. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void invokeFunctionsHostUsingFunctionsExtensionAPI( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.functionsExtensions().invokeFunctionsHostWithResponse("rg", "testcontainerApp0", + "testcontainerApp0-pjxhsye", "testcontainerApp0", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateSamples.java new file mode 100644 index 000000000000..5bde29943893 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsCreateOrUpdateSamples.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; +import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; +import com.azure.resourcemanager.appcontainers.models.JavaComponentType; +import java.util.Arrays; + +/** + * Samples for JavaComponents CreateOrUpdate. + */ +public final class JavaComponentsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * JavaComponents_CreateOrUpdate_ServiceBind.json + */ + /** + * Sample code: Create or Update Java Component with ServiceBinds. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateJavaComponentWithServiceBinds( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.javaComponents().define("myjavacomponent").withExistingManagedEnvironment("examplerg", "myenvironment") + .withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) + .withConfigurations(Arrays.asList( + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") + .withValue("true"), + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") + .withValue("10000ms"))) + .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("yellowcat").withServiceId( + "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat"))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * JavaComponents_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update Java Component. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + createOrUpdateJavaComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.javaComponents().define("myjavacomponent").withExistingManagedEnvironment("examplerg", "myenvironment") + .withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) + .withConfigurations(Arrays.asList( + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") + .withValue("true"), + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") + .withValue("10000ms"))) + .create(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsDeleteSamples.java new file mode 100644 index 000000000000..6450217f5b2d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsDeleteSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for JavaComponents Delete. + */ +public final class JavaComponentsDeleteSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Delete.json + */ + /** + * Sample code: Delete Java Component. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void deleteJavaComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.javaComponents().delete("examplerg", "myenvironment", "myjavacomponent", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetSamples.java new file mode 100644 index 000000000000..f86e4c3ae6f8 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsGetSamples.java @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for JavaComponents Get. + */ +public final class JavaComponentsGetSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Get.json + */ + /** + * Sample code: Get Java Component. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getJavaComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.javaComponents().getWithResponse("examplerg", "myenvironment", "myjavacomponent", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * JavaComponents_Get_ServiceBind.json + */ + /** + * Sample code: Get Java Component with ServiceBinds. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + getJavaComponentWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.javaComponents().getWithResponse("examplerg", "myenvironment", "myjavacomponent", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListSamples.java new file mode 100644 index 000000000000..37ee9f807aab --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsListSamples.java @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for JavaComponents List. + */ +public final class JavaComponentsListSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_List.json + */ + /** + * Sample code: List Java Components. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listJavaComponents(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.javaComponents().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * JavaComponents_List_ServiceBind.json + */ + /** + * Sample code: List Java Components with ServiceBinds. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + listJavaComponentsWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.javaComponents().list("examplerg", "myenvironment", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsUpdateSamples.java new file mode 100644 index 000000000000..0ee356179fc6 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JavaComponentsUpdateSamples.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.resourcemanager.appcontainers.models.JavaComponent; +import com.azure.resourcemanager.appcontainers.models.JavaComponentConfigurationProperty; +import com.azure.resourcemanager.appcontainers.models.JavaComponentServiceBind; +import com.azure.resourcemanager.appcontainers.models.JavaComponentType; +import java.util.Arrays; + +/** + * Samples for JavaComponents Update. + */ +public final class JavaComponentsUpdateSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/JavaComponents_Patch.json + */ + /** + * Sample code: Patch Java Component. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchJavaComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + JavaComponent resource = manager.javaComponents() + .getWithResponse("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) + .withConfigurations(Arrays.asList( + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") + .withValue("true"), + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") + .withValue("10000ms"))) + .apply(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * JavaComponents_Patch_ServiceBind.json + */ + /** + * Sample code: Patch Java Component with ServiceBinds. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + patchJavaComponentWithServiceBinds(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + JavaComponent resource = manager.javaComponents() + .getWithResponse("examplerg", "myenvironment", "myjavacomponent", com.azure.core.util.Context.NONE) + .getValue(); + resource.update().withComponentType(JavaComponentType.SPRING_BOOT_ADMIN) + .withConfigurations(Arrays.asList( + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.ui.enable-toasts") + .withValue("true"), + new JavaComponentConfigurationProperty().withPropertyName("spring.boot.admin.monitor.status-interval") + .withValue("10000ms"))) + .withServiceBinds(Arrays.asList(new JavaComponentServiceBind().withName("yellowcat").withServiceId( + "/subscriptions/8efdecc5-919e-44eb-b179-915dca89ebf9/resourceGroups/examplerg/providers/Microsoft.App/managedEnvironments/myenvironment/javaComponents/yellowcat"))) + .apply(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsCreateOrUpdateSamples.java index 016f291626e5..68b72374711c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsCreateOrUpdateSamples.java @@ -11,6 +11,8 @@ import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; import com.azure.resourcemanager.appcontainers.models.ContainerResources; +import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; +import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; import com.azure.resourcemanager.appcontainers.models.InitContainer; import com.azure.resourcemanager.appcontainers.models.JobConfiguration; import com.azure.resourcemanager.appcontainers.models.JobConfigurationEventTriggerConfig; @@ -20,133 +22,118 @@ import com.azure.resourcemanager.appcontainers.models.JobTemplate; import com.azure.resourcemanager.appcontainers.models.TriggerType; import com.azure.resourcemanager.appcontainers.models.Type; +import com.azure.resourcemanager.appcontainers.models.VolumeMount; import java.io.IOException; import java.util.Arrays; -/** Samples for Jobs CreateOrUpdate. */ +/** + * Samples for Jobs CreateOrUpdate. + */ public final class JobsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_CreateorUpdate_EventTrigger.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * Job_CreateorUpdate_ConnectedEnvironment.json + */ + /** + * Sample code: Create or Update Container Apps Job On A Connected Environment. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateContainerAppsJobOnAConnectedEnvironment( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.jobs().define("testcontainerAppsJob0").withRegion("East US").withExistingResourceGroup("rg") + .withExtendedLocation(new ExtendedLocation().withName( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.ExtendedLocation/customLocations/testcustomlocation") + .withType(ExtendedLocationTypes.CUSTOM_LOCATION)) + .withEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/connectedEnvironments/demokube") + .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.MANUAL).withReplicaTimeout(10) + .withReplicaRetryLimit(10).withManualTriggerConfig( + new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1).withParallelism(4))) + .withTemplate(new JobTemplate() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") + .withName("testinitcontainerAppsJob0").withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers(Arrays + .asList(new Container().withImage("repo/testcontainerAppsJob0:v1").withName("testcontainerAppsJob0") + .withProbes(Arrays.asList(new ContainerAppProbe() + .withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() + .withName("Custom-Header").withValue("Awesome"))) + .withPath("/health").withPort(8080)) + .withInitialDelaySeconds(5).withPeriodSeconds(3).withType(Type.LIVENESS)))))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * Job_CreateorUpdate_EventTrigger.json */ /** * Sample code: Create or Update Container Apps Job With Event Driven Trigger. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void createOrUpdateContainerAppsJobWithEventDrivenTrigger( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) throws IOException { - manager - .jobs() - .define("testcontainerAppsJob0") - .withRegion("East US") - .withExistingResourceGroup("rg") + manager.jobs().define("testcontainerAppsJob0").withRegion("East US").withExistingResourceGroup("rg") .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") - .withConfiguration( - new JobConfiguration() - .withTriggerType(TriggerType.EVENT) - .withReplicaTimeout(10) - .withReplicaRetryLimit(10) - .withEventTriggerConfig( - new JobConfigurationEventTriggerConfig() - .withReplicaCompletionCount(1) - .withParallelism(4) - .withScale( - new JobScale() - .withPollingInterval(40) - .withMinExecutions(1) - .withMaxExecutions(5) - .withRules( - Arrays - .asList( - new JobScaleRule() - .withName("servicebuscalingrule") - .withType("azure-servicebus") - .withMetadata( - SerializerFactory - .createDefaultManagementSerializerAdapter() - .deserialize( - "{\"topicName\":\"my-topic\"}", - Object.class, - SerializerEncoding.JSON))))))) - .withTemplate( - new JobTemplate() - .withInitContainers( - Arrays - .asList( - new InitContainer() - .withImage("repo/testcontainerAppsJob0:v4") - .withName("testinitcontainerAppsJob0") - .withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers( - Arrays - .asList( - new Container() - .withImage("repo/testcontainerAppsJob0:v1") - .withName("testcontainerAppsJob0")))) + .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.EVENT).withReplicaTimeout(10) + .withReplicaRetryLimit(10).withEventTriggerConfig( + new JobConfigurationEventTriggerConfig().withReplicaCompletionCount(1).withParallelism(4) + .withScale(new JobScale().withPollingInterval(40).withMinExecutions(1).withMaxExecutions(5) + .withRules(Arrays.asList(new JobScaleRule().withName("servicebuscalingrule") + .withType("azure-servicebus") + .withMetadata(SerializerFactory.createDefaultManagementSerializerAdapter().deserialize( + "{\"topicName\":\"my-topic\"}", Object.class, SerializerEncoding.JSON))))))) + .withTemplate(new JobTemplate() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") + .withName("testinitcontainerAppsJob0").withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers(Arrays.asList( + new Container().withImage("repo/testcontainerAppsJob0:v1").withName("testcontainerAppsJob0")))) .create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_CreateorUpdate.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_CreateorUpdate.json */ /** * Sample code: Create or Update Container Apps Job. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateContainerAppsJob( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .jobs() - .define("testcontainerAppsJob0") - .withRegion("East US") - .withExistingResourceGroup("rg") + public static void + createOrUpdateContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.jobs().define("testcontainerAppsJob0").withRegion("East US").withExistingResourceGroup("rg") .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") - .withConfiguration( - new JobConfiguration() - .withTriggerType(TriggerType.MANUAL) - .withReplicaTimeout(10) - .withReplicaRetryLimit(10) - .withManualTriggerConfig( - new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1).withParallelism(4))) + .withConfiguration(new JobConfiguration().withTriggerType(TriggerType.MANUAL).withReplicaTimeout(10) + .withReplicaRetryLimit(10).withManualTriggerConfig( + new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(1).withParallelism(4))) .withTemplate( new JobTemplate() - .withInitContainers( - Arrays - .asList( - new InitContainer() - .withImage("repo/testcontainerAppsJob0:v4") - .withName("testinitcontainerAppsJob0") - .withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers( - Arrays - .asList( - new Container() - .withImage("repo/testcontainerAppsJob0:v1") - .withName("testcontainerAppsJob0") - .withProbes( - Arrays - .asList( - new ContainerAppProbe() - .withHttpGet( - new ContainerAppProbeHttpGet() - .withHttpHeaders( - Arrays - .asList( - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header") - .withValue("Awesome"))) - .withPath("/health") - .withPort(8080)) - .withInitialDelaySeconds(5) - .withPeriodSeconds(3) - .withType(Type.LIVENESS)))))) + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") + .withName("testinitcontainerAppsJob0").withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers(Arrays.asList( + new Container().withImage("repo/testcontainerAppsJob0:v1").withName("testcontainerAppsJob0") + .withVolumeMounts(Arrays.asList( + new VolumeMount().withVolumeName("azurefile").withMountPath("/mnt/path1") + .withSubPath("subPath1"), + new VolumeMount().withVolumeName("nfsazurefile").withMountPath("/mnt/path2") + .withSubPath("subPath2"))) + .withProbes(Arrays.asList(new ContainerAppProbe() + .withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() + .withName("Custom-Header").withValue("Awesome"))) + .withPath("/health").withPort(8080)) + .withInitialDelaySeconds(5).withPeriodSeconds(3).withType(Type.LIVENESS)))))) .create(); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteSamples.java index 871bcabeac07..adbc35d15d39 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for Jobs Delete. */ +/** + * Samples for Jobs Delete. + */ public final class JobsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Delete.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Delete.json */ /** * Sample code: Delete Container Apps Job. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListSamples.java index e4c7ee3ca564..d608b6272ac6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListSamples.java @@ -4,18 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for JobsExecutions List. */ +/** + * Samples for JobsExecutions List. + */ public final class JobsExecutionsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Executions_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Executions_Get.json */ /** * Sample code: Get a Container Apps Job Executions. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getAContainerAppsJobExecutions( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + getAContainerAppsJobExecutions(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.jobsExecutions().list("rg", "testcontainerAppsJob0", null, com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetByResourceGroupSamples.java index a874e1884680..88d2cd99f834 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetByResourceGroupSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for Jobs GetByResourceGroup. */ +/** + * Samples for Jobs GetByResourceGroup. + */ public final class JobsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Get.json */ /** * Sample code: Get Container Apps Job. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorSamples.java new file mode 100644 index 000000000000..65f1e6c3572f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsGetDetectorSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for Jobs GetDetector. + */ +public final class JobsGetDetectorSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_GetDetector.json + */ + /** + * Sample code: Get diagnostic data for a Container App Job. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + getDiagnosticDataForAContainerAppJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.jobs().getDetectorWithResponse("mikono-workerapp-test-rg", "mikonojob1", "containerappjobnetworkIO", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListByResourceGroupSamples.java index cc7de8ef684d..f3acaca0fca4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListByResourceGroupSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for Jobs ListByResourceGroup. */ +/** + * Samples for Jobs ListByResourceGroup. + */ public final class JobsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Jobs_ListByResourceGroup.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Jobs_ListByResourceGroup. + * json */ /** * Sample code: List Container Apps Jobs by resource group. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listContainerAppsJobsByResourceGroup( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + listContainerAppsJobsByResourceGroup(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.jobs().listByResourceGroup("rg", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsSamples.java new file mode 100644 index 000000000000..1e6c6e1ad05a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListDetectorsSamples.java @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for Jobs ListDetectors. + */ +public final class JobsListDetectorsSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_ListDetectors.json + */ + /** + * Sample code: Get the list of available diagnostic data for a Container App Job. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getTheListOfAvailableDiagnosticDataForAContainerAppJob( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.jobs().listDetectorsWithResponse("mikono-workerapp-test-rg", "mikonojob1", + com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSamples.java index 0e97b2fc3b37..38f404904c35 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSamples.java @@ -4,18 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for Jobs List. */ +/** + * Samples for Jobs List. + */ public final class JobsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Jobs_ListBySubscription.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Jobs_ListBySubscription.json */ /** * Sample code: List Container Apps Jobs by subscription. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listContainerAppsJobsBySubscription( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + listContainerAppsJobsBySubscription(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.jobs().list(com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSecretsSamples.java index 6c143787f249..eb374d2565e7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSecretsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsListSecretsSamples.java @@ -4,18 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for Jobs ListSecrets. */ +/** + * Samples for Jobs ListSecrets. + */ public final class JobsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_ListSecrets.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_ListSecrets.json */ /** * Sample code: List Container Apps Job Secrets. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listContainerAppsJobSecrets( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + listContainerAppsJobSecrets(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.jobs().listSecretsWithResponse("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsProxyGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsProxyGetSamples.java new file mode 100644 index 000000000000..7689e17cb912 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsProxyGetSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for Jobs ProxyGet. + */ +public final class JobsProxyGetSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_ProxyGet.json + */ + /** + * Sample code: Get Container App Job by name. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + getContainerAppJobByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.jobs().proxyGetWithResponse("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStartSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStartSamples.java index f816938a3c82..7eb3ce57b300 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStartSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStartSamples.java @@ -9,39 +9,29 @@ import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; import java.util.Arrays; -/** Samples for Jobs Start. */ +/** + * Samples for Jobs Start. + */ public final class JobsStartSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Start.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Start.json */ /** * Sample code: Run a Container Apps Job. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void runAContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .jobs() - .start( - "rg", - "testcontainerAppsJob0", - new JobExecutionTemplate() - .withContainers( - Arrays - .asList( - new JobExecutionContainer() - .withImage("repo/testcontainerAppsJob0:v4") - .withName("testcontainerAppsJob0") - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withInitContainers( - Arrays - .asList( - new JobExecutionContainer() - .withImage("repo/testcontainerAppsJob0:v4") - .withName("testinitcontainerAppsJob0") - .withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))), - com.azure.core.util.Context.NONE); + manager.jobs().start("rg", "testcontainerAppsJob0", + new JobExecutionTemplate() + .withContainers(Arrays.asList(new JobExecutionContainer().withImage("repo/testcontainerAppsJob0:v4") + .withName("testcontainerAppsJob0") + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withInitContainers(Arrays.asList(new JobExecutionContainer().withImage("repo/testcontainerAppsJob0:v4") + .withName("testinitcontainerAppsJob0").withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))), + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionSamples.java index bdc43bc3fe75..6e30a009efb6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionSamples.java @@ -4,18 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for Jobs StopExecution. */ +/** + * Samples for Jobs StopExecution. + */ public final class JobsStopExecutionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Stop_Execution.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Stop_Execution.json */ /** * Sample code: Terminate a Container Apps Job. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void terminateAContainerAppsJob( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + terminateAContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.jobs().stopExecution("rg", "testcontainerAppsJob0", "jobExecution1", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsSamples.java index cdd0821a101d..c5f1536f64b7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsSamples.java @@ -4,18 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for Jobs StopMultipleExecutions. */ +/** + * Samples for Jobs StopMultipleExecutions. + */ public final class JobsStopMultipleExecutionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Stop_Multiple.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Stop_Multiple.json */ /** * Sample code: Terminate Multiple Container Apps Job. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void terminateMultipleContainerAppsJob( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + terminateMultipleContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.jobs().stopMultipleExecutions("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsUpdateSamples.java index 6d27fb4dbcd3..5df4e0970387 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/JobsUpdateSamples.java @@ -19,69 +19,43 @@ import com.azure.resourcemanager.appcontainers.models.Type; import java.util.Arrays; -/** Samples for Jobs Update. */ +/** + * Samples for Jobs Update. + */ public final class JobsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Patch.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Patch.json */ /** * Sample code: Patch Container Apps Job. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void patchContainerAppsJob(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - Job resource = - manager - .jobs() - .getByResourceGroupWithResponse("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE) - .getValue(); - resource - .update() + Job resource = manager.jobs() + .getByResourceGroupWithResponse("rg", "testcontainerAppsJob0", com.azure.core.util.Context.NONE).getValue(); + resource.update() .withProperties( new JobPatchPropertiesProperties() .withConfiguration( - new JobConfiguration() - .withTriggerType(TriggerType.MANUAL) - .withReplicaTimeout(10) + new JobConfiguration().withTriggerType(TriggerType.MANUAL).withReplicaTimeout(10) .withReplicaRetryLimit(10) - .withManualTriggerConfig( - new JobConfigurationManualTriggerConfig() - .withReplicaCompletionCount(1) - .withParallelism(4))) - .withTemplate( - new JobTemplate() - .withInitContainers( - Arrays - .asList( - new InitContainer() - .withImage("repo/testcontainerAppsJob0:v4") - .withName("testinitcontainerAppsJob0") - .withCommand(Arrays.asList("/bin/sh")) - .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) - .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) - .withContainers( - Arrays - .asList( - new Container() - .withImage("repo/testcontainerAppsJob0:v1") - .withName("testcontainerAppsJob0") - .withProbes( - Arrays - .asList( - new ContainerAppProbe() - .withHttpGet( - new ContainerAppProbeHttpGet() - .withHttpHeaders( - Arrays - .asList( - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header") - .withValue("Awesome"))) - .withPath("/health") - .withPort(8080)) - .withInitialDelaySeconds(3) - .withPeriodSeconds(3) - .withType(Type.LIVENESS))))))) + .withManualTriggerConfig(new JobConfigurationManualTriggerConfig() + .withReplicaCompletionCount(1).withParallelism(4))) + .withTemplate(new JobTemplate() + .withInitContainers(Arrays.asList(new InitContainer().withImage("repo/testcontainerAppsJob0:v4") + .withName("testinitcontainerAppsJob0").withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers(Arrays.asList( + new Container().withImage("repo/testcontainerAppsJob0:v1").withName("testcontainerAppsJob0") + .withProbes(Arrays.asList(new ContainerAppProbe() + .withHttpGet(new ContainerAppProbeHttpGet() + .withHttpHeaders(Arrays.asList(new ContainerAppProbeHttpGetHttpHeadersItem() + .withName("Custom-Header").withValue("Awesome"))) + .withPath("/health").withPort(8080)) + .withInitialDelaySeconds(3).withPeriodSeconds(3).withType(Type.LIVENESS))))))) .apply(); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesCreateOrUpdateSamples.java index 4edc4b3c8106..f882f117bc9b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesCreateOrUpdateSamples.java @@ -7,27 +7,25 @@ import com.azure.resourcemanager.appcontainers.models.ManagedCertificateDomainControlValidation; import com.azure.resourcemanager.appcontainers.models.ManagedCertificateProperties; -/** Samples for ManagedCertificates CreateOrUpdate. */ +/** + * Samples for ManagedCertificates CreateOrUpdate. + */ public final class ManagedCertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedCertificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateCertificate( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedCertificates() - .define("certificate-firendly-name") - .withRegion("East US") + public static void + createOrUpdateCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedCertificates().define("certificate-firendly-name").withRegion("East US") .withExistingManagedEnvironment("examplerg", "testcontainerenv") - .withProperties( - new ManagedCertificateProperties() - .withSubjectName("my-subject-name.company.country.net") - .withDomainControlValidation(ManagedCertificateDomainControlValidation.CNAME)) + .withProperties(new ManagedCertificateProperties().withSubjectName("my-subject-name.company.country.net") + .withDomainControlValidation(ManagedCertificateDomainControlValidation.CNAME)) .create(); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteSamples.java index ca06075abb5a..8b8e43d5d96f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ManagedCertificates Delete. */ +/** + * Samples for ManagedCertificates Delete. + */ public final class ManagedCertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificate_Delete.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedCertificate_Delete. + * json */ /** * Sample code: Delete Certificate. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedCertificates() - .deleteWithResponse( - "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); + manager.managedCertificates().deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesGetSamples.java index 103bf88d5671..f4b3b720cec9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesGetSamples.java @@ -4,20 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ManagedCertificates Get. */ +/** + * Samples for ManagedCertificates Get. + */ public final class ManagedCertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificate_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedCertificate_Get.json */ /** * Sample code: Get Certificate. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedCertificates() - .getWithResponse( - "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE); + manager.managedCertificates().getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesListSamples.java index 41123accf3f8..023edcf36856 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ManagedCertificates List. */ +/** + * Samples for ManagedCertificates List. + */ public final class ManagedCertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificates_ListByManagedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedCertificates_ListByManagedEnvironment.json */ /** * Sample code: List Managed Certificates by Managed Environment. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void listManagedCertificatesByManagedEnvironment( diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java index f2a73091a95c..ea61d5155a30 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesUpdateSamples.java @@ -8,24 +8,24 @@ import java.util.HashMap; import java.util.Map; -/** Samples for ManagedCertificates Update. */ +/** + * Samples for ManagedCertificates Update. + */ public final class ManagedCertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedCertificates_Patch.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedCertificates_Patch. + * json */ /** * Sample code: Patch Managed Certificate. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void patchManagedCertificate( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - ManagedCertificate resource = - manager - .managedCertificates() - .getWithResponse( - "examplerg", "testcontainerenv", "certificate-firendly-name", com.azure.core.util.Context.NONE) - .getValue(); + public static void + patchManagedCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + ManagedCertificate resource = manager.managedCertificates().getWithResponse("examplerg", "testcontainerenv", + "certificate-firendly-name", com.azure.core.util.Context.NONE).getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } 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 87b75b6d922e..16f3d636e98c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java @@ -4,24 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ManagedEnvironmentDiagnostics GetDetector. */ +/** + * Samples for ManagedEnvironmentDiagnostics GetDetector. + */ public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentDiagnostics_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironmentDiagnostics_Get.json */ /** * Sample code: Get diagnostic data for a managed environments. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getDiagnosticDataForAManagedEnvironments( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironmentDiagnostics() - .getDetectorWithResponse( - "mikono-workerapp-test-rg", - "mikonokubeenv", - "ManagedEnvAvailabilityMetrics", - com.azure.core.util.Context.NONE); + manager.managedEnvironmentDiagnostics().getDetectorWithResponse("mikono-workerapp-test-rg", "mikonokubeenv", + "ManagedEnvAvailabilityMetrics", com.azure.core.util.Context.NONE); } } 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 f7704984eafd..d937a8063ec3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ManagedEnvironmentDiagnostics ListDetectors. */ +/** + * Samples for ManagedEnvironmentDiagnostics ListDetectors. + */ public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentDiagnostics_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironmentDiagnostics_List.json */ /** * Sample code: Get the list of available diagnostic data for a managed environments. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getTheListOfAvailableDiagnosticDataForAManagedEnvironments( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironmentDiagnostics() - .listDetectorsWithResponse("mikono-workerapp-test-rg", "mikonokubeenv", com.azure.core.util.Context.NONE); + manager.managedEnvironmentDiagnostics().listDetectorsWithResponse("mikono-workerapp-test-rg", "mikonokubeenv", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListSamples.java new file mode 100644 index 000000000000..2ea15dbc55ef --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentUsagesListSamples.java @@ -0,0 +1,24 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for ManagedEnvironmentUsages List. + */ +public final class ManagedEnvironmentUsagesListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironmentUsages_List.json + */ + /** + * Sample code: List managed environment usages. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + listManagedEnvironmentUsages(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironmentUsages().list("examplerg", "jlaw-demo1", com.azure.core.util.Context.NONE); + } +} 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 05df7f2c4a9c..63a5901ef0b0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsCreateOrUpdateSamples.java @@ -4,122 +4,130 @@ package com.azure.resourcemanager.appcontainers.generated; +import com.azure.resourcemanager.appcontainers.models.AppInsightsConfiguration; import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; +import com.azure.resourcemanager.appcontainers.models.DataDogConfiguration; +import com.azure.resourcemanager.appcontainers.models.DestinationsConfiguration; +import com.azure.resourcemanager.appcontainers.models.Header; import com.azure.resourcemanager.appcontainers.models.LogAnalyticsConfiguration; +import com.azure.resourcemanager.appcontainers.models.LogsConfiguration; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentPropertiesPeerAuthentication; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; +import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; +import com.azure.resourcemanager.appcontainers.models.MetricsConfiguration; import com.azure.resourcemanager.appcontainers.models.Mtls; +import com.azure.resourcemanager.appcontainers.models.OpenTelemetryConfiguration; +import com.azure.resourcemanager.appcontainers.models.OtlpConfiguration; +import com.azure.resourcemanager.appcontainers.models.TracesConfiguration; +import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; -/** Samples for ManagedEnvironments CreateOrUpdate. */ +/** + * Samples for ManagedEnvironments CreateOrUpdate. + */ public final class ManagedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironments_CustomInfrastructureResourceGroup_Create.json */ /** * Sample code: Create environment with custom infrastructureResourceGroup. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void createEnvironmentWithCustomInfrastructureResourceGroup( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironments() - .define("testcontainerenv") - .withRegion("East US") + manager.managedEnvironments().define("testcontainerenv").withRegion("East US") .withExistingResourceGroup("examplerg") .withDaprAIConnectionString( "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") - .withVnetConfiguration( - new VnetConfiguration() - .withInfrastructureSubnetId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1")) - .withAppLogsConfiguration( - new AppLogsConfiguration() - .withLogAnalyticsConfiguration( - new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("fakeTokenPlaceholder"))) + .withVnetConfiguration(new VnetConfiguration().withInfrastructureSubnetId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1")) + .withAppLogsConfiguration(new AppLogsConfiguration().withLogAnalyticsConfiguration( + new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("fakeTokenPlaceholder"))) .withZoneRedundant(true) - .withCustomDomainConfiguration( - new CustomDomainConfiguration() - .withDnsSuffix("www.my-name.com") - .withCertificateValue("Y2VydA==".getBytes()) - .withCertificatePassword("fakeTokenPlaceholder")) - .withWorkloadProfiles( - Arrays - .asList( - new WorkloadProfile() - .withName("My-GP-01") - .withWorkloadProfileType("GeneralPurpose") - .withMinimumCount(3) - .withMaximumCount(12), - new WorkloadProfile() - .withName("My-MO-01") - .withWorkloadProfileType("MemoryOptimized") - .withMinimumCount(3) - .withMaximumCount(6), - new WorkloadProfile() - .withName("My-CO-01") - .withWorkloadProfileType("ComputeOptimized") - .withMinimumCount(3) - .withMaximumCount(6), - new WorkloadProfile().withName("My-consumption-01").withWorkloadProfileType("Consumption"))) - .withInfrastructureResourceGroup("myInfrastructureRgName") - .create(); + .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("www.my-name.com") + .withCertificateValue("Y2VydA==".getBytes()).withCertificatePassword("fakeTokenPlaceholder")) + .withWorkloadProfiles(Arrays.asList( + new WorkloadProfile().withName("My-GP-01").withWorkloadProfileType("GeneralPurpose").withMinimumCount(3) + .withMaximumCount(12), + new WorkloadProfile().withName("My-MO-01").withWorkloadProfileType("MemoryOptimized") + .withMinimumCount(3).withMaximumCount(6), + new WorkloadProfile().withName("My-CO-01").withWorkloadProfileType("ComputeOptimized") + .withMinimumCount(3).withMaximumCount(6), + new WorkloadProfile().withName("My-consumption-01").withWorkloadProfileType("Consumption"))) + .withInfrastructureResourceGroup("myInfrastructureRgName").create(); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create environments. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void createEnvironments(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironments() - .define("testcontainerenv") - .withRegion("East US") + manager.managedEnvironments().define("testcontainerenv").withRegion("East US") .withExistingResourceGroup("examplerg") + .withIdentity(new ManagedServiceIdentity() + .withType(ManagedServiceIdentityType.fromString("SystemAssigned, UserAssigned")) + .withUserAssignedIdentities(mapOf( + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/contoso-resources/providers/Microsoft.ManagedIdentity/userAssignedIdentities/contoso-identity", + new UserAssignedIdentity()))) .withDaprAIConnectionString( "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") - .withVnetConfiguration( - new VnetConfiguration() - .withInfrastructureSubnetId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1")) + .withVnetConfiguration(new VnetConfiguration().withInfrastructureSubnetId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/RGName/providers/Microsoft.Network/virtualNetworks/VNetName/subnets/subnetName1")) .withAppLogsConfiguration( - new AppLogsConfiguration() - .withLogAnalyticsConfiguration( - new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("fakeTokenPlaceholder"))) + new AppLogsConfiguration().withLogAnalyticsConfiguration(new LogAnalyticsConfiguration() + .withCustomerId("string").withSharedKey("fakeTokenPlaceholder").withDynamicJsonColumns(true))) + .withAppInsightsConfiguration(new AppInsightsConfiguration().withConnectionString( + "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://eastus-8.in.applicationinsights.azure.com/;LiveEndpoint=https://eastus.livediagnostics.monitor.azure.com/")) + .withOpenTelemetryConfiguration( + new OpenTelemetryConfiguration() + .withDestinationsConfiguration( + new DestinationsConfiguration() + .withDataDogConfiguration( + new DataDogConfiguration().withSite("string").withKey("fakeTokenPlaceholder")) + .withOtlpConfigurations(Arrays.asList(new OtlpConfiguration().withName("dashboard") + .withEndpoint("dashboard.k8s.region.azurecontainerapps.io:80").withInsecure(true) + .withHeaders(Arrays + .asList(new Header().withKey("fakeTokenPlaceholder").withValue("xxxxxxxxxxx")))))) + .withTracesConfiguration(new TracesConfiguration().withDestinations(Arrays.asList("appInsights"))) + .withLogsConfiguration(new LogsConfiguration().withDestinations(Arrays.asList("appInsights"))) + .withMetricsConfiguration(new MetricsConfiguration().withDestinations(Arrays.asList("dataDog")))) .withZoneRedundant(true) - .withCustomDomainConfiguration( - new CustomDomainConfiguration() - .withDnsSuffix("www.my-name.com") - .withCertificateValue("Y2VydA==".getBytes()) - .withCertificatePassword("fakeTokenPlaceholder")) - .withWorkloadProfiles( - Arrays - .asList( - new WorkloadProfile() - .withName("My-GP-01") - .withWorkloadProfileType("GeneralPurpose") - .withMinimumCount(3) - .withMaximumCount(12), - new WorkloadProfile() - .withName("My-MO-01") - .withWorkloadProfileType("MemoryOptimized") - .withMinimumCount(3) - .withMaximumCount(6), - new WorkloadProfile() - .withName("My-CO-01") - .withWorkloadProfileType("ComputeOptimized") - .withMinimumCount(3) - .withMaximumCount(6), - new WorkloadProfile().withName("My-consumption-01").withWorkloadProfileType("Consumption"))) + .withCustomDomainConfiguration(new CustomDomainConfiguration().withDnsSuffix("www.my-name.com") + .withCertificateValue("Y2VydA==".getBytes()).withCertificatePassword("fakeTokenPlaceholder")) + .withWorkloadProfiles(Arrays.asList( + new WorkloadProfile().withName("My-GP-01").withWorkloadProfileType("GeneralPurpose").withMinimumCount(3) + .withMaximumCount(12), + new WorkloadProfile().withName("My-MO-01").withWorkloadProfileType("MemoryOptimized") + .withMinimumCount(3).withMaximumCount(6), + new WorkloadProfile().withName("My-CO-01").withWorkloadProfileType("ComputeOptimized") + .withMinimumCount(3).withMaximumCount(6), + new WorkloadProfile().withName("My-consumption-01").withWorkloadProfileType("Consumption"))) .withPeerAuthentication( new ManagedEnvironmentPropertiesPeerAuthentication().withMtls(new Mtls().withEnabled(true))) .create(); } + + // Use "Map.of" if available + @SuppressWarnings("unchecked") + private static Map mapOf(Object... inputs) { + Map map = new HashMap<>(); + for (int i = 0; i < inputs.length; i += 2) { + String key = (String) inputs[i]; + T value = (T) inputs[i + 1]; + map.put(key, value); + } + return map; + } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java index 054f73203210..792fcd02ba1b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java @@ -4,18 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ManagedEnvironments Delete. */ +/** + * Samples for ManagedEnvironments Delete. + */ public final class ManagedEnvironmentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_Delete.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_Delete. + * json */ /** * Sample code: Delete environment by name. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void deleteEnvironmentByName( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + deleteEnvironmentByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.managedEnvironments().delete("examplerg", "examplekenv", com.azure.core.util.Context.NONE); } } 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 ce30d1f23137..c91edbd63f5c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ManagedEnvironmentsDiagnostics GetRoot. */ +/** + * Samples for ManagedEnvironmentsDiagnostics GetRoot. + */ public final class ManagedEnvironmentsDiagnosticsGetRootSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getEnvironmentsByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironmentsDiagnostics() - .getRootWithResponse("examplerg", "jlaw-demo1", com.azure.core.util.Context.NONE); + manager.managedEnvironmentsDiagnostics().getRootWithResponse("examplerg", "jlaw-demo1", + com.azure.core.util.Context.NONE); } } 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 75360fb7b838..926cc10aa15a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java @@ -4,18 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ManagedEnvironments GetAuthToken. */ +/** + * Samples for ManagedEnvironments GetAuthToken. + */ public final class ManagedEnvironmentsGetAuthTokenSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_GetAuthToken.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironments_GetAuthToken.json */ /** * Sample code: Get Managed Environment Auth Token. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getManagedEnvironmentAuthToken( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + getManagedEnvironmentAuthToken(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.managedEnvironments().getAuthTokenWithResponse("rg", "testenv", com.azure.core.util.Context.NONE); } } 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 92cc0793165c..d39689f40a3e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetByResourceGroupSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ManagedEnvironments GetByResourceGroup. */ +/** + * Samples for ManagedEnvironments GetByResourceGroup. + */ public final class ManagedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getEnvironmentsByName(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironments() - .getByResourceGroupWithResponse("examplerg", "jlaw-demo1", com.azure.core.util.Context.NONE); + manager.managedEnvironments().getByResourceGroupWithResponse("examplerg", "jlaw-demo1", + com.azure.core.util.Context.NONE); } } 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 393cc7c3e5b0..636c6994929b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java @@ -4,18 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ManagedEnvironments ListByResourceGroup. */ +/** + * Samples for ManagedEnvironments ListByResourceGroup. + */ public final class ManagedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listEnvironmentsByResourceGroup( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + listEnvironmentsByResourceGroup(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.managedEnvironments().listByResourceGroup("examplerg", com.azure.core.util.Context.NONE); } } 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 f7411924aff8..7f5bbc059a51 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java @@ -4,18 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ManagedEnvironments List. */ +/** + * Samples for ManagedEnvironments List. + */ public final class ManagedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironments_ListBySubscription.json */ /** * Sample code: List environments by subscription. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listEnvironmentsBySubscription( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void + listEnvironmentsBySubscription(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.managedEnvironments().list(com.azure.core.util.Context.NONE); } } 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 307209c681a1..5d4406b86ef5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ManagedEnvironments ListWorkloadProfileStates. */ +/** + * Samples for ManagedEnvironments ListWorkloadProfileStates. + */ public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_ListWorkloadProfileStates.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironments_ListWorkloadProfileStates.json */ /** * Sample code: List environments by subscription. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listEnvironmentsBySubscription( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironments() - .listWorkloadProfileStates("examplerg", "jlaw-demo1", com.azure.core.util.Context.NONE); + public static void + listEnvironmentsBySubscription(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironments().listWorkloadProfileStates("examplerg", "jlaw-demo1", + com.azure.core.util.Context.NONE); } } 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 a9312d5fa604..852fb6975f71 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java @@ -7,31 +7,46 @@ import com.azure.resourcemanager.appcontainers.models.AccessMode; import com.azure.resourcemanager.appcontainers.models.AzureFileProperties; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorageProperties; +import com.azure.resourcemanager.appcontainers.models.NfsAzureFileProperties; -/** Samples for ManagedEnvironmentsStorages CreateOrUpdate. */ +/** + * Samples for ManagedEnvironmentsStorages CreateOrUpdate. + */ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironmentsStorages_CreateOrUpdate_NfsAzureFile.json */ /** - * Sample code: Create or update environments storage. - * + * Sample code: Create or update environments storage for NFS Azure file. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateEnvironmentsStorage( + public static void createOrUpdateEnvironmentsStorageForNFSAzureFile( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironmentsStorages() - .define("jlaw-demo1") + manager.managedEnvironmentsStorages().define("jlaw-demo1") + .withExistingManagedEnvironment("examplerg", "managedEnv") + .withProperties(new ManagedEnvironmentStorageProperties().withNfsAzureFile(new NfsAzureFileProperties() + .withServer("server1").withAccessMode(AccessMode.READ_ONLY).withShareName("share1"))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironmentsStorages_CreateOrUpdate.json + */ + /** + * Sample code: Create or update environments storage. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void + createOrUpdateEnvironmentsStorage(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironmentsStorages().define("jlaw-demo1") .withExistingManagedEnvironment("examplerg", "managedEnv") - .withProperties( - new ManagedEnvironmentStorageProperties() - .withAzureFile( - new AzureFileProperties() - .withAccountName("account1") - .withAccountKey("fakeTokenPlaceholder") - .withAccessMode(AccessMode.READ_ONLY) - .withShareName("share1"))) + .withProperties(new ManagedEnvironmentStorageProperties().withAzureFile( + new AzureFileProperties().withAccountName("account1").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 dd6296422fc5..34061a166d57 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ManagedEnvironmentsStorages Delete. */ +/** + * Samples for ManagedEnvironmentsStorages Delete. + */ public final class ManagedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironmentsStorages() - .deleteWithResponse("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE); + manager.managedEnvironmentsStorages().deleteWithResponse("examplerg", "managedEnv", "jlaw-demo1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java index 5e0eeb477f66..f9d1d3faefd6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java @@ -4,20 +4,37 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ManagedEnvironmentsStorages Get. */ +/** + * Samples for ManagedEnvironmentsStorages Get. + */ public final class ManagedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironmentsStorages_Get.json */ /** - * Sample code: get a environments storage properties by subscription. - * + * Sample code: get a environments storage. + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getAEnvironmentsStoragePropertiesBySubscription( + public static void + getAEnvironmentsStorage(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironmentsStorages().getWithResponse("examplerg", "managedEnv", "jlaw-demo1", + com.azure.core.util.Context.NONE); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironmentsStorages_Get_NfsAzureFile.json + */ + /** + * Sample code: get a environments storage for NFS Azure file. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getAEnvironmentsStorageForNFSAzureFile( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironmentsStorages() - .getWithResponse("examplerg", "managedEnv", "jlaw-demo1", com.azure.core.util.Context.NONE); + manager.managedEnvironmentsStorages().getWithResponse("examplerg", "managedEnv", "jlaw-demo1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java index 077dbf57477a..cbd1ab3dcc84 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java @@ -4,20 +4,22 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ManagedEnvironmentsStorages List. */ +/** + * Samples for ManagedEnvironmentsStorages List. + */ public final class ManagedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ManagedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void listEnvironmentsStoragesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .managedEnvironmentsStorages() - .listWithResponse("examplerg", "managedEnv", com.azure.core.util.Context.NONE); + manager.managedEnvironmentsStorages().listWithResponse("examplerg", "managedEnv", + com.azure.core.util.Context.NONE); } } 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 473995a4eb26..e9a594ae0cde 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java @@ -8,23 +8,25 @@ import java.util.HashMap; import java.util.Map; -/** Samples for ManagedEnvironments Update. */ +/** + * Samples for ManagedEnvironments Update. + */ public final class ManagedEnvironmentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ManagedEnvironments_Patch.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ManagedEnvironments_Patch. + * json */ /** * Sample code: Patch Managed Environment. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void patchManagedEnvironment( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - ManagedEnvironment resource = - manager - .managedEnvironments() - .getByResourceGroupWithResponse("examplerg", "testcontainerenv", com.azure.core.util.Context.NONE) - .getValue(); + public static void + patchManagedEnvironment(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + ManagedEnvironment resource = manager.managedEnvironments() + .getByResourceGroupWithResponse("examplerg", "testcontainerenv", com.azure.core.util.Context.NONE) + .getValue(); resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); } 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 8a68bc86390c..1b99e5ba28ab 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java @@ -6,45 +6,40 @@ import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -/** Samples for Namespaces CheckNameAvailability. */ +/** + * Samples for Namespaces CheckNameAvailability. + */ public final class NamespacesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Certificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * Certificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void certificatesCheckNameAvailability( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .namespaces() - .checkNameAvailabilityWithResponse( - "examplerg", - "testcontainerenv", - new CheckNameAvailabilityRequest() - .withName("testcertificatename") - .withType("Microsoft.App/managedEnvironments/certificates"), + public static void + certificatesCheckNameAvailability(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.namespaces() + .checkNameAvailabilityWithResponse("examplerg", "testcontainerenv", new CheckNameAvailabilityRequest() + .withName("testcertificatename").withType("Microsoft.App/managedEnvironments/certificates"), com.azure.core.util.Context.NONE); } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/ContainerApps_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * ContainerApps_CheckNameAvailability.json */ /** * Sample code: ContainerApps_CheckNameAvailability. - * + * * @param manager Entry point to ContainerAppsApiManager. */ - public static void containerAppsCheckNameAvailability( - com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .namespaces() - .checkNameAvailabilityWithResponse( - "examplerg", - "testcontainerenv", - new CheckNameAvailabilityRequest().withName("testcappname").withType("Microsoft.App/containerApps"), - com.azure.core.util.Context.NONE); + public static void + containerAppsCheckNameAvailability(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.namespaces().checkNameAvailabilityWithResponse("examplerg", "testcontainerenv", + new CheckNameAvailabilityRequest().withName("testcappname").withType("Microsoft.App/containerApps"), + com.azure.core.util.Context.NONE); } } 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 6453506f85a3..39f9f093e58c 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java @@ -4,14 +4,17 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for Operations List. */ +/** + * Samples for Operations List. + */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Operations_List.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Operations_List.json */ /** * Sample code: List all operations. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void listAllOperations(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderGetCustomDomainVerificationIdSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderGetCustomDomainVerificationIdSamples.java new file mode 100644 index 000000000000..9eb28ff02b83 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderGetCustomDomainVerificationIdSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for ResourceProvider GetCustomDomainVerificationId. + */ +public final class ResourceProviderGetCustomDomainVerificationIdSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/ + * Subscriptions_GetCustomDomainVerificationId.json + */ + /** + * Sample code: List all operations. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listAllOperations(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.resourceProviders().getCustomDomainVerificationIdWithResponse(com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderJobExecutionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderJobExecutionSamples.java index 1a03ed51d5e3..4d6c01ac8ef3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderJobExecutionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ResourceProviderJobExecutionSamples.java @@ -4,19 +4,21 @@ package com.azure.resourcemanager.appcontainers.generated; -/** Samples for ResourceProvider JobExecution. */ +/** + * Samples for ResourceProvider JobExecution. + */ public final class ResourceProviderJobExecutionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2023-05-01/examples/Job_Execution_Get.json + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Job_Execution_Get.json */ /** * Sample code: Get a single Job Execution. - * + * * @param manager Entry point to ContainerAppsApiManager. */ public static void getASingleJobExecution(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .resourceProviders() - .jobExecutionWithResponse("rg", "testcontainerAppsJob0", "jobExecution1", com.azure.core.util.Context.NONE); + manager.resourceProviders().jobExecutionWithResponse("rg", "testcontainerAppsJob0", "jobExecution1", + com.azure.core.util.Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/UsagesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/UsagesListSamples.java new file mode 100644 index 000000000000..0d9044862a1b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/UsagesListSamples.java @@ -0,0 +1,23 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +/** + * Samples for Usages List. + */ +public final class UsagesListSamples { + /* + * x-ms-original-file: + * specification/app/resource-manager/Microsoft.App/preview/2024-02-02-preview/examples/Usages_List.json + */ + /** + * Sample code: List usages. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listUsages(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.usages().list("westus", com.azure.core.util.Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.java deleted file mode 100644 index 5f3f4f48f868..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedAudiencesValidationTests.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.AllowedAudiencesValidation; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AllowedAudiencesValidationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AllowedAudiencesValidation model = - BinaryData - .fromString("{\"allowedAudiences\":[\"wzrlovmclwhij\",\"oejctbzaqsqsy\"]}") - .toObject(AllowedAudiencesValidation.class); - Assertions.assertEquals("wzrlovmclwhij", model.allowedAudiences().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllowedAudiencesValidation model = - new AllowedAudiencesValidation().withAllowedAudiences(Arrays.asList("wzrlovmclwhij", "oejctbzaqsqsy")); - model = BinaryData.fromObject(model).toObject(AllowedAudiencesValidation.class); - Assertions.assertEquals("wzrlovmclwhij", 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 72c21b159380..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AllowedPrincipalsTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AllowedPrincipals; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AllowedPrincipalsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AllowedPrincipals model = - BinaryData - .fromString("{\"groups\":[\"xhcr\",\"nohjt\"],\"identities\":[\"h\",\"soifiyipjxsqw\",\"gr\"]}") - .toObject(AllowedPrincipals.class); - Assertions.assertEquals("xhcr", model.groups().get(0)); - Assertions.assertEquals("h", model.identities().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AllowedPrincipals model = - new AllowedPrincipals() - .withGroups(Arrays.asList("xhcr", "nohjt")) - .withIdentities(Arrays.asList("h", "soifiyipjxsqw", "gr")); - model = BinaryData.fromObject(model).toObject(AllowedPrincipals.class); - Assertions.assertEquals("xhcr", model.groups().get(0)); - Assertions.assertEquals("h", model.identities().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigCollectionTests.java deleted file mode 100644 index 3f774f15d466..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthConfigCollectionTests.java +++ /dev/null @@ -1,364 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code 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.AllowedAudiencesValidation; -import com.azure.resourcemanager.appcontainers.models.AppRegistration; -import com.azure.resourcemanager.appcontainers.models.Apple; -import com.azure.resourcemanager.appcontainers.models.AppleRegistration; -import com.azure.resourcemanager.appcontainers.models.AuthConfigCollection; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -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.AzureStaticWebApps; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebAppsRegistration; -import com.azure.resourcemanager.appcontainers.models.ClientRegistration; -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.LoginScopes; -import com.azure.resourcemanager.appcontainers.models.Nonce; -import com.azure.resourcemanager.appcontainers.models.Twitter; -import com.azure.resourcemanager.appcontainers.models.TwitterRegistration; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class AuthConfigCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AuthConfigCollection model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"platform\":{\"enabled\":false,\"runtimeVersion\":\"gjxpybczmehmt\"},\"globalValidation\":{\"unauthenticatedClientAction\":\"Return403\",\"redirectToProvider\":\"phrupidgsybbejhp\",\"excludedPaths\":[\"cmsxaobhdxbm\"]},\"identityProviders\":{\"azureActiveDirectory\":{\"enabled\":false,\"registration\":{},\"login\":{},\"validation\":{},\"isAutoProvisioned\":false},\"facebook\":{\"enabled\":false,\"registration\":{},\"graphApiVersion\":\"ownoizhw\",\"login\":{}},\"gitHub\":{\"enabled\":false,\"registration\":{},\"login\":{}},\"google\":{\"enabled\":false,\"registration\":{},\"login\":{},\"validation\":{}},\"twitter\":{\"enabled\":true,\"registration\":{}},\"apple\":{\"enabled\":true,\"registration\":{},\"login\":{}},\"azureStaticWebApps\":{\"enabled\":false,\"registration\":{}},\"customOpenIdConnectProviders\":{\"nrbtcqqjnq\":{}}},\"login\":{\"routes\":{\"logoutEndpoint\":\"gnufoooj\"},\"preserveUrlFragmentsForLogins\":true,\"allowedExternalRedirectUrls\":[\"qes\"],\"cookieExpiration\":{\"convention\":\"IdentityProviderDerived\",\"timeToExpiration\":\"mglzlhj\"},\"nonce\":{\"validateNonce\":false,\"nonceExpirationInterval\":\"wmrvktsizntocipa\"}},\"httpSettings\":{\"requireHttps\":false,\"routes\":{\"apiPrefix\":\"qucmpo\"},\"forwardProxy\":{\"convention\":\"Standard\",\"customHostHeaderName\":\"ogknygjofjdd\",\"customProtoHeaderName\":\"s\"}}},\"id\":\"eupewnwreitjz\",\"name\":\"flusarhmof\",\"type\":\"qhsmyurkdtml\"},{\"properties\":{\"platform\":{\"enabled\":true,\"runtimeVersion\":\"sjtxukcdmp\"},\"globalValidation\":{\"unauthenticatedClientAction\":\"Return403\",\"redirectToProvider\":\"uanzwuxzdx\",\"excludedPaths\":[\"rlhm\",\"hfpmrqobmtukknr\",\"rtihfxtijbpz\",\"gnwzsymglzufc\"]},\"identityProviders\":{\"azureActiveDirectory\":{\"enabled\":false,\"registration\":{},\"login\":{},\"validation\":{},\"isAutoProvisioned\":true},\"facebook\":{\"enabled\":false,\"registration\":{},\"graphApiVersion\":\"cbjy\",\"login\":{}},\"gitHub\":{\"enabled\":false,\"registration\":{},\"login\":{}},\"google\":{\"enabled\":true,\"registration\":{},\"login\":{},\"validation\":{}},\"twitter\":{\"enabled\":true,\"registration\":{}},\"apple\":{\"enabled\":false,\"registration\":{},\"login\":{}},\"azureStaticWebApps\":{\"enabled\":false,\"registration\":{}},\"customOpenIdConnectProviders\":{\"uhivyqniw\":{}}},\"login\":{\"routes\":{\"logoutEndpoint\":\"k\"},\"preserveUrlFragmentsForLogins\":true,\"allowedExternalRedirectUrls\":[\"jgrtfwvukxga\"],\"cookieExpiration\":{\"convention\":\"FixedTime\",\"timeToExpiration\":\"nhsjcnyej\"},\"nonce\":{\"validateNonce\":true,\"nonceExpirationInterval\":\"tnapczwlokjyemkk\"}},\"httpSettings\":{\"requireHttps\":true,\"routes\":{\"apiPrefix\":\"xzjnchgejs\"},\"forwardProxy\":{\"convention\":\"Custom\",\"customHostHeaderName\":\"ilzyd\",\"customProtoHeaderName\":\"o\"}}},\"id\":\"yahux\",\"name\":\"npmqnjaqwixjspro\",\"type\":\"vcputegj\"},{\"properties\":{\"platform\":{\"enabled\":false,\"runtimeVersion\":\"t\"},\"globalValidation\":{\"unauthenticatedClientAction\":\"Return403\",\"redirectToProvider\":\"pjhulsuuvmkj\",\"excludedPaths\":[\"rwfndiod\"]},\"identityProviders\":{\"azureActiveDirectory\":{\"enabled\":false,\"registration\":{},\"login\":{},\"validation\":{},\"isAutoProvisioned\":true},\"facebook\":{\"enabled\":true,\"registration\":{},\"graphApiVersion\":\"psoacctazakljl\",\"login\":{}},\"gitHub\":{\"enabled\":true,\"registration\":{},\"login\":{}},\"google\":{\"enabled\":false,\"registration\":{},\"login\":{},\"validation\":{}},\"twitter\":{\"enabled\":false,\"registration\":{}},\"apple\":{\"enabled\":true,\"registration\":{},\"login\":{}},\"azureStaticWebApps\":{\"enabled\":true,\"registration\":{}},\"customOpenIdConnectProviders\":{\"jhcrz\":{},\"vdphlxaolthqtr\":{},\"qjbpfzfsin\":{},\"gvfcj\":{}}},\"login\":{\"routes\":{\"logoutEndpoint\":\"xxjtfe\"},\"preserveUrlFragmentsForLogins\":true,\"allowedExternalRedirectUrls\":[\"zitonpeqfpjkjl\",\"ofpdvh\"],\"cookieExpiration\":{\"convention\":\"IdentityProviderDerived\",\"timeToExpiration\":\"pini\"},\"nonce\":{\"validateNonce\":true,\"nonceExpirationInterval\":\"uybbkpodep\"}},\"httpSettings\":{\"requireHttps\":true,\"routes\":{\"apiPrefix\":\"vamih\"},\"forwardProxy\":{\"convention\":\"Custom\",\"customHostHeaderName\":\"rxzxtheo\",\"customProtoHeaderName\":\"si\"}}},\"id\":\"evcciqihnhun\",\"name\":\"bwjzr\",\"type\":\"fygxgispemvtzfk\"}],\"nextLink\":\"ubljofxqe\"}") - .toObject(AuthConfigCollection.class); - Assertions.assertEquals(false, model.value().get(0).platform().enabled()); - Assertions.assertEquals("gjxpybczmehmt", model.value().get(0).platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.RETURN403, - model.value().get(0).globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("phrupidgsybbejhp", model.value().get(0).globalValidation().redirectToProvider()); - Assertions.assertEquals("cmsxaobhdxbm", model.value().get(0).globalValidation().excludedPaths().get(0)); - Assertions.assertEquals(false, model.value().get(0).identityProviders().azureActiveDirectory().enabled()); - Assertions - .assertEquals(false, model.value().get(0).identityProviders().azureActiveDirectory().isAutoProvisioned()); - Assertions.assertEquals(false, model.value().get(0).identityProviders().facebook().enabled()); - Assertions.assertEquals("ownoizhw", model.value().get(0).identityProviders().facebook().graphApiVersion()); - Assertions.assertEquals(false, model.value().get(0).identityProviders().gitHub().enabled()); - Assertions.assertEquals(false, model.value().get(0).identityProviders().google().enabled()); - Assertions.assertEquals(true, model.value().get(0).identityProviders().twitter().enabled()); - Assertions.assertEquals(true, model.value().get(0).identityProviders().apple().enabled()); - Assertions.assertEquals(false, model.value().get(0).identityProviders().azureStaticWebApps().enabled()); - Assertions.assertEquals("gnufoooj", model.value().get(0).login().routes().logoutEndpoint()); - Assertions.assertEquals(true, model.value().get(0).login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals("qes", model.value().get(0).login().allowedExternalRedirectUrls().get(0)); - Assertions - .assertEquals( - CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED, - model.value().get(0).login().cookieExpiration().convention()); - Assertions.assertEquals("mglzlhj", model.value().get(0).login().cookieExpiration().timeToExpiration()); - Assertions.assertEquals(false, model.value().get(0).login().nonce().validateNonce()); - Assertions.assertEquals("wmrvktsizntocipa", model.value().get(0).login().nonce().nonceExpirationInterval()); - Assertions.assertEquals(false, model.value().get(0).httpSettings().requireHttps()); - Assertions.assertEquals("qucmpo", model.value().get(0).httpSettings().routes().apiPrefix()); - Assertions - .assertEquals( - ForwardProxyConvention.STANDARD, model.value().get(0).httpSettings().forwardProxy().convention()); - Assertions - .assertEquals("ogknygjofjdd", model.value().get(0).httpSettings().forwardProxy().customHostHeaderName()); - Assertions.assertEquals("s", model.value().get(0).httpSettings().forwardProxy().customProtoHeaderName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AuthConfigCollection model = - new AuthConfigCollection() - .withValue( - Arrays - .asList( - new AuthConfigInner() - .withPlatform(new AuthPlatform().withEnabled(false).withRuntimeVersion("gjxpybczmehmt")) - .withGlobalValidation( - new GlobalValidation() - .withUnauthenticatedClientAction(UnauthenticatedClientActionV2.RETURN403) - .withRedirectToProvider("phrupidgsybbejhp") - .withExcludedPaths(Arrays.asList("cmsxaobhdxbm"))) - .withIdentityProviders( - new IdentityProviders() - .withAzureActiveDirectory( - new AzureActiveDirectory() - .withEnabled(false) - .withRegistration(new AzureActiveDirectoryRegistration()) - .withLogin(new AzureActiveDirectoryLogin()) - .withValidation(new AzureActiveDirectoryValidation()) - .withIsAutoProvisioned(false)) - .withFacebook( - new Facebook() - .withEnabled(false) - .withRegistration(new AppRegistration()) - .withGraphApiVersion("ownoizhw") - .withLogin(new LoginScopes())) - .withGitHub( - new GitHub() - .withEnabled(false) - .withRegistration(new ClientRegistration()) - .withLogin(new LoginScopes())) - .withGoogle( - new Google() - .withEnabled(false) - .withRegistration(new ClientRegistration()) - .withLogin(new LoginScopes()) - .withValidation(new AllowedAudiencesValidation())) - .withTwitter( - new Twitter().withEnabled(true).withRegistration(new TwitterRegistration())) - .withApple( - new Apple() - .withEnabled(true) - .withRegistration(new AppleRegistration()) - .withLogin(new LoginScopes())) - .withAzureStaticWebApps( - new AzureStaticWebApps() - .withEnabled(false) - .withRegistration(new AzureStaticWebAppsRegistration())) - .withCustomOpenIdConnectProviders( - mapOf("nrbtcqqjnq", new CustomOpenIdConnectProvider()))) - .withLogin( - new Login() - .withRoutes(new LoginRoutes().withLogoutEndpoint("gnufoooj")) - .withPreserveUrlFragmentsForLogins(true) - .withAllowedExternalRedirectUrls(Arrays.asList("qes")) - .withCookieExpiration( - new CookieExpiration() - .withConvention(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED) - .withTimeToExpiration("mglzlhj")) - .withNonce( - new Nonce() - .withValidateNonce(false) - .withNonceExpirationInterval("wmrvktsizntocipa"))) - .withHttpSettings( - new HttpSettings() - .withRequireHttps(false) - .withRoutes(new HttpSettingsRoutes().withApiPrefix("qucmpo")) - .withForwardProxy( - new ForwardProxy() - .withConvention(ForwardProxyConvention.STANDARD) - .withCustomHostHeaderName("ogknygjofjdd") - .withCustomProtoHeaderName("s"))), - new AuthConfigInner() - .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) - .withRegistration(new AzureActiveDirectoryRegistration()) - .withLogin(new AzureActiveDirectoryLogin()) - .withValidation(new AzureActiveDirectoryValidation()) - .withIsAutoProvisioned(true)) - .withFacebook( - new Facebook() - .withEnabled(false) - .withRegistration(new AppRegistration()) - .withGraphApiVersion("cbjy") - .withLogin(new LoginScopes())) - .withGitHub( - new GitHub() - .withEnabled(false) - .withRegistration(new ClientRegistration()) - .withLogin(new LoginScopes())) - .withGoogle( - new Google() - .withEnabled(true) - .withRegistration(new ClientRegistration()) - .withLogin(new LoginScopes()) - .withValidation(new AllowedAudiencesValidation())) - .withTwitter( - new Twitter().withEnabled(true).withRegistration(new TwitterRegistration())) - .withApple( - new Apple() - .withEnabled(false) - .withRegistration(new AppleRegistration()) - .withLogin(new LoginScopes())) - .withAzureStaticWebApps( - new AzureStaticWebApps() - .withEnabled(false) - .withRegistration(new AzureStaticWebAppsRegistration())) - .withCustomOpenIdConnectProviders( - mapOf("uhivyqniw", new CustomOpenIdConnectProvider()))) - .withLogin( - new Login() - .withRoutes(new LoginRoutes().withLogoutEndpoint("k")) - .withPreserveUrlFragmentsForLogins(true) - .withAllowedExternalRedirectUrls(Arrays.asList("jgrtfwvukxga")) - .withCookieExpiration( - new CookieExpiration() - .withConvention(CookieExpirationConvention.FIXED_TIME) - .withTimeToExpiration("nhsjcnyej")) - .withNonce( - new Nonce() - .withValidateNonce(true) - .withNonceExpirationInterval("tnapczwlokjyemkk"))) - .withHttpSettings( - new HttpSettings() - .withRequireHttps(true) - .withRoutes(new HttpSettingsRoutes().withApiPrefix("xzjnchgejs")) - .withForwardProxy( - new ForwardProxy() - .withConvention(ForwardProxyConvention.CUSTOM) - .withCustomHostHeaderName("ilzyd") - .withCustomProtoHeaderName("o"))), - new AuthConfigInner() - .withPlatform(new AuthPlatform().withEnabled(false).withRuntimeVersion("t")) - .withGlobalValidation( - new GlobalValidation() - .withUnauthenticatedClientAction(UnauthenticatedClientActionV2.RETURN403) - .withRedirectToProvider("pjhulsuuvmkj") - .withExcludedPaths(Arrays.asList("rwfndiod"))) - .withIdentityProviders( - new IdentityProviders() - .withAzureActiveDirectory( - new AzureActiveDirectory() - .withEnabled(false) - .withRegistration(new AzureActiveDirectoryRegistration()) - .withLogin(new AzureActiveDirectoryLogin()) - .withValidation(new AzureActiveDirectoryValidation()) - .withIsAutoProvisioned(true)) - .withFacebook( - new Facebook() - .withEnabled(true) - .withRegistration(new AppRegistration()) - .withGraphApiVersion("psoacctazakljl") - .withLogin(new LoginScopes())) - .withGitHub( - new GitHub() - .withEnabled(true) - .withRegistration(new ClientRegistration()) - .withLogin(new LoginScopes())) - .withGoogle( - new Google() - .withEnabled(false) - .withRegistration(new ClientRegistration()) - .withLogin(new LoginScopes()) - .withValidation(new AllowedAudiencesValidation())) - .withTwitter( - new Twitter() - .withEnabled(false) - .withRegistration(new TwitterRegistration())) - .withApple( - new Apple() - .withEnabled(true) - .withRegistration(new AppleRegistration()) - .withLogin(new LoginScopes())) - .withAzureStaticWebApps( - new AzureStaticWebApps() - .withEnabled(true) - .withRegistration(new AzureStaticWebAppsRegistration())) - .withCustomOpenIdConnectProviders( - mapOf( - "jhcrz", - new CustomOpenIdConnectProvider(), - "vdphlxaolthqtr", - new CustomOpenIdConnectProvider(), - "qjbpfzfsin", - new CustomOpenIdConnectProvider(), - "gvfcj", - new CustomOpenIdConnectProvider()))) - .withLogin( - new Login() - .withRoutes(new LoginRoutes().withLogoutEndpoint("xxjtfe")) - .withPreserveUrlFragmentsForLogins(true) - .withAllowedExternalRedirectUrls(Arrays.asList("zitonpeqfpjkjl", "ofpdvh")) - .withCookieExpiration( - new CookieExpiration() - .withConvention(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED) - .withTimeToExpiration("pini")) - .withNonce( - new Nonce() - .withValidateNonce(true) - .withNonceExpirationInterval("uybbkpodep"))) - .withHttpSettings( - new HttpSettings() - .withRequireHttps(true) - .withRoutes(new HttpSettingsRoutes().withApiPrefix("vamih")) - .withForwardProxy( - new ForwardProxy() - .withConvention(ForwardProxyConvention.CUSTOM) - .withCustomHostHeaderName("rxzxtheo") - .withCustomProtoHeaderName("si"))))); - model = BinaryData.fromObject(model).toObject(AuthConfigCollection.class); - Assertions.assertEquals(false, model.value().get(0).platform().enabled()); - Assertions.assertEquals("gjxpybczmehmt", model.value().get(0).platform().runtimeVersion()); - Assertions - .assertEquals( - UnauthenticatedClientActionV2.RETURN403, - model.value().get(0).globalValidation().unauthenticatedClientAction()); - Assertions.assertEquals("phrupidgsybbejhp", model.value().get(0).globalValidation().redirectToProvider()); - Assertions.assertEquals("cmsxaobhdxbm", model.value().get(0).globalValidation().excludedPaths().get(0)); - Assertions.assertEquals(false, model.value().get(0).identityProviders().azureActiveDirectory().enabled()); - Assertions - .assertEquals(false, model.value().get(0).identityProviders().azureActiveDirectory().isAutoProvisioned()); - Assertions.assertEquals(false, model.value().get(0).identityProviders().facebook().enabled()); - Assertions.assertEquals("ownoizhw", model.value().get(0).identityProviders().facebook().graphApiVersion()); - Assertions.assertEquals(false, model.value().get(0).identityProviders().gitHub().enabled()); - Assertions.assertEquals(false, model.value().get(0).identityProviders().google().enabled()); - Assertions.assertEquals(true, model.value().get(0).identityProviders().twitter().enabled()); - Assertions.assertEquals(true, model.value().get(0).identityProviders().apple().enabled()); - Assertions.assertEquals(false, model.value().get(0).identityProviders().azureStaticWebApps().enabled()); - Assertions.assertEquals("gnufoooj", model.value().get(0).login().routes().logoutEndpoint()); - Assertions.assertEquals(true, model.value().get(0).login().preserveUrlFragmentsForLogins()); - Assertions.assertEquals("qes", model.value().get(0).login().allowedExternalRedirectUrls().get(0)); - Assertions - .assertEquals( - CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED, - model.value().get(0).login().cookieExpiration().convention()); - Assertions.assertEquals("mglzlhj", model.value().get(0).login().cookieExpiration().timeToExpiration()); - Assertions.assertEquals(false, model.value().get(0).login().nonce().validateNonce()); - Assertions.assertEquals("wmrvktsizntocipa", model.value().get(0).login().nonce().nonceExpirationInterval()); - Assertions.assertEquals(false, model.value().get(0).httpSettings().requireHttps()); - Assertions.assertEquals("qucmpo", model.value().get(0).httpSettings().routes().apiPrefix()); - Assertions - .assertEquals( - ForwardProxyConvention.STANDARD, model.value().get(0).httpSettings().forwardProxy().convention()); - Assertions - .assertEquals("ogknygjofjdd", model.value().get(0).httpSettings().forwardProxy().customHostHeaderName()); - Assertions.assertEquals("s", model.value().get(0).httpSettings().forwardProxy().customProtoHeaderName()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java deleted file mode 100644 index bd6d1c94b9cd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AuthPlatformTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AuthPlatform; -import org.junit.jupiter.api.Assertions; - -public final class AuthPlatformTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AuthPlatform model = - BinaryData.fromString("{\"enabled\":true,\"runtimeVersion\":\"dvkaozw\"}").toObject(AuthPlatform.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("dvkaozw", model.runtimeVersion()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AuthPlatform model = new AuthPlatform().withEnabled(true).withRuntimeVersion("dvkaozw"); - model = BinaryData.fromObject(model).toObject(AuthPlatform.class); - Assertions.assertEquals(true, model.enabled()); - Assertions.assertEquals("dvkaozw", 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 5f5385f1bf94..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableOperationsTests.java +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner; -import com.azure.resourcemanager.appcontainers.models.AvailableOperations; -import com.azure.resourcemanager.appcontainers.models.OperationDisplay; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AvailableOperationsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableOperations model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"pfhoqcaaewdao\",\"isDataAction\":true,\"display\":{\"provider\":\"pjxxkzb\",\"resource\":\"sgeivsiy\",\"operation\":\"kdncj\",\"description\":\"onbzoggculapzwy\"},\"origin\":\"gogtqxepnylbf\"}],\"nextLink\":\"jlyjtlvofq\"}") - .toObject(AvailableOperations.class); - Assertions.assertEquals("pfhoqcaaewdao", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("pjxxkzb", model.value().get(0).display().provider()); - Assertions.assertEquals("sgeivsiy", model.value().get(0).display().resource()); - Assertions.assertEquals("kdncj", model.value().get(0).display().operation()); - Assertions.assertEquals("onbzoggculapzwy", model.value().get(0).display().description()); - Assertions.assertEquals("gogtqxepnylbf", model.value().get(0).origin()); - Assertions.assertEquals("jlyjtlvofq", model.nextLink()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableOperations model = - new AvailableOperations() - .withValue( - Arrays - .asList( - new OperationDetailInner() - .withName("pfhoqcaaewdao") - .withIsDataAction(true) - .withDisplay( - new OperationDisplay() - .withProvider("pjxxkzb") - .withResource("sgeivsiy") - .withOperation("kdncj") - .withDescription("onbzoggculapzwy")) - .withOrigin("gogtqxepnylbf"))) - .withNextLink("jlyjtlvofq"); - model = BinaryData.fromObject(model).toObject(AvailableOperations.class); - Assertions.assertEquals("pfhoqcaaewdao", model.value().get(0).name()); - Assertions.assertEquals(true, model.value().get(0).isDataAction()); - Assertions.assertEquals("pjxxkzb", model.value().get(0).display().provider()); - Assertions.assertEquals("sgeivsiy", model.value().get(0).display().resource()); - Assertions.assertEquals("kdncj", model.value().get(0).display().operation()); - Assertions.assertEquals("onbzoggculapzwy", model.value().get(0).display().description()); - Assertions.assertEquals("gogtqxepnylbf", model.value().get(0).origin()); - Assertions.assertEquals("jlyjtlvofq", 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 9cf8caa44ee7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfileInnerTests.java +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; -import org.junit.jupiter.api.Assertions; - -public final class AvailableWorkloadProfileInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableWorkloadProfileInner model = - BinaryData - .fromString( - "{\"location\":\"efovgmk\",\"properties\":{\"category\":\"eyyvxyqjpkcat\",\"applicability\":\"LocationDefault\",\"cores\":1698610201,\"memoryGiB\":1035421848,\"displayName\":\"czsqpjhvm\"},\"id\":\"ajvnysounqe\",\"name\":\"a\",\"type\":\"oaeupfhyhltrpmo\"}") - .toObject(AvailableWorkloadProfileInner.class); - Assertions.assertEquals("efovgmk", model.location()); - Assertions.assertEquals("eyyvxyqjpkcat", model.properties().category()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.properties().applicability()); - Assertions.assertEquals(1698610201, model.properties().cores()); - Assertions.assertEquals(1035421848, model.properties().memoryGiB()); - Assertions.assertEquals("czsqpjhvm", model.properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableWorkloadProfileInner model = - new AvailableWorkloadProfileInner() - .withLocation("efovgmk") - .withProperties( - new AvailableWorkloadProfileProperties() - .withCategory("eyyvxyqjpkcat") - .withApplicability(Applicability.LOCATION_DEFAULT) - .withCores(1698610201) - .withMemoryGiB(1035421848) - .withDisplayName("czsqpjhvm")); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfileInner.class); - Assertions.assertEquals("efovgmk", model.location()); - Assertions.assertEquals("eyyvxyqjpkcat", model.properties().category()); - Assertions.assertEquals(Applicability.LOCATION_DEFAULT, model.properties().applicability()); - Assertions.assertEquals(1698610201, model.properties().cores()); - Assertions.assertEquals(1035421848, model.properties().memoryGiB()); - Assertions.assertEquals("czsqpjhvm", 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 41f6a1b78e40..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilePropertiesTests.java +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; -import org.junit.jupiter.api.Assertions; - -public final class AvailableWorkloadProfilePropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableWorkloadProfileProperties model = - BinaryData - .fromString( - "{\"category\":\"mcmatuokthfuiu\",\"applicability\":\"Custom\",\"cores\":680550088,\"memoryGiB\":397485144,\"displayName\":\"vxodpu\"}") - .toObject(AvailableWorkloadProfileProperties.class); - Assertions.assertEquals("mcmatuokthfuiu", model.category()); - Assertions.assertEquals(Applicability.CUSTOM, model.applicability()); - Assertions.assertEquals(680550088, model.cores()); - Assertions.assertEquals(397485144, model.memoryGiB()); - Assertions.assertEquals("vxodpu", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableWorkloadProfileProperties model = - new AvailableWorkloadProfileProperties() - .withCategory("mcmatuokthfuiu") - .withApplicability(Applicability.CUSTOM) - .withCores(680550088) - .withMemoryGiB(397485144) - .withDisplayName("vxodpu"); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfileProperties.class); - Assertions.assertEquals("mcmatuokthfuiu", model.category()); - Assertions.assertEquals(Applicability.CUSTOM, model.applicability()); - Assertions.assertEquals(680550088, model.cores()); - Assertions.assertEquals(397485144, model.memoryGiB()); - Assertions.assertEquals("vxodpu", 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 1fb36c62a1ee..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesCollectionTests.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.AvailableWorkloadProfileInner; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfilesCollection; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AvailableWorkloadProfilesCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AvailableWorkloadProfilesCollection model = - BinaryData - .fromString( - "{\"value\":[{\"location\":\"jbdlwtgrhpdjpju\",\"properties\":{\"category\":\"xazjpqyegual\",\"applicability\":\"Custom\",\"cores\":1163750271,\"memoryGiB\":344964368,\"displayName\":\"zzvdudgwds\"},\"id\":\"fhotw\",\"name\":\"cynpwlbjnp\",\"type\":\"acfta\"},{\"location\":\"h\",\"properties\":{\"category\":\"tyfsoppusuesn\",\"applicability\":\"LocationDefault\",\"cores\":317621756,\"memoryGiB\":600821678,\"displayName\":\"orxzdmohctbqvud\"},\"id\":\"xdn\",\"name\":\"nvowgujju\",\"type\":\"wdkcglhsl\"},{\"location\":\"jdyggdtji\",\"properties\":{\"category\":\"kuofqweykhme\",\"applicability\":\"LocationDefault\",\"cores\":1463310275,\"memoryGiB\":669612849,\"displayName\":\"whybcib\"},\"id\":\"yvdcsitynnaa\",\"name\":\"dectehfiqsc\",\"type\":\"eypvhezrkg\"}],\"nextLink\":\"c\"}") - .toObject(AvailableWorkloadProfilesCollection.class); - Assertions.assertEquals("jbdlwtgrhpdjpju", model.value().get(0).location()); - Assertions.assertEquals("xazjpqyegual", model.value().get(0).properties().category()); - Assertions.assertEquals(Applicability.CUSTOM, model.value().get(0).properties().applicability()); - Assertions.assertEquals(1163750271, model.value().get(0).properties().cores()); - Assertions.assertEquals(344964368, model.value().get(0).properties().memoryGiB()); - Assertions.assertEquals("zzvdudgwds", model.value().get(0).properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AvailableWorkloadProfilesCollection model = - new AvailableWorkloadProfilesCollection() - .withValue( - Arrays - .asList( - new AvailableWorkloadProfileInner() - .withLocation("jbdlwtgrhpdjpju") - .withProperties( - new AvailableWorkloadProfileProperties() - .withCategory("xazjpqyegual") - .withApplicability(Applicability.CUSTOM) - .withCores(1163750271) - .withMemoryGiB(344964368) - .withDisplayName("zzvdudgwds")), - new AvailableWorkloadProfileInner() - .withLocation("h") - .withProperties( - new AvailableWorkloadProfileProperties() - .withCategory("tyfsoppusuesn") - .withApplicability(Applicability.LOCATION_DEFAULT) - .withCores(317621756) - .withMemoryGiB(600821678) - .withDisplayName("orxzdmohctbqvud")), - new AvailableWorkloadProfileInner() - .withLocation("jdyggdtji") - .withProperties( - new AvailableWorkloadProfileProperties() - .withCategory("kuofqweykhme") - .withApplicability(Applicability.LOCATION_DEFAULT) - .withCores(1463310275) - .withMemoryGiB(669612849) - .withDisplayName("whybcib")))); - model = BinaryData.fromObject(model).toObject(AvailableWorkloadProfilesCollection.class); - Assertions.assertEquals("jbdlwtgrhpdjpju", model.value().get(0).location()); - Assertions.assertEquals("xazjpqyegual", model.value().get(0).properties().category()); - Assertions.assertEquals(Applicability.CUSTOM, model.value().get(0).properties().applicability()); - Assertions.assertEquals(1163750271, model.value().get(0).properties().cores()); - Assertions.assertEquals(344964368, model.value().get(0).properties().memoryGiB()); - Assertions.assertEquals("zzvdudgwds", 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 996c49a12b5b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetMockTests.java +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Applicability; -import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfile; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class AvailableWorkloadProfilesGetMockTests { - @Test - public void testGet() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"location\":\"uxtyasiibmi\",\"properties\":{\"category\":\"nustgnljh\",\"applicability\":\"LocationDefault\",\"cores\":1287166393,\"memoryGiB\":1773419326,\"displayName\":\"avmqfoudor\"},\"id\":\"cgyypro\",\"name\":\"wy\",\"type\":\"undmbx\"}]}"; - - 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("nuciqdsmexiit", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("uxtyasiibmi", response.iterator().next().location()); - Assertions.assertEquals("nustgnljh", response.iterator().next().properties().category()); - Assertions - .assertEquals(Applicability.LOCATION_DEFAULT, response.iterator().next().properties().applicability()); - Assertions.assertEquals(1287166393, response.iterator().next().properties().cores()); - Assertions.assertEquals(1773419326, response.iterator().next().properties().memoryGiB()); - Assertions.assertEquals("avmqfoudor", 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 b16765ab966f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureActiveDirectoryLoginTests.java +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AzureActiveDirectoryLogin; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class AzureActiveDirectoryLoginTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureActiveDirectoryLogin model = - BinaryData - .fromString( - "{\"loginParameters\":[\"kzsmodm\",\"lougpbkw\",\"mutduqktaps\"],\"disableWWWAuthenticate\":false}") - .toObject(AzureActiveDirectoryLogin.class); - Assertions.assertEquals("kzsmodm", model.loginParameters().get(0)); - Assertions.assertEquals(false, model.disableWwwAuthenticate()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureActiveDirectoryLogin model = - new AzureActiveDirectoryLogin() - .withLoginParameters(Arrays.asList("kzsmodm", "lougpbkw", "mutduqktaps")) - .withDisableWwwAuthenticate(false); - model = BinaryData.fromObject(model).toObject(AzureActiveDirectoryLogin.class); - Assertions.assertEquals("kzsmodm", model.loginParameters().get(0)); - Assertions.assertEquals(false, model.disableWwwAuthenticate()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.java deleted file mode 100644 index f4180d4eee4c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsRegistrationTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebAppsRegistration; -import org.junit.jupiter.api.Assertions; - -public final class AzureStaticWebAppsRegistrationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureStaticWebAppsRegistration model = - BinaryData.fromString("{\"clientId\":\"uhrhcffcyddgl\"}").toObject(AzureStaticWebAppsRegistration.class); - Assertions.assertEquals("uhrhcffcyddgl", model.clientId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureStaticWebAppsRegistration model = new AzureStaticWebAppsRegistration().withClientId("uhrhcffcyddgl"); - model = BinaryData.fromObject(model).toObject(AzureStaticWebAppsRegistration.class); - Assertions.assertEquals("uhrhcffcyddgl", 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 82093c81aa91..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/AzureStaticWebAppsTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebApps; -import com.azure.resourcemanager.appcontainers.models.AzureStaticWebAppsRegistration; -import org.junit.jupiter.api.Assertions; - -public final class AzureStaticWebAppsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - AzureStaticWebApps model = - BinaryData - .fromString("{\"enabled\":false,\"registration\":{\"clientId\":\"icbtwnpzao\"}}") - .toObject(AzureStaticWebApps.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("icbtwnpzao", model.registration().clientId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - AzureStaticWebApps model = - new AzureStaticWebApps() - .withEnabled(false) - .withRegistration(new AzureStaticWebAppsRegistration().withClientId("icbtwnpzao")); - model = BinaryData.fromObject(model).toObject(AzureStaticWebApps.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("icbtwnpzao", model.registration().clientId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterCollectionInnerTests.java deleted file mode 100644 index 7cc2ffd7f104..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterCollectionInnerTests.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.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner; -import com.azure.resourcemanager.appcontainers.models.BillingMeter; -import com.azure.resourcemanager.appcontainers.models.BillingMeterProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class BillingMeterCollectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BillingMeterCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"location\":\"yzydagfuaxbezyi\",\"properties\":{\"category\":\"ktwh\",\"meterType\":\"xw\",\"displayName\":\"wqsmbsur\"},\"id\":\"xim\",\"name\":\"ryocfsfksymdd\",\"type\":\"stkiiuxhqyud\"},{\"location\":\"rrqnbpoczvyifqrv\",\"properties\":{\"category\":\"jsllrmv\",\"meterType\":\"f\",\"displayName\":\"t\"},\"id\":\"pnpulexxbczwtru\",\"name\":\"iqzbq\",\"type\":\"vsovmyokac\"},{\"location\":\"kwlhzdo\",\"properties\":{\"category\":\"jmflbvvnch\",\"meterType\":\"cciw\",\"displayName\":\"juqk\"},\"id\":\"rsa\",\"name\":\"iwkuofos\",\"type\":\"ghsauuimjmvxied\"}]}") - .toObject(BillingMeterCollectionInner.class); - Assertions.assertEquals("yzydagfuaxbezyi", model.value().get(0).location()); - Assertions.assertEquals("ktwh", model.value().get(0).properties().category()); - Assertions.assertEquals("xw", model.value().get(0).properties().meterType()); - Assertions.assertEquals("wqsmbsur", model.value().get(0).properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BillingMeterCollectionInner model = - new BillingMeterCollectionInner() - .withValue( - Arrays - .asList( - new BillingMeter() - .withLocation("yzydagfuaxbezyi") - .withProperties( - new BillingMeterProperties() - .withCategory("ktwh") - .withMeterType("xw") - .withDisplayName("wqsmbsur")), - new BillingMeter() - .withLocation("rrqnbpoczvyifqrv") - .withProperties( - new BillingMeterProperties() - .withCategory("jsllrmv") - .withMeterType("f") - .withDisplayName("t")), - new BillingMeter() - .withLocation("kwlhzdo") - .withProperties( - new BillingMeterProperties() - .withCategory("jmflbvvnch") - .withMeterType("cciw") - .withDisplayName("juqk")))); - model = BinaryData.fromObject(model).toObject(BillingMeterCollectionInner.class); - Assertions.assertEquals("yzydagfuaxbezyi", model.value().get(0).location()); - Assertions.assertEquals("ktwh", model.value().get(0).properties().category()); - Assertions.assertEquals("xw", model.value().get(0).properties().meterType()); - Assertions.assertEquals("wqsmbsur", 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 dffbe371cd09..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterPropertiesTests.java +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BillingMeterProperties; -import org.junit.jupiter.api.Assertions; - -public final class BillingMeterPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BillingMeterProperties model = - BinaryData - .fromString("{\"category\":\"ur\",\"meterType\":\"xxjnspydptk\",\"displayName\":\"nkoukn\"}") - .toObject(BillingMeterProperties.class); - Assertions.assertEquals("ur", model.category()); - Assertions.assertEquals("xxjnspydptk", model.meterType()); - Assertions.assertEquals("nkoukn", model.displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BillingMeterProperties model = - new BillingMeterProperties().withCategory("ur").withMeterType("xxjnspydptk").withDisplayName("nkoukn"); - model = BinaryData.fromObject(model).toObject(BillingMeterProperties.class); - Assertions.assertEquals("ur", model.category()); - Assertions.assertEquals("xxjnspydptk", model.meterType()); - Assertions.assertEquals("nkoukn", 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 79cbea3b4c3f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMeterTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.BillingMeter; -import com.azure.resourcemanager.appcontainers.models.BillingMeterProperties; -import org.junit.jupiter.api.Assertions; - -public final class BillingMeterTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - BillingMeter model = - BinaryData - .fromString( - "{\"location\":\"gidyjrrf\",\"properties\":{\"category\":\"osvexcsonpclhoc\",\"meterType\":\"slkevle\",\"displayName\":\"zfbuhf\"},\"id\":\"vfaxkffeiith\",\"name\":\"vmezy\",\"type\":\"shxmzsbbzoggigrx\"}") - .toObject(BillingMeter.class); - Assertions.assertEquals("gidyjrrf", model.location()); - Assertions.assertEquals("osvexcsonpclhoc", model.properties().category()); - Assertions.assertEquals("slkevle", model.properties().meterType()); - Assertions.assertEquals("zfbuhf", model.properties().displayName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - BillingMeter model = - new BillingMeter() - .withLocation("gidyjrrf") - .withProperties( - new BillingMeterProperties() - .withCategory("osvexcsonpclhoc") - .withMeterType("slkevle") - .withDisplayName("zfbuhf")); - model = BinaryData.fromObject(model).toObject(BillingMeter.class); - Assertions.assertEquals("gidyjrrf", model.location()); - Assertions.assertEquals("osvexcsonpclhoc", model.properties().category()); - Assertions.assertEquals("slkevle", model.properties().meterType()); - Assertions.assertEquals("zfbuhf", model.properties().displayName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetWithResponseMockTests.java deleted file mode 100644 index 67a8fd8e1b53..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetWithResponseMockTests.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.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.BillingMeterCollection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class BillingMetersGetWithResponseMockTests { - @Test - public void testGetWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"location\":\"pmdtz\",\"properties\":{\"category\":\"tfvnz\",\"meterType\":\"jtotpvopvpbd\",\"displayName\":\"qgqqihedsvqwthmk\"},\"id\":\"ibcysihsgqc\",\"name\":\"dhohsdtmcdzsuf\",\"type\":\"ohdxbzlmcmu\"},{\"location\":\"cvhd\",\"properties\":{\"category\":\"wqqxeysko\",\"meterType\":\"zinkfkbgbzbowxeq\",\"displayName\":\"ljmygvkzqkjjeokb\"},\"id\":\"efezrxcczurtlei\",\"name\":\"q\",\"type\":\"bkwvzg\"},{\"location\":\"v\",\"properties\":{\"category\":\"zdix\",\"meterType\":\"q\",\"displayName\":\"odawopqhewjptmcg\"},\"id\":\"bostzel\",\"name\":\"dlat\",\"type\":\"tmzlbiojlv\"},{\"location\":\"rbbpneqvcwwyy\",\"properties\":{\"category\":\"ochpprpr\",\"meterType\":\"mo\",\"displayName\":\"yzejnhlbk\"},\"id\":\"bzpcpiljhahzvec\",\"name\":\"ndbnwieh\",\"type\":\"lewjwiuubwef\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - BillingMeterCollection response = - manager.billingMeters().getWithResponse("ugcmjkavlgorb", com.azure.core.util.Context.NONE).getValue(); - - Assertions.assertEquals("pmdtz", response.value().get(0).location()); - Assertions.assertEquals("tfvnz", response.value().get(0).properties().category()); - Assertions.assertEquals("jtotpvopvpbd", response.value().get(0).properties().meterType()); - Assertions.assertEquals("qgqqihedsvqwthmk", response.value().get(0).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 f35aba2d25b3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatePatchTests.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.CertificatePatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class CertificatePatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CertificatePatch model = - BinaryData - .fromString( - "{\"tags\":{\"flz\":\"ukgri\",\"qzahmgkbrp\":\"fbxzpuzycisp\",\"hibnuqqkpika\":\"y\",\"buynhijggm\":\"rgvtqag\"}}") - .toObject(CertificatePatch.class); - Assertions.assertEquals("ukgri", model.tags().get("flz")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CertificatePatch model = - new CertificatePatch() - .withTags( - mapOf("flz", "ukgri", "qzahmgkbrp", "fbxzpuzycisp", "hibnuqqkpika", "y", "buynhijggm", "rgvtqag")); - model = BinaryData.fromObject(model).toObject(CertificatePatch.class); - Assertions.assertEquals("ukgri", model.tags().get("flz")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteWithResponseMockTests.java deleted file mode 100644 index 5b585901c86b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class CertificatesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .certificates() - .deleteWithResponse("afjrqpjiyrqjcrg", "xwmzwdfkbnrz", "rpdltbq", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.java deleted file mode 100644 index 692d3ffcf8f7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityRequestTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameAvailabilityRequestTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameAvailabilityRequest model = - BinaryData - .fromString("{\"name\":\"idokgjlj\",\"type\":\"xgvcl\"}") - .toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("idokgjlj", model.name()); - Assertions.assertEquals("xgvcl", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityRequest model = new CheckNameAvailabilityRequest().withName("idokgjlj").withType("xgvcl"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityRequest.class); - Assertions.assertEquals("idokgjlj", model.name()); - Assertions.assertEquals("xgvcl", model.type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityResponseInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityResponseInnerTests.java deleted file mode 100644 index 747841faabc2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CheckNameAvailabilityResponseInnerTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReason; -import org.junit.jupiter.api.Assertions; - -public final class CheckNameAvailabilityResponseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CheckNameAvailabilityResponseInner model = - BinaryData - .fromString("{\"nameAvailable\":true,\"reason\":\"Invalid\",\"message\":\"ghkjeszzhbi\"}") - .toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, model.reason()); - Assertions.assertEquals("ghkjeszzhbi", model.message()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CheckNameAvailabilityResponseInner model = - new CheckNameAvailabilityResponseInner() - .withNameAvailable(true) - .withReason(CheckNameAvailabilityReason.INVALID) - .withMessage("ghkjeszzhbi"); - model = BinaryData.fromObject(model).toObject(CheckNameAvailabilityResponseInner.class); - Assertions.assertEquals(true, model.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, model.reason()); - Assertions.assertEquals("ghkjeszzhbi", model.message()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteWithResponseMockTests.java deleted file mode 100644 index eb4d7837e45a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsCertificatesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .connectedEnvironmentsCertificates() - .deleteWithResponse("sqqw", "tcmwqkchc", "waxfewzjkj", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilityWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index 64f135a17820..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReason; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"nameAvailable\":true,\"reason\":\"AlreadyExists\",\"message\":\"mbnkb\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameAvailabilityResponse response = - manager - .connectedEnvironments() - .checkNameAvailabilityWithResponse( - "yqo", - "mpqoxw", - new CheckNameAvailabilityRequest().withName("fdbxiqxeiiqbim").withType("mwwinhehfqpofv"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(true, response.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.ALREADY_EXISTS, response.reason()); - Assertions.assertEquals("mbnkb", response.message()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteWithResponseMockTests.java deleted file mode 100644 index b32238da4ceb..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsDaprComponentsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .connectedEnvironmentsDaprComponents() - .deleteWithResponse("tsxoatftgz", "npbs", "vefloccsrmozihmi", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsWithResponseMockTests.java deleted file mode 100644 index f40867f2a5d1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsDaprComponentsListSecretsWithResponseMockTests { - @Test - public void testListSecretsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"ilrmcaykggnox\",\"value\":\"t\"},{\"name\":\"sxwpndfcpfnznthj\",\"value\":\"kjaosrxuzv\"},{\"name\":\"mktcqiosmgbza\",\"value\":\"xqdlyrtltlapr\"},{\"name\":\"zkatb\",\"value\":\"mznnbsoqeqalarvl\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DaprSecretsCollection response = - manager - .connectedEnvironmentsDaprComponents() - .listSecretsWithResponse("g", "wtxxpkyjcx", "jxgrytfmp", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteMockTests.java deleted file mode 100644 index e17158608086..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.connectedEnvironments().delete("lnwcltyjed", "xxmlfmkqscazua", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteWithResponseMockTests.java deleted file mode 100644 index 9ab93659458b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ConnectedEnvironmentsStoragesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .connectedEnvironmentsStorages() - .deleteWithResponse("xff", "shkwfbkgozxwopd", "yd", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppJobExecutionsInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppJobExecutionsInnerTests.java deleted file mode 100644 index 739ced9b872b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppJobExecutionsInnerTests.java +++ /dev/null @@ -1,199 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppJobExecutionsInner; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionInner; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import com.azure.resourcemanager.appcontainers.models.EnvironmentVar; -import com.azure.resourcemanager.appcontainers.models.JobExecutionContainer; -import com.azure.resourcemanager.appcontainers.models.JobExecutionTemplate; -import java.time.OffsetDateTime; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppJobExecutionsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppJobExecutionsInner model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"djhlimm\",\"id\":\"x\",\"type\":\"bcporxvxcjzhqizx\",\"status\":\"Degraded\",\"startTime\":\"2021-01-04T20:39:53Z\",\"endTime\":\"2021-03-07T05:50:04Z\",\"template\":{\"containers\":[{\"image\":\"ftjuh\",\"name\":\"azkmtgguwp\",\"command\":[\"ajc\"],\"args\":[\"mghfcfiwrxgkne\"],\"env\":[{},{},{}],\"resources\":{}}],\"initContainers\":[{\"image\":\"o\",\"name\":\"vpgshoxgsgbp\",\"command\":[\"djtxvzflbq\",\"gaqvlgafcqusrd\",\"etnwsdtutnw\"],\"args\":[\"ycvuzhyrmewipmv\",\"k\",\"xukuqgsj\",\"xundxgk\"],\"env\":[{},{},{},{}],\"resources\":{}},{\"image\":\"hzjhf\",\"name\":\"hvvmuvgpmun\",\"command\":[\"xvmhf\"],\"args\":[\"jyihsasbhudypo\"],\"env\":[{},{}],\"resources\":{}},{\"image\":\"slynsqyrpfoo\",\"name\":\"lttymsjn\",\"command\":[\"dnfwqzdzg\",\"ilaxhn\",\"hqlyvijo\"],\"args\":[\"vk\"],\"env\":[{},{},{},{}],\"resources\":{}}]}},{\"name\":\"nbixxrti\",\"id\":\"cpwpg\",\"type\":\"rc\",\"status\":\"Degraded\",\"startTime\":\"2021-01-12T06:52:04Z\",\"endTime\":\"2020-12-22T20:01:29Z\",\"template\":{\"containers\":[{\"image\":\"xpmyyefrpmpdnq\",\"name\":\"ka\",\"command\":[\"qvmmbn\"],\"args\":[\"rtql\"],\"env\":[{},{}],\"resources\":{}},{\"image\":\"nitgvkxlz\",\"name\":\"drf\",\"command\":[\"ealzxwhcansymoyq\",\"lwigdivbkbx\"],\"args\":[\"fajuwas\"],\"env\":[{},{}],\"resources\":{}},{\"image\":\"y\",\"name\":\"uxakjsqzhzbezk\",\"command\":[\"sidxasicdd\",\"vvjskgfmocwahp\",\"gat\",\"eaahhvjhhn\"],\"args\":[\"ybbjjidjksyx\",\"yxvxevblbjed\"],\"env\":[{},{}],\"resources\":{}}],\"initContainers\":[{\"image\":\"uaulxunsm\",\"name\":\"nkppxynen\",\"command\":[\"xeizzg\"],\"args\":[\"nsrmffeycx\",\"ktp\"],\"env\":[{},{},{},{}],\"resources\":{}},{\"image\":\"teeammxqiekkkzd\",\"name\":\"tkgdojbmxva\",\"command\":[\"fdeesvecuijpxtx\",\"uwprtujwsawd\"],\"args\":[\"babxvitit\",\"tzeexav\",\"xtfglecdmdqb\",\"pypqtgsfj\"],\"env\":[{}],\"resources\":{}}]}}],\"nextLink\":\"hhxud\"}") - .toObject(ContainerAppJobExecutionsInner.class); - Assertions.assertEquals("djhlimm", model.value().get(0).name()); - Assertions.assertEquals("x", model.value().get(0).id()); - Assertions.assertEquals("bcporxvxcjzhqizx", model.value().get(0).type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-04T20:39:53Z"), model.value().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-07T05:50:04Z"), model.value().get(0).endTime()); - Assertions.assertEquals("ftjuh", model.value().get(0).template().containers().get(0).image()); - Assertions.assertEquals("azkmtgguwp", model.value().get(0).template().containers().get(0).name()); - Assertions.assertEquals("ajc", model.value().get(0).template().containers().get(0).command().get(0)); - Assertions.assertEquals("mghfcfiwrxgkne", model.value().get(0).template().containers().get(0).args().get(0)); - Assertions.assertEquals("o", model.value().get(0).template().initContainers().get(0).image()); - Assertions.assertEquals("vpgshoxgsgbp", model.value().get(0).template().initContainers().get(0).name()); - Assertions.assertEquals("djtxvzflbq", model.value().get(0).template().initContainers().get(0).command().get(0)); - Assertions - .assertEquals("ycvuzhyrmewipmv", model.value().get(0).template().initContainers().get(0).args().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppJobExecutionsInner model = - new ContainerAppJobExecutionsInner() - .withValue( - Arrays - .asList( - new JobExecutionInner() - .withName("djhlimm") - .withId("x") - .withType("bcporxvxcjzhqizx") - .withStartTime(OffsetDateTime.parse("2021-01-04T20:39:53Z")) - .withEndTime(OffsetDateTime.parse("2021-03-07T05:50:04Z")) - .withTemplate( - new JobExecutionTemplate() - .withContainers( - Arrays - .asList( - new JobExecutionContainer() - .withImage("ftjuh") - .withName("azkmtgguwp") - .withCommand(Arrays.asList("ajc")) - .withArgs(Arrays.asList("mghfcfiwrxgkne")) - .withEnv( - Arrays - .asList( - new EnvironmentVar(), - new EnvironmentVar(), - new EnvironmentVar())) - .withResources(new ContainerResources()))) - .withInitContainers( - Arrays - .asList( - new JobExecutionContainer() - .withImage("o") - .withName("vpgshoxgsgbp") - .withCommand( - Arrays - .asList("djtxvzflbq", "gaqvlgafcqusrd", "etnwsdtutnw")) - .withArgs( - Arrays - .asList("ycvuzhyrmewipmv", "k", "xukuqgsj", "xundxgk")) - .withEnv( - Arrays - .asList( - new EnvironmentVar(), - new EnvironmentVar(), - new EnvironmentVar(), - new EnvironmentVar())) - .withResources(new ContainerResources()), - new JobExecutionContainer() - .withImage("hzjhf") - .withName("hvvmuvgpmun") - .withCommand(Arrays.asList("xvmhf")) - .withArgs(Arrays.asList("jyihsasbhudypo")) - .withEnv( - Arrays.asList(new EnvironmentVar(), new EnvironmentVar())) - .withResources(new ContainerResources()), - new JobExecutionContainer() - .withImage("slynsqyrpfoo") - .withName("lttymsjn") - .withCommand(Arrays.asList("dnfwqzdzg", "ilaxhn", "hqlyvijo")) - .withArgs(Arrays.asList("vk")) - .withEnv( - Arrays - .asList( - new EnvironmentVar(), - new EnvironmentVar(), - new EnvironmentVar(), - new EnvironmentVar())) - .withResources(new ContainerResources())))), - new JobExecutionInner() - .withName("nbixxrti") - .withId("cpwpg") - .withType("rc") - .withStartTime(OffsetDateTime.parse("2021-01-12T06:52:04Z")) - .withEndTime(OffsetDateTime.parse("2020-12-22T20:01:29Z")) - .withTemplate( - new JobExecutionTemplate() - .withContainers( - Arrays - .asList( - new JobExecutionContainer() - .withImage("xpmyyefrpmpdnq") - .withName("ka") - .withCommand(Arrays.asList("qvmmbn")) - .withArgs(Arrays.asList("rtql")) - .withEnv( - Arrays.asList(new EnvironmentVar(), new EnvironmentVar())) - .withResources(new ContainerResources()), - new JobExecutionContainer() - .withImage("nitgvkxlz") - .withName("drf") - .withCommand(Arrays.asList("ealzxwhcansymoyq", "lwigdivbkbx")) - .withArgs(Arrays.asList("fajuwas")) - .withEnv( - Arrays.asList(new EnvironmentVar(), new EnvironmentVar())) - .withResources(new ContainerResources()), - new JobExecutionContainer() - .withImage("y") - .withName("uxakjsqzhzbezk") - .withCommand( - Arrays - .asList( - "sidxasicdd", - "vvjskgfmocwahp", - "gat", - "eaahhvjhhn")) - .withArgs(Arrays.asList("ybbjjidjksyx", "yxvxevblbjed")) - .withEnv( - Arrays.asList(new EnvironmentVar(), new EnvironmentVar())) - .withResources(new ContainerResources()))) - .withInitContainers( - Arrays - .asList( - new JobExecutionContainer() - .withImage("uaulxunsm") - .withName("nkppxynen") - .withCommand(Arrays.asList("xeizzg")) - .withArgs(Arrays.asList("nsrmffeycx", "ktp")) - .withEnv( - Arrays - .asList( - new EnvironmentVar(), - new EnvironmentVar(), - new EnvironmentVar(), - new EnvironmentVar())) - .withResources(new ContainerResources()), - new JobExecutionContainer() - .withImage("teeammxqiekkkzd") - .withName("tkgdojbmxva") - .withCommand(Arrays.asList("fdeesvecuijpxtx", "uwprtujwsawd")) - .withArgs( - Arrays - .asList( - "babxvitit", - "tzeexav", - "xtfglecdmdqb", - "pypqtgsfj")) - .withEnv(Arrays.asList(new EnvironmentVar())) - .withResources(new ContainerResources())))))); - model = BinaryData.fromObject(model).toObject(ContainerAppJobExecutionsInner.class); - Assertions.assertEquals("djhlimm", model.value().get(0).name()); - Assertions.assertEquals("x", model.value().get(0).id()); - Assertions.assertEquals("bcporxvxcjzhqizx", model.value().get(0).type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-04T20:39:53Z"), model.value().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-03-07T05:50:04Z"), model.value().get(0).endTime()); - Assertions.assertEquals("ftjuh", model.value().get(0).template().containers().get(0).image()); - Assertions.assertEquals("azkmtgguwp", model.value().get(0).template().containers().get(0).name()); - Assertions.assertEquals("ajc", model.value().get(0).template().containers().get(0).command().get(0)); - Assertions.assertEquals("mghfcfiwrxgkne", model.value().get(0).template().containers().get(0).args().get(0)); - Assertions.assertEquals("o", model.value().get(0).template().initContainers().get(0).image()); - Assertions.assertEquals("vpgshoxgsgbp", model.value().get(0).template().initContainers().get(0).name()); - Assertions.assertEquals("djtxvzflbq", model.value().get(0).template().initContainers().get(0).command().get(0)); - Assertions - .assertEquals("ycvuzhyrmewipmv", model.value().get(0).template().initContainers().get(0).args().get(0)); - } -} 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 80a9d6dc75b8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetHttpHeadersItemTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppProbeHttpGetHttpHeadersItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppProbeHttpGetHttpHeadersItem model = - BinaryData - .fromString("{\"name\":\"hzoymibmrqy\",\"value\":\"bahwfl\"}") - .toObject(ContainerAppProbeHttpGetHttpHeadersItem.class); - Assertions.assertEquals("hzoymibmrqy", model.name()); - Assertions.assertEquals("bahwfl", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbeHttpGetHttpHeadersItem model = - new ContainerAppProbeHttpGetHttpHeadersItem().withName("hzoymibmrqy").withValue("bahwfl"); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeHttpGetHttpHeadersItem.class); - Assertions.assertEquals("hzoymibmrqy", model.name()); - Assertions.assertEquals("bahwfl", 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 6053fe33e51c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeHttpGetTests.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.ContainerAppProbeHttpGet; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import com.azure.resourcemanager.appcontainers.models.Scheme; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppProbeHttpGetTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppProbeHttpGet model = - BinaryData - .fromString( - "{\"host\":\"quxvypomgkop\",\"httpHeaders\":[{\"name\":\"ojvpa\",\"value\":\"qgxy\"},{\"name\":\"mocmbqfqvmk\",\"value\":\"xozap\"},{\"name\":\"helxprglya\",\"value\":\"dd\"},{\"name\":\"kcbcue\",\"value\":\"rjxgciqib\"}],\"path\":\"osx\",\"port\":341443712,\"scheme\":\"HTTP\"}") - .toObject(ContainerAppProbeHttpGet.class); - Assertions.assertEquals("quxvypomgkop", model.host()); - Assertions.assertEquals("ojvpa", model.httpHeaders().get(0).name()); - Assertions.assertEquals("qgxy", model.httpHeaders().get(0).value()); - Assertions.assertEquals("osx", model.path()); - Assertions.assertEquals(341443712, model.port()); - Assertions.assertEquals(Scheme.HTTP, model.scheme()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbeHttpGet model = - new ContainerAppProbeHttpGet() - .withHost("quxvypomgkop") - .withHttpHeaders( - Arrays - .asList( - new ContainerAppProbeHttpGetHttpHeadersItem().withName("ojvpa").withValue("qgxy"), - new ContainerAppProbeHttpGetHttpHeadersItem().withName("mocmbqfqvmk").withValue("xozap"), - new ContainerAppProbeHttpGetHttpHeadersItem().withName("helxprglya").withValue("dd"), - new ContainerAppProbeHttpGetHttpHeadersItem().withName("kcbcue").withValue("rjxgciqib"))) - .withPath("osx") - .withPort(341443712) - .withScheme(Scheme.HTTP); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeHttpGet.class); - Assertions.assertEquals("quxvypomgkop", model.host()); - Assertions.assertEquals("ojvpa", model.httpHeaders().get(0).name()); - Assertions.assertEquals("qgxy", model.httpHeaders().get(0).value()); - Assertions.assertEquals("osx", model.path()); - Assertions.assertEquals(341443712, 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 d35547dd69c0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTcpSocketTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppProbeTcpSocketTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppProbeTcpSocket model = - BinaryData - .fromString("{\"host\":\"zdtmhrkwofy\",\"port\":1026914225}") - .toObject(ContainerAppProbeTcpSocket.class); - Assertions.assertEquals("zdtmhrkwofy", model.host()); - Assertions.assertEquals(1026914225, model.port()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbeTcpSocket model = - new ContainerAppProbeTcpSocket().withHost("zdtmhrkwofy").withPort(1026914225); - model = BinaryData.fromObject(model).toObject(ContainerAppProbeTcpSocket.class); - Assertions.assertEquals("zdtmhrkwofy", model.host()); - Assertions.assertEquals(1026914225, 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 f945085b6144..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppProbeTests.java +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; -import com.azure.resourcemanager.appcontainers.models.Scheme; -import com.azure.resourcemanager.appcontainers.models.Type; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ContainerAppProbeTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerAppProbe model = - BinaryData - .fromString( - "{\"failureThreshold\":1317619791,\"httpGet\":{\"host\":\"kzzlvmbmpaxmodf\",\"httpHeaders\":[{\"name\":\"fy\",\"value\":\"sbpfvmwyhr\"}],\"path\":\"uyfta\",\"port\":1378791233,\"scheme\":\"HTTPS\"},\"initialDelaySeconds\":369562825,\"periodSeconds\":1040923285,\"successThreshold\":842537299,\"tcpSocket\":{\"host\":\"nubexk\",\"port\":1989438546},\"terminationGracePeriodSeconds\":5387832879483701613,\"timeoutSeconds\":487764269,\"type\":\"Startup\"}") - .toObject(ContainerAppProbe.class); - Assertions.assertEquals(1317619791, model.failureThreshold()); - Assertions.assertEquals("kzzlvmbmpaxmodf", model.httpGet().host()); - Assertions.assertEquals("fy", model.httpGet().httpHeaders().get(0).name()); - Assertions.assertEquals("sbpfvmwyhr", model.httpGet().httpHeaders().get(0).value()); - Assertions.assertEquals("uyfta", model.httpGet().path()); - Assertions.assertEquals(1378791233, model.httpGet().port()); - Assertions.assertEquals(Scheme.HTTPS, model.httpGet().scheme()); - Assertions.assertEquals(369562825, model.initialDelaySeconds()); - Assertions.assertEquals(1040923285, model.periodSeconds()); - Assertions.assertEquals(842537299, model.successThreshold()); - Assertions.assertEquals("nubexk", model.tcpSocket().host()); - Assertions.assertEquals(1989438546, model.tcpSocket().port()); - Assertions.assertEquals(5387832879483701613L, model.terminationGracePeriodSeconds()); - Assertions.assertEquals(487764269, model.timeoutSeconds()); - Assertions.assertEquals(Type.STARTUP, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerAppProbe model = - new ContainerAppProbe() - .withFailureThreshold(1317619791) - .withHttpGet( - new ContainerAppProbeHttpGet() - .withHost("kzzlvmbmpaxmodf") - .withHttpHeaders( - Arrays - .asList( - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("fy") - .withValue("sbpfvmwyhr"))) - .withPath("uyfta") - .withPort(1378791233) - .withScheme(Scheme.HTTPS)) - .withInitialDelaySeconds(369562825) - .withPeriodSeconds(1040923285) - .withSuccessThreshold(842537299) - .withTcpSocket(new ContainerAppProbeTcpSocket().withHost("nubexk").withPort(1989438546)) - .withTerminationGracePeriodSeconds(5387832879483701613L) - .withTimeoutSeconds(487764269) - .withType(Type.STARTUP); - model = BinaryData.fromObject(model).toObject(ContainerAppProbe.class); - Assertions.assertEquals(1317619791, model.failureThreshold()); - Assertions.assertEquals("kzzlvmbmpaxmodf", model.httpGet().host()); - Assertions.assertEquals("fy", model.httpGet().httpHeaders().get(0).name()); - Assertions.assertEquals("sbpfvmwyhr", model.httpGet().httpHeaders().get(0).value()); - Assertions.assertEquals("uyfta", model.httpGet().path()); - Assertions.assertEquals(1378791233, model.httpGet().port()); - Assertions.assertEquals(Scheme.HTTPS, model.httpGet().scheme()); - Assertions.assertEquals(369562825, model.initialDelaySeconds()); - Assertions.assertEquals(1040923285, model.periodSeconds()); - Assertions.assertEquals(842537299, model.successThreshold()); - Assertions.assertEquals("nubexk", model.tcpSocket().host()); - Assertions.assertEquals(1989438546, model.tcpSocket().port()); - Assertions.assertEquals(5387832879483701613L, model.terminationGracePeriodSeconds()); - Assertions.assertEquals(487764269, model.timeoutSeconds()); - Assertions.assertEquals(Type.STARTUP, model.type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteWithResponseMockTests.java deleted file mode 100644 index 80c20b9b23f1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsAuthConfigsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .containerAppsAuthConfigs() - .deleteWithResponse("mfp", "hojeevy", "yhsgz", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteMockTests.java deleted file mode 100644 index 75f04d9e9f24..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.containerApps().delete("ilkmk", "holvdn", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorWithResponseMockTests.java deleted file mode 100644 index 579b6aa1dd41..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorWithResponseMockTests.java +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsDiagnosticsGetDetectorWithResponseMockTests { - @Test - public void testGetDetectorWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"metadata\":{\"id\":\"omzisglrrcz\",\"name\":\"k\",\"description\":\"ltn\",\"author\":\"dhqoawj\",\"category\":\"yueayfbpcmsp\",\"supportTopicList\":[{\"id\":\"rueqthwm\",\"pesId\":\"mbscbbx\"},{\"id\":\"dhxiidlopedbwd\",\"pesId\":\"qyybxubmdnafcbq\"}],\"analysisTypes\":[\"mjel\"],\"type\":\"acigel\",\"score\":74.37067},\"dataset\":[{\"table\":{\"tableName\":\"vwzkj\",\"columns\":[{},{},{},{}],\"rows\":[\"dataonrlkwzdqybxceak\",\"datacptsoqfyiase\",\"datachkrttzr\",\"datazisgykiuemvanb\"]},\"renderingProperties\":{\"type\":974039641,\"title\":\"nrxxbsojklin\",\"description\":\"dptysprqs\",\"isVisible\":true}},{\"table\":{\"tableName\":\"jp\",\"columns\":[{},{},{},{}],\"rows\":[\"datag\",\"dataliufiqwoyxq\"]},\"renderingProperties\":{\"type\":711463850,\"title\":\"hhoucq\",\"description\":\"oj\",\"isVisible\":false}},{\"table\":{\"tableName\":\"zdcgdzbenr\",\"columns\":[{},{},{}],\"rows\":[\"dataetzqd\",\"datatjwfljhznamtua\",\"datamzwcjjncqt\",\"dataz\"]},\"renderingProperties\":{\"type\":1502507838,\"title\":\"bgatzu\",\"description\":\"bxn\",\"isVisible\":false}},{\"table\":{\"tableName\":\"ggahtt\",\"columns\":[{},{}],\"rows\":[\"dataajqfutlx\"]},\"renderingProperties\":{\"type\":1442149444,\"title\":\"sunwqrjzfrgqhaoh\",\"description\":\"buocnjr\",\"isVisible\":true}}],\"status\":{\"message\":\"yryxameblydyv\",\"statusId\":2057319587},\"dataProviderMetadata\":{\"providerName\":\"ocxnehvsmtodl\",\"propertyBag\":[{\"name\":\"pucygvoavyunss\",\"value\":\"ghiee\"},{\"name\":\"lgvvpaseksgbu\",\"value\":\"ntuygdhgaqipir\"},{\"name\":\"wrq\",\"value\":\"ulopmjnlexwhcb\"}]}},\"id\":\"pibkephuu\",\"name\":\"erctatoyin\",\"type\":\"qpbrlc\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Diagnostics response = - manager - .containerAppsDiagnostics() - .getDetectorWithResponse("iowxi", "spnxwqagnepzw", "klsbsbqqqagw", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("mjel", response.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("vwzkj", response.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(974039641, response.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("nrxxbsojklin", response.properties().dataset().get(0).renderingProperties().title()); - Assertions - .assertEquals("dptysprqs", response.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, response.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("yryxameblydyv", response.properties().status().message()); - Assertions.assertEquals(2057319587, response.properties().status().statusId()); - Assertions.assertEquals("ocxnehvsmtodl", response.properties().dataProviderMetadata().providerName()); - Assertions - .assertEquals("pucygvoavyunss", response.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("ghiee", response.properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.java deleted file mode 100644 index 3736d16590e0..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsMockTests.java +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsDiagnosticsListDetectorsMockTests { - @Test - public void testListDetectors() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"metadata\":{\"id\":\"gvgovpbbttefjo\",\"name\":\"ssqyzqedik\",\"description\":\"rdbiqmrjge\",\"author\":\"fqlggw\",\"category\":\"wzcxmjpbyephmgt\",\"supportTopicList\":[{\"id\":\"rc\",\"pesId\":\"fqip\"}],\"analysisTypes\":[\"npomy\"],\"type\":\"cabvnuil\",\"score\":64.833626},\"dataset\":[{\"table\":{\"tableName\":\"paugmrmfjlrxwt\",\"columns\":[{},{}],\"rows\":[\"datafkvcisi\",\"datamoaedsxj\",\"datauivedwcgyeewxeiq\",\"datapsmgo\"]},\"renderingProperties\":{\"type\":1932184921,\"title\":\"ljdlrgmspl\",\"description\":\"auf\",\"isVisible\":true}},{\"table\":{\"tableName\":\"new\",\"columns\":[{}],\"rows\":[\"datampqanxrjkixtwbt\",\"dataoypnyg\",\"datashxcylhkg\",\"datansghp\"]},\"renderingProperties\":{\"type\":1324259721,\"title\":\"drwjjkhvyom\",\"description\":\"luzvxnq\",\"isVisible\":false}},{\"table\":{\"tableName\":\"pd\",\"columns\":[{},{},{}],\"rows\":[\"dataisqcssffxuifmcs\"]},\"renderingProperties\":{\"type\":861169012,\"title\":\"dqzrdzsyloll\",\"description\":\"rc\",\"isVisible\":false}}],\"status\":{\"message\":\"xzji\",\"statusId\":1590781119},\"dataProviderMetadata\":{\"providerName\":\"urkihci\",\"propertyBag\":[{\"name\":\"fx\",\"value\":\"c\"},{\"name\":\"nbkkjanurnnq\",\"value\":\"q\"}]}},\"id\":\"pizxqltgrdogyp\",\"name\":\"rxvbfihwuh\",\"type\":\"ctafsrbxrblm\"}]}"; - - 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("xxkubvphavp", "h", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("npomy", response.iterator().next().properties().metadata().analysisTypes().get(0)); - Assertions - .assertEquals( - "paugmrmfjlrxwt", response.iterator().next().properties().dataset().get(0).table().tableName()); - Assertions - .assertEquals( - 1932184921, response.iterator().next().properties().dataset().get(0).renderingProperties().type()); - Assertions - .assertEquals( - "ljdlrgmspl", response.iterator().next().properties().dataset().get(0).renderingProperties().title()); - Assertions - .assertEquals( - "auf", response.iterator().next().properties().dataset().get(0).renderingProperties().description()); - Assertions - .assertEquals( - true, response.iterator().next().properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("xzji", response.iterator().next().properties().status().message()); - Assertions.assertEquals(1590781119, response.iterator().next().properties().status().statusId()); - Assertions - .assertEquals("urkihci", response.iterator().next().properties().dataProviderMetadata().providerName()); - Assertions - .assertEquals( - "fx", response.iterator().next().properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions - .assertEquals( - "c", response.iterator().next().properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaWithResponseMockTests.java deleted file mode 100644 index 9adf3b935504..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaWithResponseMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Replica; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionReplicasGetReplicaWithResponseMockTests { - @Test - public void testGetReplicaWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"createdTime\":\"2021-04-22T19:07:29Z\",\"runningState\":\"Running\",\"runningStateDetails\":\"nsq\",\"containers\":[{\"name\":\"comlikytwvczc\",\"containerId\":\"k\",\"ready\":false,\"started\":false,\"restartCount\":789888473,\"runningState\":\"Terminated\",\"runningStateDetails\":\"vhb\",\"logStreamEndpoint\":\"nfxtgdd\",\"execEndpoint\":\"th\"}],\"initContainers\":[{\"name\":\"naoyank\",\"containerId\":\"eqswanklty\",\"ready\":false,\"started\":true,\"restartCount\":1174469585,\"runningState\":\"Terminated\",\"runningStateDetails\":\"drlktg\",\"logStreamEndpoint\":\"sggux\",\"execEndpoint\":\"mlwywaeeczg\"}]},\"id\":\"bukklels\",\"name\":\"xblycsxzuj\",\"type\":\"srlsmd\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Replica response = - manager - .containerAppsRevisionReplicas() - .getReplicaWithResponse("rhpw", "gddeimaw", "o", "gkkumuikjcj", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("comlikytwvczc", response.containers().get(0).name()); - Assertions.assertEquals("k", response.containers().get(0).containerId()); - Assertions.assertEquals(false, response.containers().get(0).ready()); - Assertions.assertEquals(false, response.containers().get(0).started()); - Assertions.assertEquals(789888473, response.containers().get(0).restartCount()); - Assertions.assertEquals("naoyank", response.initContainers().get(0).name()); - Assertions.assertEquals("eqswanklty", response.initContainers().get(0).containerId()); - Assertions.assertEquals(false, response.initContainers().get(0).ready()); - Assertions.assertEquals(true, response.initContainers().get(0).started()); - Assertions.assertEquals(1174469585, response.initContainers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasWithResponseMockTests.java deleted file mode 100644 index 188a36db323b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasWithResponseMockTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ReplicaCollection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionReplicasListReplicasWithResponseMockTests { - @Test - public void testListReplicasWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-08-20T05:45:20Z\",\"runningState\":\"Unknown\",\"runningStateDetails\":\"vuhx\",\"containers\":[{},{},{},{}],\"initContainers\":[{},{},{}]},\"id\":\"tznabao\",\"name\":\"nslujd\",\"type\":\"ltymkmvguihywart\"},{\"properties\":{\"createdTime\":\"2021-01-15T23:22:51Z\",\"runningState\":\"Running\",\"runningStateDetails\":\"ky\",\"containers\":[{}],\"initContainers\":[{}]},\"id\":\"j\",\"name\":\"emmucfxh\",\"type\":\"kkflrmymyincqlhr\"},{\"properties\":{\"createdTime\":\"2021-10-10T16:10:58Z\",\"runningState\":\"NotRunning\",\"runningStateDetails\":\"iiovgqcgxu\",\"containers\":[{},{},{},{}],\"initContainers\":[{},{},{}]},\"id\":\"totiowlxteqdptjg\",\"name\":\"dtguk\",\"type\":\"anblwphqlkccu\"},{\"properties\":{\"createdTime\":\"2021-06-12T18:54:42Z\",\"runningState\":\"NotRunning\",\"runningStateDetails\":\"hoi\",\"containers\":[{},{}],\"initContainers\":[{},{},{}]},\"id\":\"iip\",\"name\":\"glvawuwzdufypivl\",\"type\":\"bbjpmcubkmif\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ReplicaCollection response = - manager - .containerAppsRevisionReplicas() - .listReplicasWithResponse( - "sqplpvmjcd", "ewbidyvteowxv", "piudeugfsxzecpa", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionWithResponseMockTests.java deleted file mode 100644 index cbeef4941d5a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionsActivateRevisionWithResponseMockTests { - @Test - public void testActivateRevisionWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .containerAppsRevisions() - .activateRevisionWithResponse("obbpihehc", "cy", "mrqbrjbbmpxdlv", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionWithResponseMockTests.java deleted file mode 100644 index abbcebd7f7cd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionsDeactivateRevisionWithResponseMockTests { - @Test - public void testDeactivateRevisionWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .containerAppsRevisions() - .deactivateRevisionWithResponse("kfrexcrseqwjks", "hud", "zhxogjggsvo", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionWithResponseMockTests.java deleted file mode 100644 index adfd8cfe9a9b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsRevisionsRestartRevisionWithResponseMockTests { - @Test - public void testRestartRevisionWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .containerAppsRevisions() - .restartRevisionWithResponse("jkxibda", "hrkmdyomkxfbvfbh", "y", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java deleted file mode 100644 index 2f123cd1fd8a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ContainerAppsSourceControlsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .containerAppsSourceControls() - .delete("efgnaavuagnt", "taoutnpdct", "hspfefyihd", com.azure.core.util.Context.NONE); - } -} 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 421a48460236..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ContainerResourcesTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ContainerResources; -import org.junit.jupiter.api.Assertions; - -public final class ContainerResourcesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ContainerResources model = - BinaryData - .fromString( - "{\"cpu\":4.886296094520515,\"memory\":\"muwlauwzizxbm\",\"ephemeralStorage\":\"cjefuzmu\"}") - .toObject(ContainerResources.class); - Assertions.assertEquals(4.886296094520515D, model.cpu()); - Assertions.assertEquals("muwlauwzizxbm", model.memory()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ContainerResources model = new ContainerResources().withCpu(4.886296094520515D).withMemory("muwlauwzizxbm"); - model = BinaryData.fromObject(model).toObject(ContainerResources.class); - Assertions.assertEquals(4.886296094520515D, model.cpu()); - Assertions.assertEquals("muwlauwzizxbm", model.memory()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CookieExpirationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CookieExpirationTests.java deleted file mode 100644 index a520ea88850d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CookieExpirationTests.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.CookieExpiration; -import com.azure.resourcemanager.appcontainers.models.CookieExpirationConvention; -import org.junit.jupiter.api.Assertions; - -public final class CookieExpirationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CookieExpiration model = - BinaryData - .fromString("{\"convention\":\"FixedTime\",\"timeToExpiration\":\"y\"}") - .toObject(CookieExpiration.class); - Assertions.assertEquals(CookieExpirationConvention.FIXED_TIME, model.convention()); - Assertions.assertEquals("y", model.timeToExpiration()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CookieExpiration model = - new CookieExpiration().withConvention(CookieExpirationConvention.FIXED_TIME).withTimeToExpiration("y"); - model = BinaryData.fromObject(model).toObject(CookieExpiration.class); - Assertions.assertEquals(CookieExpirationConvention.FIXED_TIME, model.convention()); - Assertions.assertEquals("y", model.timeToExpiration()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainTests.java deleted file mode 100644 index 8d6738b7f3ca..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/CustomDomainTests.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.BindingType; -import com.azure.resourcemanager.appcontainers.models.CustomDomain; -import org.junit.jupiter.api.Assertions; - -public final class CustomDomainTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - CustomDomain model = - BinaryData - .fromString("{\"name\":\"ac\",\"bindingType\":\"SniEnabled\",\"certificateId\":\"fqrhhuaopppc\"}") - .toObject(CustomDomain.class); - Assertions.assertEquals("ac", model.name()); - Assertions.assertEquals(BindingType.SNI_ENABLED, model.bindingType()); - Assertions.assertEquals("fqrhhuaopppc", model.certificateId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - CustomDomain model = - new CustomDomain() - .withName("ac") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId("fqrhhuaopppc"); - model = BinaryData.fromObject(model).toObject(CustomDomain.class); - Assertions.assertEquals("ac", model.name()); - Assertions.assertEquals(BindingType.SNI_ENABLED, model.bindingType()); - Assertions.assertEquals("fqrhhuaopppc", model.certificateId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteWithResponseMockTests.java deleted file mode 100644 index 5758d5a08d1c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DaprComponentsDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .daprComponents() - .deleteWithResponse("zjiihjr", "ybmrzoepnxwd", "wnjkgvfn", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsWithResponseMockTests.java deleted file mode 100644 index a748b5bfa896..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsWithResponseMockTests.java +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class DaprComponentsListSecretsWithResponseMockTests { - @Test - public void testListSecretsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"sbede\",\"value\":\"exkxbhx\"},{\"name\":\"cnulgmnhjevdy\",\"value\":\"fajs\"},{\"name\":\"skmqozzkivyhj\",\"value\":\"iizjixlqfhefkwa\"},{\"name\":\"olro\",\"value\":\"qlmgnlqxsjxt\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DaprSecretsCollection response = - manager - .daprComponents() - .listSecretsWithResponse("xaurs", "ftibtyibuyvpirfq", "pnqn", com.azure.core.util.Context.NONE) - .getValue(); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprConfigurationTests.java deleted file mode 100644 index 7007877b3e7a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprConfigurationTests.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.DaprConfiguration; - -public final class DaprConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprConfiguration model = - BinaryData.fromString("{\"version\":\"idfcxsspuunnoxyh\"}").toObject(DaprConfiguration.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprConfiguration model = new DaprConfiguration(); - model = BinaryData.fromObject(model).toObject(DaprConfiguration.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretTests.java deleted file mode 100644 index 27ed39a23269..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DaprSecret; - -public final class DaprSecretTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSecret model = - BinaryData.fromString("{\"name\":\"eil\",\"value\":\"notyfjfcnjbkcn\"}").toObject(DaprSecret.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSecret model = new DaprSecret(); - model = BinaryData.fromObject(model).toObject(DaprSecret.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretsCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretsCollectionInnerTests.java deleted file mode 100644 index a270b848efff..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprSecretsCollectionInnerTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; -import com.azure.resourcemanager.appcontainers.models.DaprSecret; -import java.util.Arrays; - -public final class DaprSecretsCollectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DaprSecretsCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"name\":\"vpesapskrdqmhjjd\",\"value\":\"ldwkyzxuutkn\"},{\"name\":\"scwsv\",\"value\":\"otogtwrupqs\"},{\"name\":\"nmic\",\"value\":\"vce\"}]}") - .toObject(DaprSecretsCollectionInner.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DaprSecretsCollectionInner model = - new DaprSecretsCollectionInner() - .withValue(Arrays.asList(new DaprSecret(), new DaprSecret(), new DaprSecret())); - model = BinaryData.fromObject(model).toObject(DaprSecretsCollectionInner.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.java deleted file mode 100644 index 96f6f41ecfe6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DaprTests.java +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AppProtocol; -import com.azure.resourcemanager.appcontainers.models.Dapr; -import com.azure.resourcemanager.appcontainers.models.LogLevel; -import org.junit.jupiter.api.Assertions; - -public final class DaprTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Dapr model = - BinaryData - .fromString( - "{\"enabled\":false,\"appId\":\"rfbjf\",\"appProtocol\":\"http\",\"appPort\":2146010865,\"httpReadBufferSize\":22179172,\"httpMaxRequestSize\":2101794539,\"logLevel\":\"info\",\"enableApiLogging\":true}") - .toObject(Dapr.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("rfbjf", model.appId()); - Assertions.assertEquals(AppProtocol.HTTP, model.appProtocol()); - Assertions.assertEquals(2146010865, model.appPort()); - Assertions.assertEquals(22179172, model.httpReadBufferSize()); - Assertions.assertEquals(2101794539, model.httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.INFO, model.logLevel()); - Assertions.assertEquals(true, model.enableApiLogging()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Dapr model = - new Dapr() - .withEnabled(false) - .withAppId("rfbjf") - .withAppProtocol(AppProtocol.HTTP) - .withAppPort(2146010865) - .withHttpReadBufferSize(22179172) - .withHttpMaxRequestSize(2101794539) - .withLogLevel(LogLevel.INFO) - .withEnableApiLogging(true); - model = BinaryData.fromObject(model).toObject(Dapr.class); - Assertions.assertEquals(false, model.enabled()); - Assertions.assertEquals("rfbjf", model.appId()); - Assertions.assertEquals(AppProtocol.HTTP, model.appProtocol()); - Assertions.assertEquals(2146010865, model.appPort()); - Assertions.assertEquals(22179172, model.httpReadBufferSize()); - Assertions.assertEquals(2101794539, model.httpMaxRequestSize()); - Assertions.assertEquals(LogLevel.INFO, 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 1ce9050dcdfd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultAuthorizationPolicyTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.AllowedPrincipals; -import com.azure.resourcemanager.appcontainers.models.DefaultAuthorizationPolicy; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DefaultAuthorizationPolicyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DefaultAuthorizationPolicy model = - BinaryData - .fromString( - "{\"allowedPrincipals\":{\"groups\":[\"mxdcufufsrp\",\"mzidnsezcxtb\"],\"identities\":[\"fycc\",\"newmdwzjeiachbo\"]},\"allowedApplications\":[\"lnrosfqp\",\"eeh\",\"zvypyqrimzinp\",\"swjdkirso\"]}") - .toObject(DefaultAuthorizationPolicy.class); - Assertions.assertEquals("mxdcufufsrp", model.allowedPrincipals().groups().get(0)); - Assertions.assertEquals("fycc", model.allowedPrincipals().identities().get(0)); - Assertions.assertEquals("lnrosfqp", model.allowedApplications().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DefaultAuthorizationPolicy model = - new DefaultAuthorizationPolicy() - .withAllowedPrincipals( - new AllowedPrincipals() - .withGroups(Arrays.asList("mxdcufufsrp", "mzidnsezcxtb")) - .withIdentities(Arrays.asList("fycc", "newmdwzjeiachbo"))) - .withAllowedApplications(Arrays.asList("lnrosfqp", "eeh", "zvypyqrimzinp", "swjdkirso")); - model = BinaryData.fromObject(model).toObject(DefaultAuthorizationPolicy.class); - Assertions.assertEquals("mxdcufufsrp", model.allowedPrincipals().groups().get(0)); - Assertions.assertEquals("fycc", model.allowedPrincipals().identities().get(0)); - Assertions.assertEquals("lnrosfqp", 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 de7c60517d5c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DefaultErrorResponseErrorTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseError; - -public final class DefaultErrorResponseErrorTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DefaultErrorResponseError model = - BinaryData.fromString("{\"innererror\":\"lokeyy\"}").toObject(DefaultErrorResponseError.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DefaultErrorResponseError model = new DefaultErrorResponseError(); - model = BinaryData.fromObject(model).toObject(DefaultErrorResponseError.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataPropertyBagItemTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataPropertyBagItemTests.java deleted file mode 100644 index f4da5fb60726..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataProviderMetadataPropertyBagItemTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticDataProviderMetadataPropertyBagItemTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticDataProviderMetadataPropertyBagItem model = - BinaryData - .fromString("{\"name\":\"r\",\"value\":\"lmywwtkgkxnyed\"}") - .toObject(DiagnosticDataProviderMetadataPropertyBagItem.class); - Assertions.assertEquals("r", model.name()); - Assertions.assertEquals("lmywwtkgkxnyed", model.value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataProviderMetadataPropertyBagItem model = - new DiagnosticDataProviderMetadataPropertyBagItem().withName("r").withValue("lmywwtkgkxnyed"); - model = BinaryData.fromObject(model).toObject(DiagnosticDataProviderMetadataPropertyBagItem.class); - Assertions.assertEquals("r", model.name()); - Assertions.assertEquals("lmywwtkgkxnyed", 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 2cbf11413ca0..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; - -public final class DiagnosticDataProviderMetadataTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticDataProviderMetadata model = - BinaryData - .fromString( - "{\"providerName\":\"vazivjlfr\",\"propertyBag\":[{\"name\":\"ajlkatnw\",\"value\":\"iopid\"},{\"name\":\"qfkuvscxkdmli\",\"value\":\"vibrxkpmloazuruo\"},{\"name\":\"goorbteo\",\"value\":\"fhjxakvvjgs\"}]}") - .toObject(DiagnosticDataProviderMetadata.class); - Assertions.assertEquals("vazivjlfr", model.providerName()); - Assertions.assertEquals("ajlkatnw", model.propertyBag().get(0).name()); - Assertions.assertEquals("iopid", model.propertyBag().get(0).value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataProviderMetadata model = - new DiagnosticDataProviderMetadata() - .withProviderName("vazivjlfr") - .withPropertyBag( - Arrays - .asList( - new DiagnosticDataProviderMetadataPropertyBagItem().withName("ajlkatnw").withValue("iopid"), - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("qfkuvscxkdmli") - .withValue("vibrxkpmloazuruo"), - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("goorbteo") - .withValue("fhjxakvvjgs"))); - model = BinaryData.fromObject(model).toObject(DiagnosticDataProviderMetadata.class); - Assertions.assertEquals("vazivjlfr", model.providerName()); - Assertions.assertEquals("ajlkatnw", model.propertyBag().get(0).name()); - Assertions.assertEquals("iopid", 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 30ee263cca40..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseColumnTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticDataTableResponseColumnTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticDataTableResponseColumn model = - BinaryData - .fromString("{\"columnName\":\"ubdyhgk\",\"dataType\":\"in\",\"columnType\":\"owzfttsttkt\"}") - .toObject(DiagnosticDataTableResponseColumn.class); - Assertions.assertEquals("ubdyhgk", model.columnName()); - Assertions.assertEquals("in", model.dataType()); - Assertions.assertEquals("owzfttsttkt", model.columnType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataTableResponseColumn model = - new DiagnosticDataTableResponseColumn() - .withColumnName("ubdyhgk") - .withDataType("in") - .withColumnType("owzfttsttkt"); - model = BinaryData.fromObject(model).toObject(DiagnosticDataTableResponseColumn.class); - Assertions.assertEquals("ubdyhgk", model.columnName()); - Assertions.assertEquals("in", model.dataType()); - Assertions.assertEquals("owzfttsttkt", 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 cd4989b292ae..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticDataTableResponseObjectTests.java +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticDataTableResponseObjectTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticDataTableResponseObject model = - BinaryData - .fromString( - "{\"tableName\":\"gdufiqnd\",\"columns\":[{\"columnName\":\"ao\",\"dataType\":\"chvcyyysfgdo\",\"columnType\":\"ubiipuipwoqonma\"},{\"columnName\":\"ekni\",\"dataType\":\"hqvcimpevfgmblr\",\"columnType\":\"lbywdxsm\"},{\"columnName\":\"cwrwfs\",\"dataType\":\"fnynszqujizdvoqy\",\"columnType\":\"byowbblgyavutp\"},{\"columnName\":\"joxoism\",\"dataType\":\"sbpimlq\",\"columnType\":\"jxkcgxxlxsff\"}],\"rows\":[\"dataizqzdwlvwlyou\",\"datafgfb\"]}") - .toObject(DiagnosticDataTableResponseObject.class); - Assertions.assertEquals("gdufiqnd", model.tableName()); - Assertions.assertEquals("ao", model.columns().get(0).columnName()); - Assertions.assertEquals("chvcyyysfgdo", model.columns().get(0).dataType()); - Assertions.assertEquals("ubiipuipwoqonma", model.columns().get(0).columnType()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticDataTableResponseObject model = - new DiagnosticDataTableResponseObject() - .withTableName("gdufiqnd") - .withColumns( - Arrays - .asList( - new DiagnosticDataTableResponseColumn() - .withColumnName("ao") - .withDataType("chvcyyysfgdo") - .withColumnType("ubiipuipwoqonma"), - new DiagnosticDataTableResponseColumn() - .withColumnName("ekni") - .withDataType("hqvcimpevfgmblr") - .withColumnType("lbywdxsm"), - new DiagnosticDataTableResponseColumn() - .withColumnName("cwrwfs") - .withDataType("fnynszqujizdvoqy") - .withColumnType("byowbblgyavutp"), - new DiagnosticDataTableResponseColumn() - .withColumnName("joxoism") - .withDataType("sbpimlq") - .withColumnType("jxkcgxxlxsff"))) - .withRows(Arrays.asList("dataizqzdwlvwlyou", "datafgfb")); - model = BinaryData.fromObject(model).toObject(DiagnosticDataTableResponseObject.class); - Assertions.assertEquals("gdufiqnd", model.tableName()); - Assertions.assertEquals("ao", model.columns().get(0).columnName()); - Assertions.assertEquals("chvcyyysfgdo", model.columns().get(0).dataType()); - Assertions.assertEquals("ubiipuipwoqonma", 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 e4a2e054676e..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticRenderingTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticRenderingTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticRendering model = - BinaryData - .fromString( - "{\"type\":631157488,\"title\":\"qactxtgzukxitmmq\",\"description\":\"qqqxhrnxrx\",\"isVisible\":true}") - .toObject(DiagnosticRendering.class); - Assertions.assertEquals(631157488, model.type()); - Assertions.assertEquals("qactxtgzukxitmmq", model.title()); - Assertions.assertEquals("qqqxhrnxrx", model.description()); - Assertions.assertEquals(true, model.isVisible()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticRendering model = - new DiagnosticRendering() - .withType(631157488) - .withTitle("qactxtgzukxitmmq") - .withDescription("qqqxhrnxrx") - .withIsVisible(true); - model = BinaryData.fromObject(model).toObject(DiagnosticRendering.class); - Assertions.assertEquals(631157488, model.type()); - Assertions.assertEquals("qactxtgzukxitmmq", model.title()); - Assertions.assertEquals("qqqxhrnxrx", model.description()); - Assertions.assertEquals(true, model.isVisible()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java deleted file mode 100644 index 54b164330df7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticSupportTopicTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; - -public final class DiagnosticSupportTopicTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticSupportTopic model = - BinaryData - .fromString("{\"id\":\"bkwdlenrds\",\"pesId\":\"ujbazpjuohminyfl\"}") - .toObject(DiagnosticSupportTopic.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticSupportTopic model = new DiagnosticSupportTopic(); - model = BinaryData.fromObject(model).toObject(DiagnosticSupportTopic.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsCollectionInnerTests.java deleted file mode 100644 index 4c91459bd241..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsCollectionInnerTests.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.DiagnosticsCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsCollectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"metadata\":{\"id\":\"bqaays\",\"name\":\"ixqtn\",\"description\":\"tezlwff\",\"author\":\"akpjpqqmtedlt\",\"category\":\"jihy\",\"supportTopicList\":[{}],\"analysisTypes\":[\"vwau\",\"qncygupkvi\",\"mdscwxqupev\"],\"type\":\"f\",\"score\":56.80255},\"dataset\":[{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}}],\"status\":{\"message\":\"ypelmcu\",\"statusId\":1157427195},\"dataProviderMetadata\":{\"providerName\":\"jxyfwnylrcoolstt\",\"propertyBag\":[{},{}]}},\"id\":\"w\",\"name\":\"kbnujr\",\"type\":\"wvtylbfpncurdo\"},{\"properties\":{\"metadata\":{\"id\":\"thtywub\",\"name\":\"bihwqknfdnt\",\"description\":\"chrdgoihxumwcto\",\"author\":\"zj\",\"category\":\"udfdlwgg\",\"supportTopicList\":[{}],\"analysisTypes\":[\"tov\",\"tgseinqfiufxqkn\",\"irgne\"],\"type\":\"twqmsniffcdmqnr\",\"score\":65.80664},\"dataset\":[{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}},{\"table\":{},\"renderingProperties\":{}}],\"status\":{\"message\":\"dhcrati\",\"statusId\":142407954},\"dataProviderMetadata\":{\"providerName\":\"asxifto\",\"propertyBag\":[{},{},{},{}]}},\"id\":\"zh\",\"name\":\"tw\",\"type\":\"sgogczhonnxk\"}],\"nextLink\":\"gnyhmossxkkg\"}") - .toObject(DiagnosticsCollectionInner.class); - Assertions.assertEquals("vwau", model.value().get(0).properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("ypelmcu", model.value().get(0).properties().status().message()); - Assertions.assertEquals(1157427195, model.value().get(0).properties().status().statusId()); - Assertions - .assertEquals("jxyfwnylrcoolstt", model.value().get(0).properties().dataProviderMetadata().providerName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsCollectionInner model = - new DiagnosticsCollectionInner() - .withValue( - Arrays - .asList( - new DiagnosticsInner() - .withProperties( - new DiagnosticsProperties() - .withMetadata( - new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("vwau", "qncygupkvi", "mdscwxqupev"))) - .withDataset( - Arrays - .asList( - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()), - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()))) - .withStatus( - new DiagnosticsStatus().withMessage("ypelmcu").withStatusId(1157427195)) - .withDataProviderMetadata( - new DiagnosticDataProviderMetadata() - .withProviderName("jxyfwnylrcoolstt") - .withPropertyBag( - Arrays - .asList( - new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem())))), - new DiagnosticsInner() - .withProperties( - new DiagnosticsProperties() - .withMetadata( - new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("tov", "tgseinqfiufxqkn", "irgne"))) - .withDataset( - Arrays - .asList( - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()), - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()), - new DiagnosticsDataApiResponse() - .withTable(new DiagnosticDataTableResponseObject()) - .withRenderingProperties(new DiagnosticRendering()))) - .withStatus( - new DiagnosticsStatus().withMessage("dhcrati").withStatusId(142407954)) - .withDataProviderMetadata( - new DiagnosticDataProviderMetadata() - .withProviderName("asxifto") - .withPropertyBag( - Arrays - .asList( - new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem(), - new DiagnosticDataProviderMetadataPropertyBagItem())))))); - model = BinaryData.fromObject(model).toObject(DiagnosticsCollectionInner.class); - Assertions.assertEquals("vwau", model.value().get(0).properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("ypelmcu", model.value().get(0).properties().status().message()); - Assertions.assertEquals(1157427195, model.value().get(0).properties().status().statusId()); - Assertions - .assertEquals("jxyfwnylrcoolstt", model.value().get(0).properties().dataProviderMetadata().providerName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java deleted file mode 100644 index 76de19a59494..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDataApiResponseTests.java +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsDataApiResponseTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsDataApiResponse model = - BinaryData - .fromString( - "{\"table\":{\"tableName\":\"wmd\",\"columns\":[{\"columnName\":\"klvxwmyg\",\"dataType\":\"pgpqchiszepnnb\",\"columnType\":\"rxgibbd\"},{\"columnName\":\"confozauors\",\"dataType\":\"okwbqplh\",\"columnType\":\"nuuepzlrp\"}],\"rows\":[\"datasoldweyuqdunv\",\"datannrwrbiork\"]},\"renderingProperties\":{\"type\":476504183,\"title\":\"jhhgdnhxmsi\",\"description\":\"omi\",\"isVisible\":false}}") - .toObject(DiagnosticsDataApiResponse.class); - Assertions.assertEquals("wmd", model.table().tableName()); - Assertions.assertEquals("klvxwmyg", model.table().columns().get(0).columnName()); - Assertions.assertEquals("pgpqchiszepnnb", model.table().columns().get(0).dataType()); - Assertions.assertEquals("rxgibbd", model.table().columns().get(0).columnType()); - Assertions.assertEquals(476504183, model.renderingProperties().type()); - Assertions.assertEquals("jhhgdnhxmsi", model.renderingProperties().title()); - Assertions.assertEquals("omi", model.renderingProperties().description()); - Assertions.assertEquals(false, model.renderingProperties().isVisible()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsDataApiResponse model = - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("wmd") - .withColumns( - Arrays - .asList( - new DiagnosticDataTableResponseColumn() - .withColumnName("klvxwmyg") - .withDataType("pgpqchiszepnnb") - .withColumnType("rxgibbd"), - new DiagnosticDataTableResponseColumn() - .withColumnName("confozauors") - .withDataType("okwbqplh") - .withColumnType("nuuepzlrp"))) - .withRows(Arrays.asList("datasoldweyuqdunv", "datannrwrbiork"))) - .withRenderingProperties( - new DiagnosticRendering() - .withType(476504183) - .withTitle("jhhgdnhxmsi") - .withDescription("omi") - .withIsVisible(false)); - model = BinaryData.fromObject(model).toObject(DiagnosticsDataApiResponse.class); - Assertions.assertEquals("wmd", model.table().tableName()); - Assertions.assertEquals("klvxwmyg", model.table().columns().get(0).columnName()); - Assertions.assertEquals("pgpqchiszepnnb", model.table().columns().get(0).dataType()); - Assertions.assertEquals("rxgibbd", model.table().columns().get(0).columnType()); - Assertions.assertEquals(476504183, model.renderingProperties().type()); - Assertions.assertEquals("jhhgdnhxmsi", model.renderingProperties().title()); - Assertions.assertEquals("omi", model.renderingProperties().description()); - Assertions.assertEquals(false, model.renderingProperties().isVisible()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDefinitionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDefinitionTests.java deleted file mode 100644 index 3fc7910422a1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsDefinitionTests.java +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsDefinitionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsDefinition model = - BinaryData - .fromString( - "{\"id\":\"yjkqabqgzslesjcb\",\"name\":\"rnntiewdjcv\",\"description\":\"uwrbehwagoh\",\"author\":\"f\",\"category\":\"mrqemvvhmx\",\"supportTopicList\":[{\"id\":\"futacoebjvewzc\",\"pesId\":\"nmwcpmgu\"},{\"id\":\"draufactkah\",\"pesId\":\"v\"}],\"analysisTypes\":[\"ziuxxpshnee\"],\"type\":\"lfg\",\"score\":26.94627}") - .toObject(DiagnosticsDefinition.class); - Assertions.assertEquals("ziuxxpshnee", model.analysisTypes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsDefinition model = - new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic(), new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("ziuxxpshnee")); - model = BinaryData.fromObject(model).toObject(DiagnosticsDefinition.class); - Assertions.assertEquals("ziuxxpshnee", 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 ab8eed7c778f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsInnerTests.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.DiagnosticsInner; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsInner model = - BinaryData - .fromString( - "{\"properties\":{\"metadata\":{\"id\":\"gh\",\"name\":\"bdhqxvcxgf\",\"description\":\"dsofbshrns\",\"author\":\"uswdv\",\"category\":\"ybycnunvj\",\"supportTopicList\":[{\"id\":\"f\",\"pesId\":\"nopqgikyzirtx\"}],\"analysisTypes\":[\"x\",\"ejnt\",\"sewgioilqukr\"],\"type\":\"xtqmieoxor\",\"score\":64.62172},\"dataset\":[{\"table\":{\"tableName\":\"omtbghhavgrvkff\",\"columns\":[{},{},{},{}],\"rows\":[\"datapjbi\",\"datagjmfxumvfcl\"]},\"renderingProperties\":{\"type\":2107633088,\"title\":\"xnbkfezzxscyhwzd\",\"description\":\"rujbzbomvzzbtdc\",\"isVisible\":true}},{\"table\":{\"tableName\":\"yujviylwdshfssn\",\"columns\":[{}],\"rows\":[\"datafrymsgaojfmwnc\"]},\"renderingProperties\":{\"type\":700953056,\"title\":\"hirctymoxoftpipi\",\"description\":\"czuhxacpqjlihh\",\"isVisible\":true}},{\"table\":{\"tableName\":\"kasdvlm\",\"columns\":[{},{},{},{}],\"rows\":[\"datax\",\"datalucvpam\",\"datasreuzvxurisjnh\",\"dataytxifqjzgxmrh\"]},\"renderingProperties\":{\"type\":403382899,\"title\":\"cesutrgjupauut\",\"description\":\"oqh\",\"isVisible\":false}},{\"table\":{\"tableName\":\"g\",\"columns\":[{},{},{}],\"rows\":[\"dataqntcypsxjvfoimwk\",\"datalirc\"]},\"renderingProperties\":{\"type\":1956254866,\"title\":\"ydfce\",\"description\":\"vlhv\",\"isVisible\":true}}],\"status\":{\"message\":\"t\",\"statusId\":642737212},\"dataProviderMetadata\":{\"providerName\":\"nawjslbiwkojgcy\",\"propertyBag\":[{\"name\":\"mznbaeqphch\",\"value\":\"rn\"},{\"name\":\"x\",\"value\":\"uwrykqgaifmvikl\"},{\"name\":\"dvk\",\"value\":\"ejd\"}]}},\"id\":\"nxcvds\",\"name\":\"hnjivo\",\"type\":\"v\"}") - .toObject(DiagnosticsInner.class); - Assertions.assertEquals("x", model.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("omtbghhavgrvkff", model.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(2107633088, model.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("xnbkfezzxscyhwzd", model.properties().dataset().get(0).renderingProperties().title()); - Assertions - .assertEquals("rujbzbomvzzbtdc", model.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, model.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("t", model.properties().status().message()); - Assertions.assertEquals(642737212, model.properties().status().statusId()); - Assertions.assertEquals("nawjslbiwkojgcy", model.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("mznbaeqphch", model.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("rn", model.properties().dataProviderMetadata().propertyBag().get(0).value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsInner model = - new DiagnosticsInner() - .withProperties( - new DiagnosticsProperties() - .withMetadata( - new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("x", "ejnt", "sewgioilqukr"))) - .withDataset( - Arrays - .asList( - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("omtbghhavgrvkff") - .withColumns( - Arrays - .asList( - new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn())) - .withRows(Arrays.asList("datapjbi", "datagjmfxumvfcl"))) - .withRenderingProperties( - new DiagnosticRendering() - .withType(2107633088) - .withTitle("xnbkfezzxscyhwzd") - .withDescription("rujbzbomvzzbtdc") - .withIsVisible(true)), - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("yujviylwdshfssn") - .withColumns(Arrays.asList(new DiagnosticDataTableResponseColumn())) - .withRows(Arrays.asList("datafrymsgaojfmwnc"))) - .withRenderingProperties( - new DiagnosticRendering() - .withType(700953056) - .withTitle("hirctymoxoftpipi") - .withDescription("czuhxacpqjlihh") - .withIsVisible(true)), - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("kasdvlm") - .withColumns( - Arrays - .asList( - new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn())) - .withRows( - Arrays - .asList( - "datax", - "datalucvpam", - "datasreuzvxurisjnh", - "dataytxifqjzgxmrh"))) - .withRenderingProperties( - new DiagnosticRendering() - .withType(403382899) - .withTitle("cesutrgjupauut") - .withDescription("oqh") - .withIsVisible(false)), - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("g") - .withColumns( - Arrays - .asList( - new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn(), - new DiagnosticDataTableResponseColumn())) - .withRows(Arrays.asList("dataqntcypsxjvfoimwk", "datalirc"))) - .withRenderingProperties( - new DiagnosticRendering() - .withType(1956254866) - .withTitle("ydfce") - .withDescription("vlhv") - .withIsVisible(true)))) - .withStatus(new DiagnosticsStatus().withMessage("t").withStatusId(642737212)) - .withDataProviderMetadata( - new DiagnosticDataProviderMetadata() - .withProviderName("nawjslbiwkojgcy") - .withPropertyBag( - Arrays - .asList( - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("mznbaeqphch") - .withValue("rn"), - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("x") - .withValue("uwrykqgaifmvikl"), - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("dvk") - .withValue("ejd"))))); - model = BinaryData.fromObject(model).toObject(DiagnosticsInner.class); - Assertions.assertEquals("x", model.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("omtbghhavgrvkff", model.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(2107633088, model.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("xnbkfezzxscyhwzd", model.properties().dataset().get(0).renderingProperties().title()); - Assertions - .assertEquals("rujbzbomvzzbtdc", model.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(true, model.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("t", model.properties().status().message()); - Assertions.assertEquals(642737212, model.properties().status().statusId()); - Assertions.assertEquals("nawjslbiwkojgcy", model.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("mznbaeqphch", model.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("rn", model.properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java deleted file mode 100644 index 61ca916d10c3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsPropertiesTests.java +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadata; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataProviderMetadataPropertyBagItem; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseColumn; -import com.azure.resourcemanager.appcontainers.models.DiagnosticDataTableResponseObject; -import com.azure.resourcemanager.appcontainers.models.DiagnosticRendering; -import com.azure.resourcemanager.appcontainers.models.DiagnosticSupportTopic; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDataApiResponse; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsDefinition; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsProperties model = - BinaryData - .fromString( - "{\"metadata\":{\"id\":\"v\",\"name\":\"zgemjdftuljlt\",\"description\":\"ceamtm\",\"author\":\"u\",\"category\":\"ejwcwwqiok\",\"supportTopicList\":[{\"id\":\"mojmsvpkjprvkw\",\"pesId\":\"zqljyxgtczh\"}],\"analysisTypes\":[\"bsdshmkxmaehvbbx\",\"ripltf\"],\"type\":\"tbaxk\",\"score\":35.67025},\"dataset\":[{\"table\":{\"tableName\":\"pyklyhpluodpvru\",\"columns\":[{\"columnName\":\"zibt\",\"dataType\":\"stgktst\",\"columnType\":\"xeclzedqbcvhzlhp\"}],\"rows\":[\"dataqkdlw\",\"dataqfbumlkxtrqjf\",\"datamlmbtxhwgfwsrta\"]},\"renderingProperties\":{\"type\":337783528,\"title\":\"brhu\",\"description\":\"kh\",\"isVisible\":false}}],\"status\":{\"message\":\"ookk\",\"statusId\":870237510},\"dataProviderMetadata\":{\"providerName\":\"vleo\",\"propertyBag\":[{\"name\":\"uiqtqzfavy\",\"value\":\"qqybarye\"}]}}") - .toObject(DiagnosticsProperties.class); - Assertions.assertEquals("bsdshmkxmaehvbbx", model.metadata().analysisTypes().get(0)); - Assertions.assertEquals("pyklyhpluodpvru", model.dataset().get(0).table().tableName()); - Assertions.assertEquals("zibt", model.dataset().get(0).table().columns().get(0).columnName()); - Assertions.assertEquals("stgktst", model.dataset().get(0).table().columns().get(0).dataType()); - Assertions.assertEquals("xeclzedqbcvhzlhp", model.dataset().get(0).table().columns().get(0).columnType()); - Assertions.assertEquals(337783528, model.dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("brhu", model.dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("kh", model.dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(false, model.dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("ookk", model.status().message()); - Assertions.assertEquals(870237510, model.status().statusId()); - Assertions.assertEquals("vleo", model.dataProviderMetadata().providerName()); - Assertions.assertEquals("uiqtqzfavy", model.dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("qqybarye", model.dataProviderMetadata().propertyBag().get(0).value()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsProperties model = - new DiagnosticsProperties() - .withMetadata( - new DiagnosticsDefinition() - .withSupportTopicList(Arrays.asList(new DiagnosticSupportTopic())) - .withAnalysisTypes(Arrays.asList("bsdshmkxmaehvbbx", "ripltf"))) - .withDataset( - Arrays - .asList( - new DiagnosticsDataApiResponse() - .withTable( - new DiagnosticDataTableResponseObject() - .withTableName("pyklyhpluodpvru") - .withColumns( - Arrays - .asList( - new DiagnosticDataTableResponseColumn() - .withColumnName("zibt") - .withDataType("stgktst") - .withColumnType("xeclzedqbcvhzlhp"))) - .withRows( - Arrays.asList("dataqkdlw", "dataqfbumlkxtrqjf", "datamlmbtxhwgfwsrta"))) - .withRenderingProperties( - new DiagnosticRendering() - .withType(337783528) - .withTitle("brhu") - .withDescription("kh") - .withIsVisible(false)))) - .withStatus(new DiagnosticsStatus().withMessage("ookk").withStatusId(870237510)) - .withDataProviderMetadata( - new DiagnosticDataProviderMetadata() - .withProviderName("vleo") - .withPropertyBag( - Arrays - .asList( - new DiagnosticDataProviderMetadataPropertyBagItem() - .withName("uiqtqzfavy") - .withValue("qqybarye")))); - model = BinaryData.fromObject(model).toObject(DiagnosticsProperties.class); - Assertions.assertEquals("bsdshmkxmaehvbbx", model.metadata().analysisTypes().get(0)); - Assertions.assertEquals("pyklyhpluodpvru", model.dataset().get(0).table().tableName()); - Assertions.assertEquals("zibt", model.dataset().get(0).table().columns().get(0).columnName()); - Assertions.assertEquals("stgktst", model.dataset().get(0).table().columns().get(0).dataType()); - Assertions.assertEquals("xeclzedqbcvhzlhp", model.dataset().get(0).table().columns().get(0).columnType()); - Assertions.assertEquals(337783528, model.dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("brhu", model.dataset().get(0).renderingProperties().title()); - Assertions.assertEquals("kh", model.dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(false, model.dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("ookk", model.status().message()); - Assertions.assertEquals(870237510, model.status().statusId()); - Assertions.assertEquals("vleo", model.dataProviderMetadata().providerName()); - Assertions.assertEquals("uiqtqzfavy", model.dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("qqybarye", 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 a7b7b21c68dc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/DiagnosticsStatusTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsStatus; -import org.junit.jupiter.api.Assertions; - -public final class DiagnosticsStatusTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - DiagnosticsStatus model = - BinaryData.fromString("{\"message\":\"isavok\",\"statusId\":1487761087}").toObject(DiagnosticsStatus.class); - Assertions.assertEquals("isavok", model.message()); - Assertions.assertEquals(1487761087, model.statusId()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - DiagnosticsStatus model = new DiagnosticsStatus().withMessage("isavok").withStatusId(1487761087); - model = BinaryData.fromObject(model).toObject(DiagnosticsStatus.class); - Assertions.assertEquals("isavok", model.message()); - Assertions.assertEquals(1487761087, model.statusId()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.java deleted file mode 100644 index af1e855911c3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ExtendedLocationTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; -import com.azure.resourcemanager.appcontainers.models.ExtendedLocationTypes; -import org.junit.jupiter.api.Assertions; - -public final class ExtendedLocationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ExtendedLocation model = - BinaryData.fromString("{\"name\":\"zf\",\"type\":\"CustomLocation\"}").toObject(ExtendedLocation.class); - Assertions.assertEquals("zf", model.name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ExtendedLocation model = new ExtendedLocation().withName("zf").withType(ExtendedLocationTypes.CUSTOM_LOCATION); - model = BinaryData.fromObject(model).toObject(ExtendedLocation.class); - Assertions.assertEquals("zf", model.name()); - Assertions.assertEquals(ExtendedLocationTypes.CUSTOM_LOCATION, model.type()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ForwardProxyTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ForwardProxyTests.java deleted file mode 100644 index 0574ddd04012..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ForwardProxyTests.java +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ForwardProxy; -import com.azure.resourcemanager.appcontainers.models.ForwardProxyConvention; -import org.junit.jupiter.api.Assertions; - -public final class ForwardProxyTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ForwardProxy model = - BinaryData - .fromString( - "{\"convention\":\"NoProxy\",\"customHostHeaderName\":\"chcbonqvpkvlrxnj\",\"customProtoHeaderName\":\"seiphe\"}") - .toObject(ForwardProxy.class); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.convention()); - Assertions.assertEquals("chcbonqvpkvlrxnj", model.customHostHeaderName()); - Assertions.assertEquals("seiphe", model.customProtoHeaderName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ForwardProxy model = - new ForwardProxy() - .withConvention(ForwardProxyConvention.NO_PROXY) - .withCustomHostHeaderName("chcbonqvpkvlrxnj") - .withCustomProtoHeaderName("seiphe"); - model = BinaryData.fromObject(model).toObject(ForwardProxy.class); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.convention()); - Assertions.assertEquals("chcbonqvpkvlrxnj", model.customHostHeaderName()); - Assertions.assertEquals("seiphe", model.customProtoHeaderName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GlobalValidationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GlobalValidationTests.java deleted file mode 100644 index 691e954f7a66..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/GlobalValidationTests.java +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.GlobalValidation; -import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActionV2; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class GlobalValidationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - GlobalValidation model = - BinaryData - .fromString( - "{\"unauthenticatedClientAction\":\"Return401\",\"redirectToProvider\":\"yhxhu\",\"excludedPaths\":[\"ftyxolniw\"]}") - .toObject(GlobalValidation.class); - Assertions.assertEquals(UnauthenticatedClientActionV2.RETURN401, model.unauthenticatedClientAction()); - Assertions.assertEquals("yhxhu", model.redirectToProvider()); - Assertions.assertEquals("ftyxolniw", model.excludedPaths().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - GlobalValidation model = - new GlobalValidation() - .withUnauthenticatedClientAction(UnauthenticatedClientActionV2.RETURN401) - .withRedirectToProvider("yhxhu") - .withExcludedPaths(Arrays.asList("ftyxolniw")); - model = BinaryData.fromObject(model).toObject(GlobalValidation.class); - Assertions.assertEquals(UnauthenticatedClientActionV2.RETURN401, model.unauthenticatedClientAction()); - Assertions.assertEquals("yhxhu", model.redirectToProvider()); - Assertions.assertEquals("ftyxolniw", model.excludedPaths().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.java deleted file mode 100644 index 2760f3932dc1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsRoutesTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.HttpSettingsRoutes; -import org.junit.jupiter.api.Assertions; - -public final class HttpSettingsRoutesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HttpSettingsRoutes model = - BinaryData.fromString("{\"apiPrefix\":\"nzscxa\"}").toObject(HttpSettingsRoutes.class); - Assertions.assertEquals("nzscxa", model.apiPrefix()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpSettingsRoutes model = new HttpSettingsRoutes().withApiPrefix("nzscxa"); - model = BinaryData.fromObject(model).toObject(HttpSettingsRoutes.class); - Assertions.assertEquals("nzscxa", 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 57936f392b44..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/HttpSettingsTests.java +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ForwardProxy; -import com.azure.resourcemanager.appcontainers.models.ForwardProxyConvention; -import com.azure.resourcemanager.appcontainers.models.HttpSettings; -import com.azure.resourcemanager.appcontainers.models.HttpSettingsRoutes; -import org.junit.jupiter.api.Assertions; - -public final class HttpSettingsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - HttpSettings model = - BinaryData - .fromString( - "{\"requireHttps\":false,\"routes\":{\"apiPrefix\":\"onlebxetqgtzxdpn\"},\"forwardProxy\":{\"convention\":\"NoProxy\",\"customHostHeaderName\":\"xrjfeallnwsub\",\"customProtoHeaderName\":\"njampm\"}}") - .toObject(HttpSettings.class); - Assertions.assertEquals(false, model.requireHttps()); - Assertions.assertEquals("onlebxetqgtzxdpn", model.routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.forwardProxy().convention()); - Assertions.assertEquals("xrjfeallnwsub", model.forwardProxy().customHostHeaderName()); - Assertions.assertEquals("njampm", model.forwardProxy().customProtoHeaderName()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - HttpSettings model = - new HttpSettings() - .withRequireHttps(false) - .withRoutes(new HttpSettingsRoutes().withApiPrefix("onlebxetqgtzxdpn")) - .withForwardProxy( - new ForwardProxy() - .withConvention(ForwardProxyConvention.NO_PROXY) - .withCustomHostHeaderName("xrjfeallnwsub") - .withCustomProtoHeaderName("njampm")); - model = BinaryData.fromObject(model).toObject(HttpSettings.class); - Assertions.assertEquals(false, model.requireHttps()); - Assertions.assertEquals("onlebxetqgtzxdpn", model.routes().apiPrefix()); - Assertions.assertEquals(ForwardProxyConvention.NO_PROXY, model.forwardProxy().convention()); - Assertions.assertEquals("xrjfeallnwsub", model.forwardProxy().customHostHeaderName()); - Assertions.assertEquals("njampm", model.forwardProxy().customProtoHeaderName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressStickySessionsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressStickySessionsTests.java deleted file mode 100644 index 7bd342097aa1..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IngressStickySessionsTests.java +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Affinity; -import com.azure.resourcemanager.appcontainers.models.IngressStickySessions; -import org.junit.jupiter.api.Assertions; - -public final class IngressStickySessionsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IngressStickySessions model = - BinaryData.fromString("{\"affinity\":\"sticky\"}").toObject(IngressStickySessions.class); - Assertions.assertEquals(Affinity.STICKY, model.affinity()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IngressStickySessions model = new IngressStickySessions().withAffinity(Affinity.STICKY); - model = BinaryData.fromObject(model).toObject(IngressStickySessions.class); - Assertions.assertEquals(Affinity.STICKY, model.affinity()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.java deleted file mode 100644 index 0763fa532f19..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/IpSecurityRestrictionRuleTests.java +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Action; -import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; -import org.junit.jupiter.api.Assertions; - -public final class IpSecurityRestrictionRuleTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - IpSecurityRestrictionRule model = - BinaryData - .fromString( - "{\"name\":\"eqx\",\"description\":\"z\",\"ipAddressRange\":\"ahzxctobgbk\",\"action\":\"Allow\"}") - .toObject(IpSecurityRestrictionRule.class); - Assertions.assertEquals("eqx", model.name()); - Assertions.assertEquals("z", model.description()); - Assertions.assertEquals("ahzxctobgbk", model.ipAddressRange()); - Assertions.assertEquals(Action.ALLOW, model.action()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - IpSecurityRestrictionRule model = - new IpSecurityRestrictionRule() - .withName("eqx") - .withDescription("z") - .withIpAddressRange("ahzxctobgbk") - .withAction(Action.ALLOW); - model = BinaryData.fromObject(model).toObject(IpSecurityRestrictionRule.class); - Assertions.assertEquals("eqx", model.name()); - Assertions.assertEquals("z", model.description()); - Assertions.assertEquals("ahzxctobgbk", model.ipAddressRange()); - Assertions.assertEquals(Action.ALLOW, model.action()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationManualTriggerConfigTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationManualTriggerConfigTests.java deleted file mode 100644 index b01beabffa0f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationManualTriggerConfigTests.java +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JobConfigurationManualTriggerConfig; -import org.junit.jupiter.api.Assertions; - -public final class JobConfigurationManualTriggerConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobConfigurationManualTriggerConfig model = - BinaryData - .fromString("{\"replicaCompletionCount\":598099932,\"parallelism\":1189347509}") - .toObject(JobConfigurationManualTriggerConfig.class); - Assertions.assertEquals(598099932, model.replicaCompletionCount()); - Assertions.assertEquals(1189347509, model.parallelism()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobConfigurationManualTriggerConfig model = - new JobConfigurationManualTriggerConfig().withReplicaCompletionCount(598099932).withParallelism(1189347509); - model = BinaryData.fromObject(model).toObject(JobConfigurationManualTriggerConfig.class); - Assertions.assertEquals(598099932, model.replicaCompletionCount()); - Assertions.assertEquals(1189347509, model.parallelism()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationScheduleTriggerConfigTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationScheduleTriggerConfigTests.java deleted file mode 100644 index 2f72bfaaa101..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobConfigurationScheduleTriggerConfigTests.java +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.JobConfigurationScheduleTriggerConfig; -import org.junit.jupiter.api.Assertions; - -public final class JobConfigurationScheduleTriggerConfigTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobConfigurationScheduleTriggerConfig model = - BinaryData - .fromString( - "{\"replicaCompletionCount\":540645493,\"cronExpression\":\"liqhzvhx\",\"parallelism\":1549555977}") - .toObject(JobConfigurationScheduleTriggerConfig.class); - Assertions.assertEquals(540645493, model.replicaCompletionCount()); - Assertions.assertEquals("liqhzvhx", model.cronExpression()); - Assertions.assertEquals(1549555977, model.parallelism()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobConfigurationScheduleTriggerConfig model = - new JobConfigurationScheduleTriggerConfig() - .withReplicaCompletionCount(540645493) - .withCronExpression("liqhzvhx") - .withParallelism(1549555977); - model = BinaryData.fromObject(model).toObject(JobConfigurationScheduleTriggerConfig.class); - Assertions.assertEquals(540645493, model.replicaCompletionCount()); - Assertions.assertEquals("liqhzvhx", model.cronExpression()); - Assertions.assertEquals(1549555977, model.parallelism()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionBaseInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionBaseInnerTests.java deleted file mode 100644 index 1d1d65256ecc..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobExecutionBaseInnerTests.java +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.JobExecutionBaseInner; -import org.junit.jupiter.api.Assertions; - -public final class JobExecutionBaseInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JobExecutionBaseInner model = - BinaryData.fromString("{\"name\":\"pgfewetwlyx\",\"id\":\"cxy\"}").toObject(JobExecutionBaseInner.class); - Assertions.assertEquals("pgfewetwlyx", model.name()); - Assertions.assertEquals("cxy", model.id()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JobExecutionBaseInner model = new JobExecutionBaseInner().withName("pgfewetwlyx").withId("cxy"); - model = BinaryData.fromObject(model).toObject(JobExecutionBaseInner.class); - Assertions.assertEquals("pgfewetwlyx", model.name()); - Assertions.assertEquals("cxy", model.id()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteMockTests.java deleted file mode 100644 index 59c80438c7ad..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class JobsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.jobs().delete("alwcjgckbb", "ccgzpraoxnyu", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListMockTests.java deleted file mode 100644 index 21c67aab759a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsExecutionsListMockTests.java +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.JobExecution; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class JobsExecutionsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"lfg\",\"id\":\"nnnoytz\",\"type\":\"sewxigpxvkqm\",\"status\":\"Running\",\"startTime\":\"2021-07-26T17:50:31Z\",\"endTime\":\"2021-01-19T22:27:27Z\",\"template\":{\"containers\":[{\"image\":\"ify\",\"name\":\"zeyuubeidszl\",\"command\":[\"oithg\"],\"args\":[\"fltgvdiho\",\"nkrxwetwkdrcy\"],\"env\":[{},{},{}],\"resources\":{\"cpu\":90.34799204771788,\"memory\":\"uzdqumoenod\",\"ephemeralStorage\":\"ienhqhskndnelq\"}}],\"initContainers\":[{\"image\":\"lknwfoanniyop\",\"name\":\"xivcnrlyxnu\",\"command\":[\"p\",\"blkwqpatvbqs\",\"tcjb\",\"tvivuzqym\"],\"args\":[\"wogtgitsq\"],\"env\":[{},{}],\"resources\":{\"cpu\":25.130681898907213,\"memory\":\"banf\",\"ephemeralStorage\":\"ds\"}},{\"image\":\"mxeatkdbmwnrdjy\",\"name\":\"q\",\"command\":[\"omhjrmkuhm\",\"xljalfihc\",\"mobcan\",\"de\"],\"args\":[\"cwg\",\"xf\",\"vaknokzwjj\",\"r\"],\"env\":[{},{},{}],\"resources\":{\"cpu\":55.14214526010209,\"memory\":\"yfytpq\",\"ephemeralStorage\":\"x\"}},{\"image\":\"m\",\"name\":\"jivyqlkjuv\",\"command\":[\"msl\",\"oyovwz\",\"bpqvybefg\"],\"args\":[\"nokcv\"],\"env\":[{},{},{},{}],\"resources\":{\"cpu\":75.35469796285636,\"memory\":\"vcuartrhun\",\"ephemeralStorage\":\"iryky\"}}]}}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = - manager.jobsExecutions().list("sykvwjtqpke", "myltj", "rspxklur", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("lfg", response.iterator().next().name()); - Assertions.assertEquals("nnnoytz", response.iterator().next().id()); - Assertions.assertEquals("sewxigpxvkqm", response.iterator().next().type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-26T17:50:31Z"), response.iterator().next().startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-19T22:27:27Z"), response.iterator().next().endTime()); - Assertions.assertEquals("ify", response.iterator().next().template().containers().get(0).image()); - Assertions.assertEquals("zeyuubeidszl", response.iterator().next().template().containers().get(0).name()); - Assertions.assertEquals("oithg", response.iterator().next().template().containers().get(0).command().get(0)); - Assertions.assertEquals("fltgvdiho", response.iterator().next().template().containers().get(0).args().get(0)); - Assertions - .assertEquals( - 90.34799204771788D, response.iterator().next().template().containers().get(0).resources().cpu()); - Assertions - .assertEquals( - "uzdqumoenod", response.iterator().next().template().containers().get(0).resources().memory()); - Assertions.assertEquals("lknwfoanniyop", response.iterator().next().template().initContainers().get(0).image()); - Assertions.assertEquals("xivcnrlyxnu", response.iterator().next().template().initContainers().get(0).name()); - Assertions.assertEquals("p", response.iterator().next().template().initContainers().get(0).command().get(0)); - Assertions - .assertEquals("wogtgitsq", response.iterator().next().template().initContainers().get(0).args().get(0)); - Assertions - .assertEquals( - 25.130681898907213D, response.iterator().next().template().initContainers().get(0).resources().cpu()); - Assertions - .assertEquals("banf", response.iterator().next().template().initContainers().get(0).resources().memory()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionMockTests.java deleted file mode 100644 index f0a5d576c078..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopExecutionMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class JobsStopExecutionMockTests { - @Test - public void testStopExecution() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.jobs().stopExecution("aqylkjztji", "azjcgmxitpfin", "cpdltkrlg", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsMockTests.java deleted file mode 100644 index 6370a6fe1551..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JobsStopMultipleExecutionsMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.ContainerAppJobExecutions; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class JobsStopMultipleExecutionsMockTests { - @Test - public void testStopMultipleExecutions() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"elyuj\",\"id\":\"youmpc\",\"type\":\"eclcdigptajbrzm\",\"status\":\"Processing\",\"startTime\":\"2021-01-20T00:05:16Z\",\"endTime\":\"2021-10-11T16:23:08Z\",\"template\":{\"containers\":[{},{}],\"initContainers\":[{},{},{}]}},{\"name\":\"utgjcyz\",\"id\":\"jdnrqjbt\",\"type\":\"eaoqaqbzgyhf\",\"status\":\"Failed\",\"startTime\":\"2021-09-21T19:14:48Z\",\"endTime\":\"2021-03-20T20:58:19Z\",\"template\":{\"containers\":[{},{},{}],\"initContainers\":[{},{},{}]}},{\"name\":\"e\",\"id\":\"iyslpkcvmwfaux\",\"type\":\"pmywbormcq\",\"status\":\"Succeeded\",\"startTime\":\"2021-02-28T18:13:56Z\",\"endTime\":\"2021-09-01T08:07:43Z\",\"template\":{\"containers\":[{},{}],\"initContainers\":[{},{},{}]}},{\"name\":\"jxjmcsmyqw\",\"id\":\"vcpwnkwy\",\"type\":\"wofali\",\"status\":\"Failed\",\"startTime\":\"2021-10-16T22:49:42Z\",\"endTime\":\"2021-04-13T10:57:52Z\",\"template\":{\"containers\":[{}],\"initContainers\":[{}]}}],\"nextLink\":\"sknxrwzawnvsbcf\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - ContainerAppJobExecutions response = - manager.jobs().stopMultipleExecutions("mtbdrvcqgu", "fzhompheq", com.azure.core.util.Context.NONE); - - Assertions.assertEquals("elyuj", response.value().get(0).name()); - Assertions.assertEquals("youmpc", response.value().get(0).id()); - Assertions.assertEquals("eclcdigptajbrzm", response.value().get(0).type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-01-20T00:05:16Z"), response.value().get(0).startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-10-11T16:23:08Z"), response.value().get(0).endTime()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JwtClaimChecksTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JwtClaimChecksTests.java deleted file mode 100644 index 38ac66bf51f7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/JwtClaimChecksTests.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.JwtClaimChecks; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class JwtClaimChecksTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - JwtClaimChecks model = - BinaryData - .fromString( - "{\"allowedGroups\":[\"htymw\"],\"allowedClientApplications\":[\"kfthwxmntei\",\"aop\",\"km\"]}") - .toObject(JwtClaimChecks.class); - Assertions.assertEquals("htymw", model.allowedGroups().get(0)); - Assertions.assertEquals("kfthwxmntei", model.allowedClientApplications().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - JwtClaimChecks model = - new JwtClaimChecks() - .withAllowedGroups(Arrays.asList("htymw")) - .withAllowedClientApplications(Arrays.asList("kfthwxmntei", "aop", "km")); - model = BinaryData.fromObject(model).toObject(JwtClaimChecks.class); - Assertions.assertEquals("htymw", model.allowedGroups().get(0)); - Assertions.assertEquals("kfthwxmntei", model.allowedClientApplications().get(0)); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/KedaConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/KedaConfigurationTests.java deleted file mode 100644 index 08831dd55f68..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/KedaConfigurationTests.java +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.KedaConfiguration; - -public final class KedaConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - KedaConfiguration model = - BinaryData.fromString("{\"version\":\"chpqbmfpjba\"}").toObject(KedaConfiguration.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - KedaConfiguration model = new KedaConfiguration(); - model = BinaryData.fromObject(model).toObject(KedaConfiguration.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginRoutesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginRoutesTests.java deleted file mode 100644 index 218ab502f547..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginRoutesTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.LoginRoutes; -import org.junit.jupiter.api.Assertions; - -public final class LoginRoutesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LoginRoutes model = BinaryData.fromString("{\"logoutEndpoint\":\"sxlzevgbmqj\"}").toObject(LoginRoutes.class); - Assertions.assertEquals("sxlzevgbmqj", model.logoutEndpoint()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LoginRoutes model = new LoginRoutes().withLogoutEndpoint("sxlzevgbmqj"); - model = BinaryData.fromObject(model).toObject(LoginRoutes.class); - Assertions.assertEquals("sxlzevgbmqj", 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 ec4e43ea7c7a..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginScopesTests.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.LoginScopes; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LoginScopesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - LoginScopes model = - BinaryData.fromString("{\"scopes\":[\"bqidtqaj\",\"yulpkudjkr\"]}").toObject(LoginScopes.class); - Assertions.assertEquals("bqidtqaj", model.scopes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - LoginScopes model = new LoginScopes().withScopes(Arrays.asList("bqidtqaj", "yulpkudjkr")); - model = BinaryData.fromObject(model).toObject(LoginScopes.class); - Assertions.assertEquals("bqidtqaj", 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 b7c04a276f9d..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/LoginTests.java +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.CookieExpiration; -import com.azure.resourcemanager.appcontainers.models.CookieExpirationConvention; -import com.azure.resourcemanager.appcontainers.models.Login; -import com.azure.resourcemanager.appcontainers.models.LoginRoutes; -import com.azure.resourcemanager.appcontainers.models.Nonce; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class LoginTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Login model = - BinaryData - .fromString( - "{\"routes\":{\"logoutEndpoint\":\"oqfbowskanyk\"},\"preserveUrlFragmentsForLogins\":true,\"allowedExternalRedirectUrls\":[\"iywgqywgndrvynh\"],\"cookieExpiration\":{\"convention\":\"IdentityProviderDerived\",\"timeToExpiration\":\"rcgyn\"},\"nonce\":{\"validateNonce\":false,\"nonceExpirationInterval\":\"cfvmmco\"}}") - .toObject(Login.class); - Assertions.assertEquals("oqfbowskanyk", model.routes().logoutEndpoint()); - Assertions.assertEquals(true, model.preserveUrlFragmentsForLogins()); - Assertions.assertEquals("iywgqywgndrvynh", model.allowedExternalRedirectUrls().get(0)); - Assertions - .assertEquals(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED, model.cookieExpiration().convention()); - Assertions.assertEquals("rcgyn", model.cookieExpiration().timeToExpiration()); - Assertions.assertEquals(false, model.nonce().validateNonce()); - Assertions.assertEquals("cfvmmco", model.nonce().nonceExpirationInterval()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Login model = - new Login() - .withRoutes(new LoginRoutes().withLogoutEndpoint("oqfbowskanyk")) - .withPreserveUrlFragmentsForLogins(true) - .withAllowedExternalRedirectUrls(Arrays.asList("iywgqywgndrvynh")) - .withCookieExpiration( - new CookieExpiration() - .withConvention(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED) - .withTimeToExpiration("rcgyn")) - .withNonce(new Nonce().withValidateNonce(false).withNonceExpirationInterval("cfvmmco")); - model = BinaryData.fromObject(model).toObject(Login.class); - Assertions.assertEquals("oqfbowskanyk", model.routes().logoutEndpoint()); - Assertions.assertEquals(true, model.preserveUrlFragmentsForLogins()); - Assertions.assertEquals("iywgqywgndrvynh", model.allowedExternalRedirectUrls().get(0)); - Assertions - .assertEquals(CookieExpirationConvention.IDENTITY_PROVIDER_DERIVED, model.cookieExpiration().convention()); - Assertions.assertEquals("rcgyn", model.cookieExpiration().timeToExpiration()); - Assertions.assertEquals(false, model.nonce().validateNonce()); - Assertions.assertEquals("cfvmmco", model.nonce().nonceExpirationInterval()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatePatchTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatePatchTests.java deleted file mode 100644 index 00a143b45072..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatePatchTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ManagedCertificatePatch; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedCertificatePatchTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedCertificatePatch model = - BinaryData.fromString("{\"tags\":{\"wegprh\":\"kssjhoiftxfk\"}}").toObject(ManagedCertificatePatch.class); - Assertions.assertEquals("kssjhoiftxfk", model.tags().get("wegprh")); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedCertificatePatch model = new ManagedCertificatePatch().withTags(mapOf("wegprh", "kssjhoiftxfk")); - model = BinaryData.fromObject(model).toObject(ManagedCertificatePatch.class); - Assertions.assertEquals("kssjhoiftxfk", model.tags().get("wegprh")); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteWithResponseMockTests.java deleted file mode 100644 index 3d049202a774..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedCertificatesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedCertificatesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .managedCertificates() - .deleteWithResponse("gno", "ikkgqo", "jwpindedvabbxbh", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorWithResponseMockTests.java deleted file mode 100644 index 134f43887399..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorWithResponseMockTests.java +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.Diagnostics; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentDiagnosticsGetDetectorWithResponseMockTests { - @Test - public void testGetDetectorWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"properties\":{\"metadata\":{\"id\":\"hzzysevusxiv\",\"name\":\"rryveimipskdy\",\"description\":\"tv\",\"author\":\"zkaftjvvrux\",\"category\":\"gsyeipqdsmjtg\",\"supportTopicList\":[{\"id\":\"gkkileplkcsmkn\",\"pesId\":\"tbbaedorvvmqf\"},{\"id\":\"ygbdgwumgxdgdhpa\",\"pesId\":\"dexjddvjs\"}],\"analysisTypes\":[\"otmmw\",\"lcol\",\"rsxaptefh\",\"xcgjokjljnhvlq\"],\"type\":\"ek\",\"score\":83.19882},\"dataset\":[{\"table\":{\"tableName\":\"ksdqhjvy\",\"columns\":[{},{},{},{}],\"rows\":[\"datalkhhu\"]},\"renderingProperties\":{\"type\":550059489,\"title\":\"qmavnw\",\"description\":\"wgoknlejjjkx\",\"isVisible\":false}},{\"table\":{\"tableName\":\"bkjbz\",\"columns\":[{}],\"rows\":[\"datakzykjtjk\",\"datasxfwushcdp\",\"dataupnqrmgjfb\",\"datakuwxeoiojfizfavk\"]},\"renderingProperties\":{\"type\":143517524,\"title\":\"cyayk\",\"description\":\"fz\",\"isVisible\":true}},{\"table\":{\"tableName\":\"rzx\",\"columns\":[{},{},{},{}],\"rows\":[\"datarsxkr\"]},\"renderingProperties\":{\"type\":1331396954,\"title\":\"zej\",\"description\":\"viyoypsuhbrnnhjx\",\"isVisible\":false}}],\"status\":{\"message\":\"qkbiwet\",\"statusId\":321648657},\"dataProviderMetadata\":{\"providerName\":\"yqiq\",\"propertyBag\":[{\"name\":\"se\",\"value\":\"lexbsf\"},{\"name\":\"dynojpziuwfb\",\"value\":\"kdtnhqsyclj\"},{\"name\":\"lpkpbafvafhl\",\"value\":\"lc\"},{\"name\":\"evxrhyz\",\"value\":\"wrso\"}]}},\"id\":\"pl\",\"name\":\"dbmairrhvhfnr\",\"type\":\"cwnpqigtuujwouhd\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - Diagnostics response = - manager - .managedEnvironmentDiagnostics() - .getDetectorWithResponse("ctekval", "l", "tjqvqyvweht", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("otmmw", response.properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("ksdqhjvy", response.properties().dataset().get(0).table().tableName()); - Assertions.assertEquals(550059489, response.properties().dataset().get(0).renderingProperties().type()); - Assertions.assertEquals("qmavnw", response.properties().dataset().get(0).renderingProperties().title()); - Assertions - .assertEquals("wgoknlejjjkx", response.properties().dataset().get(0).renderingProperties().description()); - Assertions.assertEquals(false, response.properties().dataset().get(0).renderingProperties().isVisible()); - Assertions.assertEquals("qkbiwet", response.properties().status().message()); - Assertions.assertEquals(321648657, response.properties().status().statusId()); - Assertions.assertEquals("yqiq", response.properties().dataProviderMetadata().providerName()); - Assertions.assertEquals("se", response.properties().dataProviderMetadata().propertyBag().get(0).name()); - Assertions.assertEquals("lexbsf", response.properties().dataProviderMetadata().propertyBag().get(0).value()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsWithResponseMockTests.java deleted file mode 100644 index 1616e0fc5eed..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsWithResponseMockTests.java +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.DiagnosticsCollection; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentDiagnosticsListDetectorsWithResponseMockTests { - @Test - public void testListDetectorsWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"metadata\":{\"id\":\"zusjsz\",\"name\":\"scmnlziji\",\"description\":\"ehgmvflnwyv\",\"author\":\"xrerlniylylyf\",\"category\":\"zutgqztwhghmupg\",\"supportTopicList\":[{},{},{},{}],\"analysisTypes\":[\"dxabbujfta\"],\"type\":\"nbbklqpxzucafed\",\"score\":51.97972},\"dataset\":[{},{}],\"status\":{\"message\":\"fwxudgnhg\",\"statusId\":1717815556},\"dataProviderMetadata\":{\"providerName\":\"alvnbwgpb\",\"propertyBag\":[{},{},{}]}},\"id\":\"luclvdjjuk\",\"name\":\"rdnqodxahhxhqf\",\"type\":\"qnvzoqgyipemch\"},{\"properties\":{\"metadata\":{\"id\":\"czuejdtxptl\",\"name\":\"wzhomewjjstl\",\"description\":\"hqawmo\",\"author\":\"ancz\",\"category\":\"odrrslblxyd\",\"supportTopicList\":[{},{}],\"analysisTypes\":[\"vbxiwkgfbqlj\",\"qkhychocok\",\"lehu\",\"qlrqffaweyurk\"],\"type\":\"y\",\"score\":15.436524},\"dataset\":[{}],\"status\":{\"message\":\"uqd\",\"statusId\":1079970798},\"dataProviderMetadata\":{\"providerName\":\"gchbapxkiy\",\"propertyBag\":[{}]}},\"id\":\"kbajbu\",\"name\":\"cgduusio\",\"type\":\"cblevpmc\"},{\"properties\":{\"metadata\":{\"id\":\"xkyxlzgs\",\"name\":\"kzzltafhbzf\",\"description\":\"vwmbjlzqsczpg\",\"author\":\"wnapfdq\",\"category\":\"wf\",\"supportTopicList\":[{},{},{}],\"analysisTypes\":[\"wjtkschgcgqyhl\",\"seyqrhvyeldotjv\"],\"type\":\"wiswskukjtasbvw\",\"score\":54.18455},\"dataset\":[{},{},{},{}],\"status\":{\"message\":\"txfkndlqvt\",\"statusId\":926574477},\"dataProviderMetadata\":{\"providerName\":\"mmbugtywatmqaq\",\"propertyBag\":[{},{},{}]}},\"id\":\"atgr\",\"name\":\"eshoygzcb\",\"type\":\"fqxkfaoyteh\"},{\"properties\":{\"metadata\":{\"id\":\"jmvqmtd\",\"name\":\"kygroejnndljdj\",\"description\":\"kb\",\"author\":\"eqy\",\"category\":\"ceysfaqeg\",\"supportTopicList\":[{},{}],\"analysisTypes\":[\"shwddkvbxgk\"],\"type\":\"sybwptdaca\",\"score\":12.566},\"dataset\":[{}],\"status\":{\"message\":\"ymtpo\",\"statusId\":1736120485},\"dataProviderMetadata\":{\"providerName\":\"zerohzrsqalsxk\",\"propertyBag\":[{},{},{}]}},\"id\":\"qapfgsdpc\",\"name\":\"essmzhhku\",\"type\":\"ip\"}],\"nextLink\":\"q\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - DiagnosticsCollection response = - manager - .managedEnvironmentDiagnostics() - .listDetectorsWithResponse("w", "vcacoyv", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("dxabbujfta", response.value().get(0).properties().metadata().analysisTypes().get(0)); - Assertions.assertEquals("fwxudgnhg", response.value().get(0).properties().status().message()); - Assertions.assertEquals(1717815556, response.value().get(0).properties().status().statusId()); - Assertions - .assertEquals("alvnbwgpb", response.value().get(0).properties().dataProviderMetadata().providerName()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerAuthenticationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerAuthenticationTests.java deleted file mode 100644 index 78bbd4d0b295..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentPropertiesPeerAuthenticationTests.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.ManagedEnvironmentPropertiesPeerAuthentication; -import com.azure.resourcemanager.appcontainers.models.Mtls; -import org.junit.jupiter.api.Assertions; - -public final class ManagedEnvironmentPropertiesPeerAuthenticationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedEnvironmentPropertiesPeerAuthentication model = - BinaryData - .fromString("{\"mtls\":{\"enabled\":true}}") - .toObject(ManagedEnvironmentPropertiesPeerAuthentication.class); - Assertions.assertEquals(true, model.mtls().enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedEnvironmentPropertiesPeerAuthentication model = - new ManagedEnvironmentPropertiesPeerAuthentication().withMtls(new Mtls().withEnabled(true)); - model = BinaryData.fromObject(model).toObject(ManagedEnvironmentPropertiesPeerAuthentication.class); - Assertions.assertEquals(true, model.mtls().enabled()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.java deleted file mode 100644 index 66b60c1ee3a6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteMockTests.java +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentsDeleteMockTests { - @Test - public void testDelete() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager.managedEnvironments().delete("bhtmeplvuk", "obrl", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesMockTests.java deleted file mode 100644 index 102f93f99355..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesMockTests.java +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStates; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentsListWorkloadProfileStatesMockTests { - @Test - public void testListWorkloadProfileStates() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"properties\":{\"minimumCount\":1521065056,\"maximumCount\":1869442572,\"currentCount\":1373287799},\"id\":\"ycnlbvgjcodk\",\"name\":\"gjiiytssiki\",\"type\":\"bcufqbvntn\"}]}"; - - 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("cgqtag", "rclsso", com.azure.core.util.Context.NONE); - - Assertions.assertEquals(1521065056, response.iterator().next().properties().minimumCount()); - Assertions.assertEquals(1869442572, response.iterator().next().properties().maximumCount()); - Assertions.assertEquals(1373287799, response.iterator().next().properties().currentCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteWithResponseMockTests.java deleted file mode 100644 index ee1f14bc21c8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteWithResponseMockTests.java +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ManagedEnvironmentsStoragesDeleteWithResponseMockTests { - @Test - public void testDeleteWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - manager - .managedEnvironmentsStorages() - .deleteWithResponse("ykcrraue", "kcsueho", "ddacbcbgydlqidy", com.azure.core.util.Context.NONE); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.java deleted file mode 100644 index 404c2c533ee7..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ManagedServiceIdentityTests.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.ManagedServiceIdentity; -import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentityType; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; -import java.util.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Assertions; - -public final class ManagedServiceIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ManagedServiceIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"d073bf54-c2cd-4b62-9f3b-090a75b5196b\",\"tenantId\":\"635985ec-52b2-47ea-99d6-f20863ffe688\",\"type\":\"None\",\"userAssignedIdentities\":{\"meue\":{\"principalId\":\"4f4bbb93-ec01-481a-aec4-7b4a443e6ae6\",\"clientId\":\"d092a881-698b-4ef0-9294-c894ef9f35bf\"},\"yhz\":{\"principalId\":\"5657ddc3-3e07-41e8-aaab-9381cc5eced8\",\"clientId\":\"a7b371f6-e488-41c8-848c-3924ddba6d58\"}}}") - .toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ManagedServiceIdentity model = - new ManagedServiceIdentity() - .withType(ManagedServiceIdentityType.NONE) - .withUserAssignedIdentities( - mapOf("meue", new UserAssignedIdentity(), "yhz", new UserAssignedIdentity())); - model = BinaryData.fromObject(model).toObject(ManagedServiceIdentity.class); - Assertions.assertEquals(ManagedServiceIdentityType.NONE, model.type()); - } - - // Use "Map.of" if available - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MtlsTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MtlsTests.java deleted file mode 100644 index f78edccfaf21..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/MtlsTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Mtls; -import org.junit.jupiter.api.Assertions; - -public final class MtlsTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Mtls model = BinaryData.fromString("{\"enabled\":true}").toObject(Mtls.class); - Assertions.assertEquals(true, model.enabled()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Mtls model = new Mtls().withEnabled(true); - model = BinaryData.fromObject(model).toObject(Mtls.class); - Assertions.assertEquals(true, model.enabled()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilityWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilityWithResponseMockTests.java deleted file mode 100644 index b0eb6026c75c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilityWithResponseMockTests.java +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReason; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityResponse; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class NamespacesCheckNameAvailabilityWithResponseMockTests { - @Test - public void testCheckNameAvailabilityWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = "{\"nameAvailable\":false,\"reason\":\"Invalid\",\"message\":\"avn\"}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - CheckNameAvailabilityResponse response = - manager - .namespaces() - .checkNameAvailabilityWithResponse( - "ashxgonoyjfqi", - "ubyzn", - new CheckNameAvailabilityRequest().withName("k").withType("eebgvopemtuoqu"), - com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals(false, response.nameAvailable()); - Assertions.assertEquals(CheckNameAvailabilityReason.INVALID, response.reason()); - Assertions.assertEquals("avn", response.message()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java deleted file mode 100644 index e3aed94e1a5b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/NonceTests.java +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Nonce; -import org.junit.jupiter.api.Assertions; - -public final class NonceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Nonce model = - BinaryData - .fromString("{\"validateNonce\":true,\"nonceExpirationInterval\":\"kwlzuvccfwnfn\"}") - .toObject(Nonce.class); - Assertions.assertEquals(true, model.validateNonce()); - Assertions.assertEquals("kwlzuvccfwnfn", model.nonceExpirationInterval()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Nonce model = new Nonce().withValidateNonce(true).withNonceExpirationInterval("kwlzuvccfwnfn"); - model = BinaryData.fromObject(model).toObject(Nonce.class); - Assertions.assertEquals(true, model.validateNonce()); - Assertions.assertEquals("kwlzuvccfwnfn", model.nonceExpirationInterval()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectLoginTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectLoginTests.java deleted file mode 100644 index 8f4dce32f856..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OpenIdConnectLoginTests.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.OpenIdConnectLogin; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class OpenIdConnectLoginTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OpenIdConnectLogin model = - BinaryData - .fromString( - "{\"nameClaimType\":\"otkftutqxlngx\",\"scopes\":[\"gug\",\"xkrxdqmi\",\"tthzrvqd\",\"abhjybi\"]}") - .toObject(OpenIdConnectLogin.class); - Assertions.assertEquals("otkftutqxlngx", model.nameClaimType()); - Assertions.assertEquals("gug", model.scopes().get(0)); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OpenIdConnectLogin model = - new OpenIdConnectLogin() - .withNameClaimType("otkftutqxlngx") - .withScopes(Arrays.asList("gug", "xkrxdqmi", "tthzrvqd", "abhjybi")); - model = BinaryData.fromObject(model).toObject(OpenIdConnectLogin.class); - Assertions.assertEquals("otkftutqxlngx", model.nameClaimType()); - Assertions.assertEquals("gug", 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 b64c3024cb9c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDetailInnerTests.java +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.OperationDetailInner; -import com.azure.resourcemanager.appcontainers.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDetailInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDetailInner model = - BinaryData - .fromString( - "{\"name\":\"vfcibyfmowux\",\"isDataAction\":false,\"display\":{\"provider\":\"dwxf\",\"resource\":\"iivwzjbhyzsxjrka\",\"operation\":\"trnegvmnvuqeqvld\",\"description\":\"astjbkkdmflvestm\"},\"origin\":\"xrrilozapee\"}") - .toObject(OperationDetailInner.class); - Assertions.assertEquals("vfcibyfmowux", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("dwxf", model.display().provider()); - Assertions.assertEquals("iivwzjbhyzsxjrka", model.display().resource()); - Assertions.assertEquals("trnegvmnvuqeqvld", model.display().operation()); - Assertions.assertEquals("astjbkkdmflvestm", model.display().description()); - Assertions.assertEquals("xrrilozapee", model.origin()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDetailInner model = - new OperationDetailInner() - .withName("vfcibyfmowux") - .withIsDataAction(false) - .withDisplay( - new OperationDisplay() - .withProvider("dwxf") - .withResource("iivwzjbhyzsxjrka") - .withOperation("trnegvmnvuqeqvld") - .withDescription("astjbkkdmflvestm")) - .withOrigin("xrrilozapee"); - model = BinaryData.fromObject(model).toObject(OperationDetailInner.class); - Assertions.assertEquals("vfcibyfmowux", model.name()); - Assertions.assertEquals(false, model.isDataAction()); - Assertions.assertEquals("dwxf", model.display().provider()); - Assertions.assertEquals("iivwzjbhyzsxjrka", model.display().resource()); - Assertions.assertEquals("trnegvmnvuqeqvld", model.display().operation()); - Assertions.assertEquals("astjbkkdmflvestm", model.display().description()); - Assertions.assertEquals("xrrilozapee", 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 8668298979b3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationDisplayTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.OperationDisplay; -import org.junit.jupiter.api.Assertions; - -public final class OperationDisplayTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - OperationDisplay model = - BinaryData - .fromString( - "{\"provider\":\"hpxlktwkuziycs\",\"resource\":\"vu\",\"operation\":\"ztcktyh\",\"description\":\"qedcgzulwm\"}") - .toObject(OperationDisplay.class); - Assertions.assertEquals("hpxlktwkuziycs", model.provider()); - Assertions.assertEquals("vu", model.resource()); - Assertions.assertEquals("ztcktyh", model.operation()); - Assertions.assertEquals("qedcgzulwm", model.description()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - OperationDisplay model = - new OperationDisplay() - .withProvider("hpxlktwkuziycs") - .withResource("vu") - .withOperation("ztcktyh") - .withDescription("qedcgzulwm"); - model = BinaryData.fromObject(model).toObject(OperationDisplay.class); - Assertions.assertEquals("hpxlktwkuziycs", model.provider()); - Assertions.assertEquals("vu", model.resource()); - Assertions.assertEquals("ztcktyh", model.operation()); - Assertions.assertEquals("qedcgzulwm", 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 f8e0b6e17f7b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/OperationsListMockTests.java +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.credential.AccessToken; -import com.azure.core.http.HttpClient; -import com.azure.core.http.HttpHeaders; -import com.azure.core.http.HttpRequest; -import com.azure.core.http.HttpResponse; -import com.azure.core.http.rest.PagedIterable; -import com.azure.core.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.OperationDetail; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class OperationsListMockTests { - @Test - public void testList() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"value\":[{\"name\":\"oakizvoai\",\"isDataAction\":false,\"display\":{\"provider\":\"nuwiguyxlykwph\",\"resource\":\"zc\",\"operation\":\"hmpejtlkexaonw\",\"description\":\"kcq\"},\"origin\":\"xhxknlc\"}]}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - PagedIterable response = manager.operations().list(com.azure.core.util.Context.NONE); - - Assertions.assertEquals("oakizvoai", response.iterator().next().name()); - Assertions.assertEquals(false, response.iterator().next().isDataAction()); - Assertions.assertEquals("nuwiguyxlykwph", response.iterator().next().display().provider()); - Assertions.assertEquals("zc", response.iterator().next().display().resource()); - Assertions.assertEquals("hmpejtlkexaonw", response.iterator().next().display().operation()); - Assertions.assertEquals("kcq", response.iterator().next().display().description()); - Assertions.assertEquals("xhxknlc", response.iterator().next().origin()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaCollectionInnerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaCollectionInnerTests.java deleted file mode 100644 index b0a1b8b5d9c8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaCollectionInnerTests.java +++ /dev/null @@ -1,127 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaCollectionInner; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ReplicaCollectionInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicaCollectionInner model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-07-29T01:36:25Z\",\"runningState\":\"Unknown\",\"runningStateDetails\":\"indfpwpjyl\",\"containers\":[{\"name\":\"h\",\"containerId\":\"sj\",\"ready\":false,\"started\":true,\"restartCount\":554003670,\"runningState\":\"Waiting\",\"runningStateDetails\":\"gofel\",\"logStreamEndpoint\":\"grqmqhldvrii\",\"execEndpoint\":\"jnalghf\"},{\"name\":\"tvsexsowuel\",\"containerId\":\"hhahhxvrhmzkwpjg\",\"ready\":true,\"started\":false,\"restartCount\":1806327837,\"runningState\":\"Running\",\"runningStateDetails\":\"sxhqxujx\",\"logStreamEndpoint\":\"ndxdigrjguufzdm\",\"execEndpoint\":\"qtfihwhbotzinga\"},{\"name\":\"pph\",\"containerId\":\"zqzudph\",\"ready\":false,\"started\":false,\"restartCount\":1182689505,\"runningState\":\"Running\",\"runningStateDetails\":\"wcvtbvkayhmtnvyq\",\"logStreamEndpoint\":\"tkzwpcnpwzc\",\"execEndpoint\":\"esgvvsccyaj\"},{\"name\":\"qfhwyg\",\"containerId\":\"vdnkfxusem\",\"ready\":true,\"started\":true,\"restartCount\":704204401,\"runningState\":\"Running\",\"runningStateDetails\":\"cqdpsqxqvpsvuoym\",\"logStreamEndpoint\":\"celve\",\"execEndpoint\":\"ypql\"}],\"initContainers\":[{\"name\":\"kerqwkyh\",\"containerId\":\"bopgxedkowepbqp\",\"ready\":false,\"started\":true,\"restartCount\":1217910065,\"runningState\":\"Waiting\",\"runningStateDetails\":\"jvcdwxlpqekf\",\"logStreamEndpoint\":\"khtj\",\"execEndpoint\":\"i\"},{\"name\":\"wfqatmtd\",\"containerId\":\"mdvy\",\"ready\":true,\"started\":true,\"restartCount\":624157964,\"runningState\":\"Running\",\"runningStateDetails\":\"kbir\",\"logStreamEndpoint\":\"uzhlhkjoqrv\",\"execEndpoint\":\"aatjinrvgoupmfi\"},{\"name\":\"fggjioolvr\",\"containerId\":\"kvtkkg\",\"ready\":false,\"started\":true,\"restartCount\":423959041,\"runningState\":\"Waiting\",\"runningStateDetails\":\"yvblmhvkzu\",\"logStreamEndpoint\":\"xvvy\",\"execEndpoint\":\"s\"},{\"name\":\"byrqufeg\",\"containerId\":\"vwz\",\"ready\":true,\"started\":false,\"restartCount\":882366629,\"runningState\":\"Running\",\"runningStateDetails\":\"dn\",\"logStreamEndpoint\":\"tvgbmhrixkwmy\",\"execEndpoint\":\"ejvegrhbpnaixex\"}]},\"id\":\"cbdreaxhcexd\",\"name\":\"rvqahqkghtpwi\",\"type\":\"nhyjsv\"},{\"properties\":{\"createdTime\":\"2021-01-05T11:11:10Z\",\"runningState\":\"NotRunning\",\"runningStateDetails\":\"voowvr\",\"containers\":[{\"name\":\"jqppyostronzmy\",\"containerId\":\"fipns\",\"ready\":true,\"started\":true,\"restartCount\":1488259864,\"runningState\":\"Waiting\",\"runningStateDetails\":\"jreafxtsgum\",\"logStreamEndpoint\":\"glikkxwslolb\",\"execEndpoint\":\"vuzlm\"}],\"initContainers\":[{\"name\":\"fktgplc\",\"containerId\":\"wjxeznoigbr\",\"ready\":false,\"started\":false,\"restartCount\":490713776,\"runningState\":\"Running\",\"runningStateDetails\":\"azej\",\"logStreamEndpoint\":\"qkagfhsxt\",\"execEndpoint\":\"ugzxnf\"}]},\"id\":\"azpxdtnkdmkqjjl\",\"name\":\"uenvrkp\",\"type\":\"ou\"}]}") - .toObject(ReplicaCollectionInner.class); - Assertions.assertEquals("h", model.value().get(0).containers().get(0).name()); - Assertions.assertEquals("sj", model.value().get(0).containers().get(0).containerId()); - Assertions.assertEquals(false, model.value().get(0).containers().get(0).ready()); - Assertions.assertEquals(true, model.value().get(0).containers().get(0).started()); - Assertions.assertEquals(554003670, model.value().get(0).containers().get(0).restartCount()); - Assertions.assertEquals("kerqwkyh", model.value().get(0).initContainers().get(0).name()); - Assertions.assertEquals("bopgxedkowepbqp", model.value().get(0).initContainers().get(0).containerId()); - Assertions.assertEquals(false, model.value().get(0).initContainers().get(0).ready()); - Assertions.assertEquals(true, model.value().get(0).initContainers().get(0).started()); - Assertions.assertEquals(1217910065, model.value().get(0).initContainers().get(0).restartCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaCollectionInner model = - new ReplicaCollectionInner() - .withValue( - Arrays - .asList( - new ReplicaInner() - .withContainers( - Arrays - .asList( - new ReplicaContainer() - .withName("h") - .withContainerId("sj") - .withReady(false) - .withStarted(true) - .withRestartCount(554003670), - new ReplicaContainer() - .withName("tvsexsowuel") - .withContainerId("hhahhxvrhmzkwpjg") - .withReady(true) - .withStarted(false) - .withRestartCount(1806327837), - new ReplicaContainer() - .withName("pph") - .withContainerId("zqzudph") - .withReady(false) - .withStarted(false) - .withRestartCount(1182689505), - new ReplicaContainer() - .withName("qfhwyg") - .withContainerId("vdnkfxusem") - .withReady(true) - .withStarted(true) - .withRestartCount(704204401))) - .withInitContainers( - Arrays - .asList( - new ReplicaContainer() - .withName("kerqwkyh") - .withContainerId("bopgxedkowepbqp") - .withReady(false) - .withStarted(true) - .withRestartCount(1217910065), - new ReplicaContainer() - .withName("wfqatmtd") - .withContainerId("mdvy") - .withReady(true) - .withStarted(true) - .withRestartCount(624157964), - new ReplicaContainer() - .withName("fggjioolvr") - .withContainerId("kvtkkg") - .withReady(false) - .withStarted(true) - .withRestartCount(423959041), - new ReplicaContainer() - .withName("byrqufeg") - .withContainerId("vwz") - .withReady(true) - .withStarted(false) - .withRestartCount(882366629))), - new ReplicaInner() - .withContainers( - Arrays - .asList( - new ReplicaContainer() - .withName("jqppyostronzmy") - .withContainerId("fipns") - .withReady(true) - .withStarted(true) - .withRestartCount(1488259864))) - .withInitContainers( - Arrays - .asList( - new ReplicaContainer() - .withName("fktgplc") - .withContainerId("wjxeznoigbr") - .withReady(false) - .withStarted(false) - .withRestartCount(490713776))))); - model = BinaryData.fromObject(model).toObject(ReplicaCollectionInner.class); - Assertions.assertEquals("h", model.value().get(0).containers().get(0).name()); - Assertions.assertEquals("sj", model.value().get(0).containers().get(0).containerId()); - Assertions.assertEquals(false, model.value().get(0).containers().get(0).ready()); - Assertions.assertEquals(true, model.value().get(0).containers().get(0).started()); - Assertions.assertEquals(554003670, model.value().get(0).containers().get(0).restartCount()); - Assertions.assertEquals("kerqwkyh", model.value().get(0).initContainers().get(0).name()); - Assertions.assertEquals("bopgxedkowepbqp", model.value().get(0).initContainers().get(0).containerId()); - Assertions.assertEquals(false, model.value().get(0).initContainers().get(0).ready()); - Assertions.assertEquals(true, model.value().get(0).initContainers().get(0).started()); - Assertions.assertEquals(1217910065, model.value().get(0).initContainers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.java deleted file mode 100644 index ac54ebd0cd27..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaContainerTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import org.junit.jupiter.api.Assertions; - -public final class ReplicaContainerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicaContainer model = - BinaryData - .fromString( - "{\"name\":\"cgpik\",\"containerId\":\"imejzanl\",\"ready\":false,\"started\":false,\"restartCount\":1297052787,\"runningState\":\"Terminated\",\"runningStateDetails\":\"onok\",\"logStreamEndpoint\":\"rjqc\",\"execEndpoint\":\"gzpfrla\"}") - .toObject(ReplicaContainer.class); - Assertions.assertEquals("cgpik", model.name()); - Assertions.assertEquals("imejzanl", model.containerId()); - Assertions.assertEquals(false, model.ready()); - Assertions.assertEquals(false, model.started()); - Assertions.assertEquals(1297052787, model.restartCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaContainer model = - new ReplicaContainer() - .withName("cgpik") - .withContainerId("imejzanl") - .withReady(false) - .withStarted(false) - .withRestartCount(1297052787); - model = BinaryData.fromObject(model).toObject(ReplicaContainer.class); - Assertions.assertEquals("cgpik", model.name()); - Assertions.assertEquals("imejzanl", model.containerId()); - Assertions.assertEquals(false, model.ready()); - Assertions.assertEquals(false, model.started()); - Assertions.assertEquals(1297052787, 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 eec5323681c2..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaInnerTests.java +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaInner; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ReplicaInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicaInner model = - BinaryData - .fromString( - "{\"properties\":{\"createdTime\":\"2021-07-06T19:00:01Z\",\"runningState\":\"Running\",\"runningStateDetails\":\"ux\",\"containers\":[{\"name\":\"ldsyuuximerqfob\",\"containerId\":\"znkbykutwpfhpagm\",\"ready\":true,\"started\":true,\"restartCount\":803916344,\"runningState\":\"Running\",\"runningStateDetails\":\"doakgtdlmkkzevdl\",\"logStreamEndpoint\":\"wpusdsttwvogv\",\"execEndpoint\":\"ejdcngqqmoakuf\"}],\"initContainers\":[{\"name\":\"rwr\",\"containerId\":\"rtwaenuuzko\",\"ready\":false,\"started\":false,\"restartCount\":2010767026,\"runningState\":\"Waiting\",\"runningStateDetails\":\"yuhhziu\",\"logStreamEndpoint\":\"fozbhdmsmlmzqhof\",\"execEndpoint\":\"maequiahxicslfa\"},{\"name\":\"z\",\"containerId\":\"yylhalnswhccsp\",\"ready\":true,\"started\":true,\"restartCount\":2011273129,\"runningState\":\"Terminated\",\"runningStateDetails\":\"cywuggwol\",\"logStreamEndpoint\":\"czbwemhairsbr\",\"execEndpoint\":\"dwmsweypqwd\"},{\"name\":\"gicccnxqhuex\",\"containerId\":\"ttlstvlzywemhz\",\"ready\":true,\"started\":true,\"restartCount\":1411475506,\"runningState\":\"Terminated\",\"runningStateDetails\":\"iypbsfgytgusl\",\"logStreamEndpoint\":\"adcy\",\"execEndpoint\":\"ukyhejhzis\"}]},\"id\":\"gfpelolppvksrpqv\",\"name\":\"jzraehtwdwrf\",\"type\":\"swibyr\"}") - .toObject(ReplicaInner.class); - Assertions.assertEquals("ldsyuuximerqfob", model.containers().get(0).name()); - Assertions.assertEquals("znkbykutwpfhpagm", model.containers().get(0).containerId()); - Assertions.assertEquals(true, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(803916344, model.containers().get(0).restartCount()); - Assertions.assertEquals("rwr", model.initContainers().get(0).name()); - Assertions.assertEquals("rtwaenuuzko", model.initContainers().get(0).containerId()); - Assertions.assertEquals(false, model.initContainers().get(0).ready()); - Assertions.assertEquals(false, model.initContainers().get(0).started()); - Assertions.assertEquals(2010767026, model.initContainers().get(0).restartCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaInner model = - new ReplicaInner() - .withContainers( - Arrays - .asList( - new ReplicaContainer() - .withName("ldsyuuximerqfob") - .withContainerId("znkbykutwpfhpagm") - .withReady(true) - .withStarted(true) - .withRestartCount(803916344))) - .withInitContainers( - Arrays - .asList( - new ReplicaContainer() - .withName("rwr") - .withContainerId("rtwaenuuzko") - .withReady(false) - .withStarted(false) - .withRestartCount(2010767026), - new ReplicaContainer() - .withName("z") - .withContainerId("yylhalnswhccsp") - .withReady(true) - .withStarted(true) - .withRestartCount(2011273129), - new ReplicaContainer() - .withName("gicccnxqhuex") - .withContainerId("ttlstvlzywemhz") - .withReady(true) - .withStarted(true) - .withRestartCount(1411475506))); - model = BinaryData.fromObject(model).toObject(ReplicaInner.class); - Assertions.assertEquals("ldsyuuximerqfob", model.containers().get(0).name()); - Assertions.assertEquals("znkbykutwpfhpagm", model.containers().get(0).containerId()); - Assertions.assertEquals(true, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(803916344, model.containers().get(0).restartCount()); - Assertions.assertEquals("rwr", model.initContainers().get(0).name()); - Assertions.assertEquals("rtwaenuuzko", model.initContainers().get(0).containerId()); - Assertions.assertEquals(false, model.initContainers().get(0).ready()); - Assertions.assertEquals(false, model.initContainers().get(0).started()); - Assertions.assertEquals(2010767026, model.initContainers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.java deleted file mode 100644 index a6fd7ba8b76f..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ReplicaPropertiesTests.java +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.ReplicaProperties; -import com.azure.resourcemanager.appcontainers.models.ReplicaContainer; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class ReplicaPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ReplicaProperties model = - BinaryData - .fromString( - "{\"createdTime\":\"2021-01-18T20:33:29Z\",\"runningState\":\"NotRunning\",\"runningStateDetails\":\"hfwpracstwit\",\"containers\":[{\"name\":\"vxccedcp\",\"containerId\":\"dyodnwzxltj\",\"ready\":true,\"started\":true,\"restartCount\":823307226,\"runningState\":\"Waiting\",\"runningStateDetails\":\"xnavvwxq\",\"logStreamEndpoint\":\"y\",\"execEndpoint\":\"nyowxwlmdjrkvfg\"},{\"name\":\"fvpdbo\",\"containerId\":\"cizsjqlhkrribdei\",\"ready\":true,\"started\":false,\"restartCount\":1566726508,\"runningState\":\"Terminated\",\"runningStateDetails\":\"ndzwmkrefa\",\"logStreamEndpoint\":\"jorwkqnyhgbij\",\"execEndpoint\":\"ivfxzsjabibsyst\"}],\"initContainers\":[{\"name\":\"djpvkvpbjxbkz\",\"containerId\":\"kd\",\"ready\":true,\"started\":false,\"restartCount\":1067469550,\"runningState\":\"Running\",\"runningStateDetails\":\"gkakmokzhjjklff\",\"logStreamEndpoint\":\"ouw\",\"execEndpoint\":\"gzrf\"},{\"name\":\"eyebizikayuhql\",\"containerId\":\"bs\",\"ready\":true,\"started\":false,\"restartCount\":1463319790,\"runningState\":\"Waiting\",\"runningStateDetails\":\"gmfpgvmp\",\"logStreamEndpoint\":\"as\",\"execEndpoint\":\"haq\"},{\"name\":\"ss\",\"containerId\":\"u\",\"ready\":false,\"started\":false,\"restartCount\":213351747,\"runningState\":\"Terminated\",\"runningStateDetails\":\"rhneuyowq\",\"logStreamEndpoint\":\"wyt\",\"execEndpoint\":\"ib\"}]}") - .toObject(ReplicaProperties.class); - Assertions.assertEquals("vxccedcp", model.containers().get(0).name()); - Assertions.assertEquals("dyodnwzxltj", model.containers().get(0).containerId()); - Assertions.assertEquals(true, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(823307226, model.containers().get(0).restartCount()); - Assertions.assertEquals("djpvkvpbjxbkz", model.initContainers().get(0).name()); - Assertions.assertEquals("kd", model.initContainers().get(0).containerId()); - Assertions.assertEquals(true, model.initContainers().get(0).ready()); - Assertions.assertEquals(false, model.initContainers().get(0).started()); - Assertions.assertEquals(1067469550, model.initContainers().get(0).restartCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ReplicaProperties model = - new ReplicaProperties() - .withContainers( - Arrays - .asList( - new ReplicaContainer() - .withName("vxccedcp") - .withContainerId("dyodnwzxltj") - .withReady(true) - .withStarted(true) - .withRestartCount(823307226), - new ReplicaContainer() - .withName("fvpdbo") - .withContainerId("cizsjqlhkrribdei") - .withReady(true) - .withStarted(false) - .withRestartCount(1566726508))) - .withInitContainers( - Arrays - .asList( - new ReplicaContainer() - .withName("djpvkvpbjxbkz") - .withContainerId("kd") - .withReady(true) - .withStarted(false) - .withRestartCount(1067469550), - new ReplicaContainer() - .withName("eyebizikayuhql") - .withContainerId("bs") - .withReady(true) - .withStarted(false) - .withRestartCount(1463319790), - new ReplicaContainer() - .withName("ss") - .withContainerId("u") - .withReady(false) - .withStarted(false) - .withRestartCount(213351747))); - model = BinaryData.fromObject(model).toObject(ReplicaProperties.class); - Assertions.assertEquals("vxccedcp", model.containers().get(0).name()); - Assertions.assertEquals("dyodnwzxltj", model.containers().get(0).containerId()); - Assertions.assertEquals(true, model.containers().get(0).ready()); - Assertions.assertEquals(true, model.containers().get(0).started()); - Assertions.assertEquals(823307226, model.containers().get(0).restartCount()); - Assertions.assertEquals("djpvkvpbjxbkz", model.initContainers().get(0).name()); - Assertions.assertEquals("kd", model.initContainers().get(0).containerId()); - Assertions.assertEquals(true, model.initContainers().get(0).ready()); - Assertions.assertEquals(false, model.initContainers().get(0).started()); - Assertions.assertEquals(1067469550, model.initContainers().get(0).restartCount()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersJobExecutionWithResponseMockTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersJobExecutionWithResponseMockTests.java deleted file mode 100644 index 8d4df9e9d1ea..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ResourceProvidersJobExecutionWithResponseMockTests.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.management.AzureEnvironment; -import com.azure.core.management.profile.AzureProfile; -import com.azure.resourcemanager.appcontainers.ContainerAppsApiManager; -import com.azure.resourcemanager.appcontainers.models.JobExecution; -import java.nio.ByteBuffer; -import java.nio.charset.StandardCharsets; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mockito; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -public final class ResourceProvidersJobExecutionWithResponseMockTests { - @Test - public void testJobExecutionWithResponse() throws Exception { - HttpClient httpClient = Mockito.mock(HttpClient.class); - HttpResponse httpResponse = Mockito.mock(HttpResponse.class); - ArgumentCaptor httpRequest = ArgumentCaptor.forClass(HttpRequest.class); - - String responseStr = - "{\"name\":\"ymvqdbpbhfckdvez\",\"id\":\"cssbzhddu\",\"type\":\"nqfblhkalehpava\",\"status\":\"Running\",\"startTime\":\"2021-07-31T19:35:54Z\",\"endTime\":\"2021-02-25T01:40:45Z\",\"template\":{\"containers\":[{\"image\":\"gdmin\",\"name\":\"tteajohiygs\",\"command\":[\"onhpcz\",\"kmktpvwxqcseh\",\"hkhufm\",\"qumq\"],\"args\":[\"ydzulodsaeuzan\"],\"env\":[{},{},{}],\"resources\":{\"cpu\":51.25538357259788,\"memory\":\"wphpzfngqj\",\"ephemeralStorage\":\"idftujwjjufwbe\"}},{\"image\":\"k\",\"name\":\"rhtssr\",\"command\":[\"mdvhazcvjy\",\"iqswbqer\"],\"args\":[\"iytxt\",\"gukvlbpkt\",\"dstyouam\"],\"env\":[{},{},{}],\"resources\":{\"cpu\":89.09465324456659,\"memory\":\"owegmmutey\",\"ephemeralStorage\":\"yguqigijiitns\"}},{\"image\":\"lz\",\"name\":\"sygrijwa\",\"command\":[\"anra\",\"bfu\",\"qfrojsydgrhyd\"],\"args\":[\"ywezskiecafyg\",\"m\",\"ieqvds\"],\"env\":[{},{},{},{}],\"resources\":{\"cpu\":9.705369980968115,\"memory\":\"ah\",\"ephemeralStorage\":\"xalybxawoijpo\"}},{\"image\":\"blxpkkwjdjodq\",\"name\":\"kincnremeh\",\"command\":[\"zhceumoqodk\",\"dppyibngqlady\",\"rxwhydtlu\",\"vadswzs\"],\"args\":[\"emlowuowhl\",\"lnwy\",\"mouvbl\",\"mo\"],\"env\":[{},{}],\"resources\":{\"cpu\":85.24180497890332,\"memory\":\"wtdvrfmvli\",\"ephemeralStorage\":\"vjdrqcrjidhftuk\"}}],\"initContainers\":[{\"image\":\"lwyojbfqzdkfnj\",\"name\":\"xhafratqx\",\"command\":[\"roumzznva\",\"qjrhuzgfxonj\"],\"args\":[\"sllywpvtio\",\"zbpdbo\",\"lgry\",\"qiuasigrows\"],\"env\":[{},{}],\"resources\":{\"cpu\":56.766450145521155,\"memory\":\"djboqgrmtq\",\"ephemeralStorage\":\"qevadrmmw\"}},{\"image\":\"awvcmjzkxiid\",\"name\":\"czskoswoqiqazu\",\"command\":[\"xzkrrcoi\",\"sbamnppcc\"],\"args\":[\"ztdsbeza\"],\"env\":[{}],\"resources\":{\"cpu\":87.2973677793008,\"memory\":\"izhyhnep\",\"ephemeralStorage\":\"etiarxqiubxdukec\"}},{\"image\":\"dazvdhctm\",\"name\":\"os\",\"command\":[\"blnsntrpcaqk\",\"ofkbtf\",\"hklbnldpvcbh\"],\"args\":[\"yq\"],\"env\":[{},{},{}],\"resources\":{\"cpu\":15.430525461055334,\"memory\":\"rp\",\"ephemeralStorage\":\"r\"}}]}}"; - - Mockito.when(httpResponse.getStatusCode()).thenReturn(200); - Mockito.when(httpResponse.getHeaders()).thenReturn(new HttpHeaders()); - Mockito - .when(httpResponse.getBody()) - .thenReturn(Flux.just(ByteBuffer.wrap(responseStr.getBytes(StandardCharsets.UTF_8)))); - Mockito - .when(httpResponse.getBodyAsByteArray()) - .thenReturn(Mono.just(responseStr.getBytes(StandardCharsets.UTF_8))); - Mockito - .when(httpClient.send(httpRequest.capture(), Mockito.any())) - .thenReturn( - Mono - .defer( - () -> { - Mockito.when(httpResponse.getRequest()).thenReturn(httpRequest.getValue()); - return Mono.just(httpResponse); - })); - - ContainerAppsApiManager manager = - ContainerAppsApiManager - .configure() - .withHttpClient(httpClient) - .authenticate( - tokenRequestContext -> Mono.just(new AccessToken("this_is_a_token", OffsetDateTime.MAX)), - new AzureProfile("", "", AzureEnvironment.AZURE)); - - JobExecution response = - manager - .resourceProviders() - .jobExecutionWithResponse("ndzfqivjreuyk", "bmnwa", "ltbxoeeonqlnfw", com.azure.core.util.Context.NONE) - .getValue(); - - Assertions.assertEquals("ymvqdbpbhfckdvez", response.name()); - Assertions.assertEquals("cssbzhddu", response.id()); - Assertions.assertEquals("nqfblhkalehpava", response.type()); - Assertions.assertEquals(OffsetDateTime.parse("2021-07-31T19:35:54Z"), response.startTime()); - Assertions.assertEquals(OffsetDateTime.parse("2021-02-25T01:40:45Z"), response.endTime()); - Assertions.assertEquals("gdmin", response.template().containers().get(0).image()); - Assertions.assertEquals("tteajohiygs", response.template().containers().get(0).name()); - Assertions.assertEquals("onhpcz", response.template().containers().get(0).command().get(0)); - Assertions.assertEquals("ydzulodsaeuzan", response.template().containers().get(0).args().get(0)); - Assertions.assertEquals(51.25538357259788D, response.template().containers().get(0).resources().cpu()); - Assertions.assertEquals("wphpzfngqj", response.template().containers().get(0).resources().memory()); - Assertions.assertEquals("lwyojbfqzdkfnj", response.template().initContainers().get(0).image()); - Assertions.assertEquals("xhafratqx", response.template().initContainers().get(0).name()); - Assertions.assertEquals("roumzznva", response.template().initContainers().get(0).command().get(0)); - Assertions.assertEquals("sllywpvtio", response.template().initContainers().get(0).args().get(0)); - Assertions.assertEquals(56.766450145521155D, response.template().initContainers().get(0).resources().cpu()); - Assertions.assertEquals("djboqgrmtq", response.template().initContainers().get(0).resources().memory()); - } -} 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 bb4e8bc6c920..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/RevisionCollectionTests.java +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; -import com.azure.resourcemanager.appcontainers.models.RevisionCollection; -import java.util.Arrays; - -public final class RevisionCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - RevisionCollection model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"createdTime\":\"2021-02-22T10:12:12Z\",\"lastActiveTime\":\"2021-10-17T14:02:40Z\",\"fqdn\":\"vxwc\",\"template\":{\"revisionSuffix\":\"pcirelsfeaen\",\"terminationGracePeriodSeconds\":6089881890484118319,\"initContainers\":[{}],\"containers\":[{},{},{}],\"scale\":{\"minReplicas\":1993086714,\"maxReplicas\":863801878,\"rules\":[{},{}]},\"volumes\":[{},{},{},{}],\"serviceBinds\":[{}]},\"active\":false,\"replicas\":2046993019,\"trafficWeight\":443965325,\"provisioningError\":\"youlp\",\"healthState\":\"None\",\"provisioningState\":\"Deprovisioning\",\"runningState\":\"Stopped\"},\"id\":\"rvimjwosytxitcsk\",\"name\":\"cktqumiekkezzi\",\"type\":\"hlyfjhdgqgg\"},{\"properties\":{\"createdTime\":\"2021-11-21T10:43:47Z\",\"lastActiveTime\":\"2021-04-09T06:20:49Z\",\"fqdn\":\"aeqidbqfatpxll\",\"template\":{\"revisionSuffix\":\"yjmoadsu\",\"terminationGracePeriodSeconds\":1027634010219173638,\"initContainers\":[{},{},{},{}],\"containers\":[{},{}],\"scale\":{\"minReplicas\":1651100345,\"maxReplicas\":1483853053,\"rules\":[{},{}]},\"volumes\":[{},{},{}],\"serviceBinds\":[{},{}]},\"active\":true,\"replicas\":288329779,\"trafficWeight\":1115314881,\"provisioningError\":\"uhpkxkgymar\",\"healthState\":\"Unhealthy\",\"provisioningState\":\"Deprovisioning\",\"runningState\":\"Processing\"},\"id\":\"ugjhky\",\"name\":\"ubeddg\",\"type\":\"sofwqmzqalkrmnji\"}],\"nextLink\":\"xacqqudfnbyx\"}") - .toObject(RevisionCollection.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - RevisionCollection model = - new RevisionCollection().withValue(Arrays.asList(new RevisionInner(), new RevisionInner())); - model = BinaryData.fromObject(model).toObject(RevisionCollection.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ServiceBindTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ServiceBindTests.java deleted file mode 100644 index e1b616b9d96c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ServiceBindTests.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.ServiceBind; -import org.junit.jupiter.api.Assertions; - -public final class ServiceBindTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - ServiceBind model = - BinaryData.fromString("{\"serviceId\":\"mqg\",\"name\":\"queziky\"}").toObject(ServiceBind.class); - Assertions.assertEquals("mqg", model.serviceId()); - Assertions.assertEquals("queziky", model.name()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - ServiceBind model = new ServiceBind().withServiceId("mqg").withName("queziky"); - model = BinaryData.fromObject(model).toObject(ServiceBind.class); - Assertions.assertEquals("mqg", model.serviceId()); - Assertions.assertEquals("queziky", model.name()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ServiceTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ServiceTests.java deleted file mode 100644 index 8bafb8e5381b..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/ServiceTests.java +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.Service; -import org.junit.jupiter.api.Assertions; - -public final class ServiceTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - Service model = BinaryData.fromString("{\"type\":\"bexilzznfqqnv\"}").toObject(Service.class); - Assertions.assertEquals("bexilzznfqqnv", model.type()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - Service model = new Service().withType("bexilzznfqqnv"); - model = BinaryData.fromObject(model).toObject(Service.class); - Assertions.assertEquals("bexilzznfqqnv", model.type()); - } -} 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 6fb2e500cde4..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/TrafficWeightTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.TrafficWeight; -import org.junit.jupiter.api.Assertions; - -public final class TrafficWeightTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - TrafficWeight model = - BinaryData - .fromString( - "{\"revisionName\":\"trmgucnapkte\",\"weight\":1950925712,\"latestRevision\":false,\"label\":\"tfdygpfqb\"}") - .toObject(TrafficWeight.class); - Assertions.assertEquals("trmgucnapkte", model.revisionName()); - Assertions.assertEquals(1950925712, model.weight()); - Assertions.assertEquals(false, model.latestRevision()); - Assertions.assertEquals("tfdygpfqb", model.label()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - TrafficWeight model = - new TrafficWeight() - .withRevisionName("trmgucnapkte") - .withWeight(1950925712) - .withLatestRevision(false) - .withLabel("tfdygpfqb"); - model = BinaryData.fromObject(model).toObject(TrafficWeight.class); - Assertions.assertEquals("trmgucnapkte", model.revisionName()); - Assertions.assertEquals(1950925712, model.weight()); - Assertions.assertEquals(false, model.latestRevision()); - Assertions.assertEquals("tfdygpfqb", 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 fae761209d08..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/UserAssignedIdentityTests.java +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.UserAssignedIdentity; - -public final class UserAssignedIdentityTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - UserAssignedIdentity model = - BinaryData - .fromString( - "{\"principalId\":\"d7bc9138-ce8b-4d64-b68f-6892f3278db3\",\"clientId\":\"8b444edc-73a4-4717-972d-bc7f7edae1b7\"}") - .toObject(UserAssignedIdentity.class); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - UserAssignedIdentity model = new UserAssignedIdentity(); - model = BinaryData.fromObject(model).toObject(UserAssignedIdentity.class); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VnetConfigurationTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VnetConfigurationTests.java deleted file mode 100644 index 4f1c3fb06af6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VnetConfigurationTests.java +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; -import org.junit.jupiter.api.Assertions; - -public final class VnetConfigurationTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VnetConfiguration model = - BinaryData - .fromString( - "{\"internal\":true,\"infrastructureSubnetId\":\"lma\",\"dockerBridgeCidr\":\"tcyohpfkyrk\",\"platformReservedCidr\":\"dg\",\"platformReservedDnsIP\":\"gsj\"}") - .toObject(VnetConfiguration.class); - Assertions.assertEquals(true, model.internal()); - Assertions.assertEquals("lma", model.infrastructureSubnetId()); - Assertions.assertEquals("tcyohpfkyrk", model.dockerBridgeCidr()); - Assertions.assertEquals("dg", model.platformReservedCidr()); - Assertions.assertEquals("gsj", model.platformReservedDnsIp()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VnetConfiguration model = - new VnetConfiguration() - .withInternal(true) - .withInfrastructureSubnetId("lma") - .withDockerBridgeCidr("tcyohpfkyrk") - .withPlatformReservedCidr("dg") - .withPlatformReservedDnsIp("gsj"); - model = BinaryData.fromObject(model).toObject(VnetConfiguration.class); - Assertions.assertEquals(true, model.internal()); - Assertions.assertEquals("lma", model.infrastructureSubnetId()); - Assertions.assertEquals("tcyohpfkyrk", model.dockerBridgeCidr()); - Assertions.assertEquals("dg", model.platformReservedCidr()); - Assertions.assertEquals("gsj", model.platformReservedDnsIp()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeMountTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeMountTests.java deleted file mode 100644 index 7406025c692c..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/VolumeMountTests.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.VolumeMount; -import org.junit.jupiter.api.Assertions; - -public final class VolumeMountTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - VolumeMount model = - BinaryData - .fromString("{\"volumeName\":\"bttdumorppxe\",\"mountPath\":\"nzbtbhj\",\"subPath\":\"lkfg\"}") - .toObject(VolumeMount.class); - Assertions.assertEquals("bttdumorppxe", model.volumeName()); - Assertions.assertEquals("nzbtbhj", model.mountPath()); - Assertions.assertEquals("lkfg", model.subPath()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - VolumeMount model = - new VolumeMount().withVolumeName("bttdumorppxe").withMountPath("nzbtbhj").withSubPath("lkfg"); - model = BinaryData.fromObject(model).toObject(VolumeMount.class); - Assertions.assertEquals("bttdumorppxe", model.volumeName()); - Assertions.assertEquals("nzbtbhj", model.mountPath()); - Assertions.assertEquals("lkfg", model.subPath()); - } -} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesCollectionTests.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesCollectionTests.java deleted file mode 100644 index fa8900b458c8..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesCollectionTests.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.WorkloadProfileStatesInner; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesCollection; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; -import java.util.Arrays; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadProfileStatesCollectionTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadProfileStatesCollection model = - BinaryData - .fromString( - "{\"value\":[{\"properties\":{\"minimumCount\":1486999564,\"maximumCount\":2052287318,\"currentCount\":426763582},\"id\":\"uo\",\"name\":\"xprimrsop\",\"type\":\"eecjmeis\"},{\"properties\":{\"minimumCount\":749085962,\"maximumCount\":1672946681,\"currentCount\":2018313749},\"id\":\"wxdzaumweoohgu\",\"name\":\"fuzboyjathwtzolb\",\"type\":\"emwmdxmebwjs\"}],\"nextLink\":\"p\"}") - .toObject(WorkloadProfileStatesCollection.class); - Assertions.assertEquals(1486999564, model.value().get(0).properties().minimumCount()); - Assertions.assertEquals(2052287318, model.value().get(0).properties().maximumCount()); - Assertions.assertEquals(426763582, model.value().get(0).properties().currentCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfileStatesCollection model = - new WorkloadProfileStatesCollection() - .withValue( - Arrays - .asList( - new WorkloadProfileStatesInner() - .withProperties( - new WorkloadProfileStatesProperties() - .withMinimumCount(1486999564) - .withMaximumCount(2052287318) - .withCurrentCount(426763582)), - new WorkloadProfileStatesInner() - .withProperties( - new WorkloadProfileStatesProperties() - .withMinimumCount(749085962) - .withMaximumCount(1672946681) - .withCurrentCount(2018313749)))); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesCollection.class); - Assertions.assertEquals(1486999564, model.value().get(0).properties().minimumCount()); - Assertions.assertEquals(2052287318, model.value().get(0).properties().maximumCount()); - Assertions.assertEquals(426763582, 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 11c3cb2319ec..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesInnerTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadProfileStatesInnerTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadProfileStatesInner model = - BinaryData - .fromString( - "{\"properties\":{\"minimumCount\":1591085258,\"maximumCount\":2130021286,\"currentCount\":1715283989},\"id\":\"f\",\"name\":\"xnmwmqtibxyijddt\",\"type\":\"qcttadijaeukmrsi\"}") - .toObject(WorkloadProfileStatesInner.class); - Assertions.assertEquals(1591085258, model.properties().minimumCount()); - Assertions.assertEquals(2130021286, model.properties().maximumCount()); - Assertions.assertEquals(1715283989, model.properties().currentCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfileStatesInner model = - new WorkloadProfileStatesInner() - .withProperties( - new WorkloadProfileStatesProperties() - .withMinimumCount(1591085258) - .withMaximumCount(2130021286) - .withCurrentCount(1715283989)); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesInner.class); - Assertions.assertEquals(1591085258, model.properties().minimumCount()); - Assertions.assertEquals(2130021286, model.properties().maximumCount()); - Assertions.assertEquals(1715283989, 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 1630f9f1def3..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileStatesPropertiesTests.java +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadProfileStatesPropertiesTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadProfileStatesProperties model = - BinaryData - .fromString("{\"minimumCount\":647971020,\"maximumCount\":513622258,\"currentCount\":1321937950}") - .toObject(WorkloadProfileStatesProperties.class); - Assertions.assertEquals(647971020, model.minimumCount()); - Assertions.assertEquals(513622258, model.maximumCount()); - Assertions.assertEquals(1321937950, model.currentCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfileStatesProperties model = - new WorkloadProfileStatesProperties() - .withMinimumCount(647971020) - .withMaximumCount(513622258) - .withCurrentCount(1321937950); - model = BinaryData.fromObject(model).toObject(WorkloadProfileStatesProperties.class); - Assertions.assertEquals(647971020, model.minimumCount()); - Assertions.assertEquals(513622258, model.maximumCount()); - Assertions.assertEquals(1321937950, 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 e93e8f410ca6..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/test/java/com/azure/resourcemanager/appcontainers/generated/WorkloadProfileTests.java +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. -// Code generated by Microsoft (R) AutoRest Code Generator. - -package com.azure.resourcemanager.appcontainers.generated; - -import com.azure.core.util.BinaryData; -import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; -import org.junit.jupiter.api.Assertions; - -public final class WorkloadProfileTests { - @org.junit.jupiter.api.Test - public void testDeserialize() throws Exception { - WorkloadProfile model = - BinaryData - .fromString( - "{\"name\":\"rdnhfuku\",\"workloadProfileType\":\"sjcswsmystuluqyp\",\"minimumCount\":1783589840,\"maximumCount\":291266426}") - .toObject(WorkloadProfile.class); - Assertions.assertEquals("rdnhfuku", model.name()); - Assertions.assertEquals("sjcswsmystuluqyp", model.workloadProfileType()); - Assertions.assertEquals(1783589840, model.minimumCount()); - Assertions.assertEquals(291266426, model.maximumCount()); - } - - @org.junit.jupiter.api.Test - public void testSerialize() throws Exception { - WorkloadProfile model = - new WorkloadProfile() - .withName("rdnhfuku") - .withWorkloadProfileType("sjcswsmystuluqyp") - .withMinimumCount(1783589840) - .withMaximumCount(291266426); - model = BinaryData.fromObject(model).toObject(WorkloadProfile.class); - Assertions.assertEquals("rdnhfuku", model.name()); - Assertions.assertEquals("sjcswsmystuluqyp", model.workloadProfileType()); - Assertions.assertEquals(1783589840, model.minimumCount()); - Assertions.assertEquals(291266426, model.maximumCount()); - } -}