diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md index 60c849290ef0..d6d108bc084f 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.4 (Unreleased) +## 1.0.0-beta.1 (2022-08-05) + +- Azure Resource Manager ContainerAppsApi client library for Java. This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Package tag package-preview-2022-06. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). ### Features Added diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/README.md index c456e0cf3e79..a02875ec8d5d 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-2022-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt). +This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. Package tag package-preview-2022-06. 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.3 + 1.0.0-beta.4 ``` [//]: # ({x-version-update-end}) diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md index a863135771ff..dfa56b81699b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md @@ -9,6 +9,39 @@ - [List](#certificates_list) - [Update](#certificates_update) +## ConnectedEnvironments + +- [CheckNameAvailability](#connectedenvironments_checknameavailability) +- [CreateOrUpdate](#connectedenvironments_createorupdate) +- [Delete](#connectedenvironments_delete) +- [GetByResourceGroup](#connectedenvironments_getbyresourcegroup) +- [List](#connectedenvironments_list) +- [ListByResourceGroup](#connectedenvironments_listbyresourcegroup) +- [Update](#connectedenvironments_update) + +## ConnectedEnvironmentsCertificates + +- [CreateOrUpdate](#connectedenvironmentscertificates_createorupdate) +- [Delete](#connectedenvironmentscertificates_delete) +- [Get](#connectedenvironmentscertificates_get) +- [List](#connectedenvironmentscertificates_list) +- [Update](#connectedenvironmentscertificates_update) + +## ConnectedEnvironmentsDaprComponents + +- [CreateOrUpdate](#connectedenvironmentsdaprcomponents_createorupdate) +- [Delete](#connectedenvironmentsdaprcomponents_delete) +- [Get](#connectedenvironmentsdaprcomponents_get) +- [List](#connectedenvironmentsdaprcomponents_list) +- [ListSecrets](#connectedenvironmentsdaprcomponents_listsecrets) + +## ConnectedEnvironmentsStorages + +- [CreateOrUpdate](#connectedenvironmentsstorages_createorupdate) +- [Delete](#connectedenvironmentsstorages_delete) +- [Get](#connectedenvironmentsstorages_get) +- [List](#connectedenvironmentsstorages_list) + ## ContainerApps - [CreateOrUpdate](#containerapps_createorupdate) @@ -27,6 +60,14 @@ - [Get](#containerappsauthconfigs_get) - [ListByContainerApp](#containerappsauthconfigs_listbycontainerapp) +## ContainerAppsDiagnostics + +- [GetDetector](#containerappsdiagnostics_getdetector) +- [GetRevision](#containerappsdiagnostics_getrevision) +- [GetRoot](#containerappsdiagnostics_getroot) +- [ListDetectors](#containerappsdiagnostics_listdetectors) +- [ListRevisions](#containerappsdiagnostics_listrevisions) + ## ContainerAppsRevisionReplicas - [GetReplica](#containerappsrevisionreplicas_getreplica) @@ -55,6 +96,11 @@ - [List](#daprcomponents_list) - [ListSecrets](#daprcomponents_listsecrets) +## ManagedEnvironmentDiagnostics + +- [GetDetector](#managedenvironmentdiagnostics_getdetector) +- [ListDetectors](#managedenvironmentdiagnostics_listdetectors) + ## ManagedEnvironments - [CreateOrUpdate](#managedenvironments_createorupdate) @@ -64,155 +110,712 @@ - [ListByResourceGroup](#managedenvironments_listbyresourcegroup) - [Update](#managedenvironments_update) -## ManagedEnvironmentsStorages +## ManagedEnvironmentsDiagnostics + +- [GetRoot](#managedenvironmentsdiagnostics_getroot) + +## ManagedEnvironmentsStorages + +- [CreateOrUpdate](#managedenvironmentsstorages_createorupdate) +- [Delete](#managedenvironmentsstorages_delete) +- [Get](#managedenvironmentsstorages_get) +- [List](#managedenvironmentsstorages_list) + +## Namespaces + +- [CheckNameAvailability](#namespaces_checknameavailability) + +## Operations + +- [List](#operations_list) +### Certificates_CreateOrUpdate + +```java +import com.azure.resourcemanager.appcontainers.models.CertificateProperties; + +/** Samples for Certificates CreateOrUpdate. */ +public final class CertificatesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateCertificate( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .certificates() + .define("certificate-firendly-name") + .withRegion("East US") + .withExistingManagedEnvironment("examplerg", "testcontainerenv") + .withProperties( + new CertificateProperties() + .withPassword("private key password") + .withValue("PFX-or-PEM-blob".getBytes())) + .create(); + } +} +``` + +### Certificates_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for Certificates Delete. */ +public final class CertificatesDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Delete.json + */ + /** + * 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", Context.NONE); + } +} +``` + +### Certificates_Get + +```java +import com.azure.core.util.Context; + +/** Samples for Certificates Get. */ +public final class CertificatesGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Get.json + */ + /** + * 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", Context.NONE); + } +} +``` + +### Certificates_List + +```java +import com.azure.core.util.Context; + +/** Samples for Certificates List. */ +public final class CertificatesListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_ListByManagedEnvironment.json + */ + /** + * Sample code: List Certificates by Managed Environment. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listCertificatesByManagedEnvironment( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.certificates().list("examplerg", "testcontainerenv", Context.NONE); + } +} +``` + +### Certificates_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.models.Certificate; +import java.util.HashMap; +import java.util.Map; + +/** Samples for Certificates Update. */ +public final class CertificatesUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_Patch.json + */ + /** + * Sample code: Patch Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + Certificate resource = + manager + .certificates() + .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE) + .getValue(); + resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); + } + + @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_CheckNameAvailability + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; + +/** Samples for ConnectedEnvironments CheckNameAvailability. */ +public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json + */ + /** + * 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"), + Context.NONE); + } +} +``` + +### ConnectedEnvironments_CreateOrUpdate + +```java +/** Samples for ConnectedEnvironments CreateOrUpdate. */ +public final class ConnectedEnvironmentsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json + */ + /** + * 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") + .withStaticIp("1.2.3.4") + .withDaprAIConnectionString( + "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") + .create(); + } +} +``` + +### ConnectedEnvironments_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironments Delete. */ +public final class ConnectedEnvironmentsDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Delete.json + */ + /** + * 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", Context.NONE); + } +} +``` + +### ConnectedEnvironments_GetByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironments GetByResourceGroup. */ +public final class ConnectedEnvironmentsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Get.json + */ + /** + * 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", Context.NONE); + } +} +``` + +### ConnectedEnvironments_List + +```java +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironments List. */ +public final class ConnectedEnvironmentsListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_ListBySubscription.json + */ + /** + * 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(Context.NONE); + } +} +``` + +### ConnectedEnvironments_ListByResourceGroup + +```java +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironments ListByResourceGroup. */ +public final class ConnectedEnvironmentsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json + */ + /** + * 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", Context.NONE); + } +} +``` + +### ConnectedEnvironments_Update + +```java +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironments Update. */ +public final class ConnectedEnvironmentsUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Patch.json + */ + /** + * 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", Context.NONE); + } +} +``` + +### ConnectedEnvironmentsCertificates_CreateOrUpdate + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; +import com.azure.resourcemanager.appcontainers.models.CertificateProperties; + +/** Samples for ConnectedEnvironmentsCertificates CreateOrUpdate. */ +public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateCertificate( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironmentsCertificates() + .createOrUpdateWithResponse( + "examplerg", + "testcontainerenv", + "certificate-firendly-name", + new CertificateInner() + .withLocation("East US") + .withProperties( + new CertificateProperties() + .withPassword("private key password") + .withValue("PFX-or-PEM-blob".getBytes())), + Context.NONE); + } +} +``` + +### ConnectedEnvironmentsCertificates_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsCertificates Delete. */ +public final class ConnectedEnvironmentsCertificatesDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json + */ + /** + * 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", Context.NONE); + } +} +``` + +### ConnectedEnvironmentsCertificates_Get + +```java +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsCertificates Get. */ +public final class ConnectedEnvironmentsCertificatesGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json + */ + /** + * 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", Context.NONE); + } +} +``` + +### ConnectedEnvironmentsCertificates_List + +```java +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsCertificates List. */ +public final class ConnectedEnvironmentsCertificatesListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json + */ + /** + * 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", Context.NONE); + } +} +``` + +### ConnectedEnvironmentsCertificates_Update + +```java +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.models.CertificatePatch; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ConnectedEnvironmentsCertificates Update. */ +public final class ConnectedEnvironmentsCertificatesUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json + */ + /** + * Sample code: Patch Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironmentsCertificates() + .updateWithResponse( + "examplerg", + "testcontainerenv", + "certificate-firendly-name", + new CertificatePatch().withTags(mapOf("tag1", "value1", "tag2", "value2")), + Context.NONE); + } + + @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.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; +import com.azure.resourcemanager.appcontainers.models.DaprMetadata; +import com.azure.resourcemanager.appcontainers.models.Secret; +import java.util.Arrays; + +/** Samples for ConnectedEnvironmentsDaprComponents CreateOrUpdate. */ +public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json + */ + /** + * 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() + .createOrUpdateWithResponse( + "examplerg", + "myenvironment", + "reddog", + new DaprComponentInner() + .withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) + .withMetadata( + Arrays + .asList( + new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("masterkey"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")), + Context.NONE); + } +} +``` + +### ConnectedEnvironmentsDaprComponents_Delete + +```java +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsDaprComponents Delete. */ +public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json + */ + /** + * 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", Context.NONE); + } +} +``` + +### ConnectedEnvironmentsDaprComponents_Get -- [CreateOrUpdate](#managedenvironmentsstorages_createorupdate) -- [Delete](#managedenvironmentsstorages_delete) -- [Get](#managedenvironmentsstorages_get) -- [List](#managedenvironmentsstorages_list) +```java +import com.azure.core.util.Context; -## Namespaces +/** Samples for ConnectedEnvironmentsDaprComponents Get. */ +public final class ConnectedEnvironmentsDaprComponentsGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json + */ + /** + * 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", Context.NONE); + } +} +``` -- [CheckNameAvailability](#namespaces_checknameavailability) +### ConnectedEnvironmentsDaprComponents_List -## Operations +```java +import com.azure.core.util.Context; -- [List](#operations_list) -### Certificates_CreateOrUpdate +/** Samples for ConnectedEnvironmentsDaprComponents List. */ +public final class ConnectedEnvironmentsDaprComponentsListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json + */ + /** + * 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", Context.NONE); + } +} +``` + +### ConnectedEnvironmentsDaprComponents_ListSecrets ```java -import com.azure.resourcemanager.appcontainers.models.CertificateProperties; +import com.azure.core.util.Context; -/** Samples for Certificates CreateOrUpdate. */ -public final class CertificatesCreateOrUpdateSamples { +/** Samples for ConnectedEnvironmentsDaprComponents ListSecrets. */ +public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json */ /** - * Sample code: Create or Update Certificate. + * Sample code: List Container Apps Secrets. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateCertificate( + public static void listContainerAppsSecrets( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager - .certificates() - .define("certificate-firendly-name") - .withRegion("East US") - .withExistingManagedEnvironment("examplerg", "testcontainerenv") - .withProperties( - new CertificateProperties() - .withPassword("private key password") - .withValue("PFX-or-PEM-blob".getBytes())) - .create(); + .connectedEnvironmentsDaprComponents() + .listSecretsWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); } } ``` -### Certificates_Delete +### ConnectedEnvironmentsStorages_CreateOrUpdate ```java -import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.models.AccessMode; +import com.azure.resourcemanager.appcontainers.models.AzureFileProperties; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorageProperties; -/** Samples for Certificates Delete. */ -public final class CertificatesDeleteSamples { +/** Samples for ConnectedEnvironmentsStorages CreateOrUpdate. */ +public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json */ /** - * Sample code: Delete Certificate. + * Sample code: Create or update environments storage. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void deleteCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void createOrUpdateEnvironmentsStorage( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager - .certificates() - .deleteWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE); + .connectedEnvironmentsStorages() + .define("jlaw-demo1") + .withExistingConnectedEnvironment("examplerg", "env") + .withProperties( + new ConnectedEnvironmentStorageProperties() + .withAzureFile( + new AzureFileProperties() + .withAccountName("account1") + .withAccountKey("key") + .withAccessMode(AccessMode.READ_ONLY) + .withShareName("share1"))) + .create(); } } ``` -### Certificates_Get +### ConnectedEnvironmentsStorages_Delete ```java import com.azure.core.util.Context; -/** Samples for Certificates Get. */ -public final class CertificatesGetSamples { +/** Samples for ConnectedEnvironmentsStorages Delete. */ +public final class ConnectedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json */ /** - * Sample code: Get Certificate. + * Sample code: List environments storages by subscription. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager - .certificates() - .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE); + public static void listEnvironmentsStoragesBySubscription( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsStorages().deleteWithResponse("examplerg", "env", "jlaw-demo1", Context.NONE); } } ``` -### Certificates_List +### ConnectedEnvironmentsStorages_Get ```java import com.azure.core.util.Context; -/** Samples for Certificates List. */ -public final class CertificatesListSamples { +/** Samples for ConnectedEnvironmentsStorages Get. */ +public final class ConnectedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_ListByManagedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Get.json */ /** - * Sample code: List Certificates by Managed Environment. + * Sample code: get a environments storage properties by subscription. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void listCertificatesByManagedEnvironment( + public static void getAEnvironmentsStoragePropertiesBySubscription( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - manager.certificates().list("examplerg", "testcontainerenv", Context.NONE); + manager.connectedEnvironmentsStorages().getWithResponse("examplerg", "env", "jlaw-demo1", Context.NONE); } } ``` -### Certificates_Update +### ConnectedEnvironmentsStorages_List ```java import com.azure.core.util.Context; -import com.azure.resourcemanager.appcontainers.models.Certificate; -import java.util.HashMap; -import java.util.Map; -/** Samples for Certificates Update. */ -public final class CertificatesUpdateSamples { +/** Samples for ConnectedEnvironmentsStorages List. */ +public final class ConnectedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_List.json */ /** - * Sample code: Patch Certificate. + * Sample code: List environments storages by subscription. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { - Certificate resource = - manager - .certificates() - .getWithResponse("examplerg", "testcontainerenv", "certificate-firendly-name", Context.NONE) - .getValue(); - resource.update().withTags(mapOf("tag1", "value1", "tag2", "value2")).apply(); - } - - @SuppressWarnings("unchecked") - private static Map mapOf(Object... inputs) { - Map map = new HashMap<>(); - for (int i = 0; i < inputs.length; i += 2) { - String key = (String) inputs[i]; - T value = (T) inputs[i + 1]; - map.put(key, value); - } - return map; + public static void listEnvironmentsStoragesBySubscription( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.connectedEnvironmentsStorages().listWithResponse("examplerg", "managedEnv", Context.NONE); } } ``` @@ -243,7 +846,7 @@ import java.util.Map; /** Samples for ContainerApps CreateOrUpdate. */ public final class ContainerAppsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App. @@ -257,7 +860,7 @@ public final class ContainerAppsCreateOrUpdateSamples { .define("testcontainerApp0") .withRegion("East US") .withExistingResourceGroup("rg") - .withManagedEnvironmentId( + .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") .withConfiguration( new Configuration() @@ -285,7 +888,12 @@ public final class ContainerAppsCreateOrUpdateSamples { .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")))) - .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000))) + .withDapr( + new Dapr() + .withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30))) .withTemplate( new Template() .withContainers( @@ -348,7 +956,7 @@ import com.azure.core.util.Context; /** Samples for ContainerApps Delete. */ public final class ContainerAppsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Delete.json */ /** * Sample code: Delete Container App. @@ -369,7 +977,7 @@ import com.azure.core.util.Context; /** Samples for ContainerApps GetByResourceGroup. */ public final class ContainerAppsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. @@ -390,7 +998,7 @@ import com.azure.core.util.Context; /** Samples for ContainerApps List. */ public final class ContainerAppsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListBySubscription.json */ /** * Sample code: List Container Apps by subscription. @@ -412,7 +1020,7 @@ import com.azure.core.util.Context; /** Samples for ContainerApps ListByResourceGroup. */ public final class ContainerAppsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListByResourceGroup.json */ /** * Sample code: List Container Apps by resource group. @@ -434,7 +1042,7 @@ import com.azure.core.util.Context; /** Samples for ContainerApps ListCustomHostnameAnalysis. */ public final class ContainerAppsListCustomHostnameAnalysisSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListCustomHostNameAnalysis.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json */ /** * Sample code: Analyze Custom Hostname. @@ -457,7 +1065,7 @@ import com.azure.core.util.Context; /** Samples for ContainerApps ListSecrets. */ public final class ContainerAppsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -499,7 +1107,7 @@ import java.util.Map; /** Samples for ContainerApps Update. */ public final class ContainerAppsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Patch.json */ /** * Sample code: Patch Container App. @@ -541,7 +1149,12 @@ public final class ContainerAppsUpdateSamples { .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")))) - .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000))) + .withDapr( + new Dapr() + .withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30))) .withTemplate( new Template() .withContainers( @@ -609,7 +1222,7 @@ import com.azure.resourcemanager.appcontainers.models.UnauthenticatedClientActio /** Samples for ContainerAppsAuthConfigs CreateOrUpdate. */ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App AuthConfig. @@ -644,7 +1257,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsAuthConfigs Delete. */ public final class ContainerAppsAuthConfigsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Delete.json */ /** * Sample code: Delete Container App AuthConfig. @@ -668,7 +1281,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsAuthConfigs Get. */ public final class ContainerAppsAuthConfigsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Get.json */ /** * Sample code: Get Container App's AuthConfig. @@ -692,7 +1305,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsAuthConfigs ListByContainerApp. */ public final class ContainerAppsAuthConfigsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_ListByContainer.json */ /** * Sample code: List Auth Configs by Container Apps. @@ -706,6 +1319,122 @@ public final class ContainerAppsAuthConfigsListByContainerAppSamples { } ``` +### ContainerAppsDiagnostics_GetDetector + +```java +import com.azure.core.util.Context; + +/** Samples for ContainerAppsDiagnostics GetDetector. */ +public final class ContainerAppsDiagnosticsGetDetectorSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_Get.json + */ + /** + * 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", Context.NONE); + } +} +``` + +### ContainerAppsDiagnostics_GetRevision + +```java +import com.azure.core.util.Context; + +/** Samples for ContainerAppsDiagnostics GetRevision. */ +public final class ContainerAppsDiagnosticsGetRevisionSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json + */ + /** + * 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", Context.NONE); + } +} +``` + +### ContainerAppsDiagnostics_GetRoot + +```java +import com.azure.core.util.Context; + +/** Samples for ContainerAppsDiagnostics GetRoot. */ +public final class ContainerAppsDiagnosticsGetRootSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json + */ + /** + * 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", Context.NONE); + } +} +``` + +### ContainerAppsDiagnostics_ListDetectors + +```java +import com.azure.core.util.Context; + +/** Samples for ContainerAppsDiagnostics ListDetectors. */ +public final class ContainerAppsDiagnosticsListDetectorsSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_List.json + */ + /** + * 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", Context.NONE); + } +} +``` + +### ContainerAppsDiagnostics_ListRevisions + +```java +import com.azure.core.util.Context; + +/** Samples for ContainerAppsDiagnostics ListRevisions. */ +public final class ContainerAppsDiagnosticsListRevisionsSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json + */ + /** + * 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, Context.NONE); + } +} +``` + ### ContainerAppsRevisionReplicas_GetReplica ```java @@ -714,7 +1443,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsRevisionReplicas GetReplica. */ public final class ContainerAppsRevisionReplicasGetReplicaSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Replicas_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_Get.json */ /** * Sample code: Get Container App's revision replica. @@ -739,7 +1468,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsRevisionReplicas ListReplicas. */ public final class ContainerAppsRevisionReplicasListReplicasSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Replicas_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_List.json */ /** * Sample code: List Container App's replicas. @@ -763,7 +1492,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsRevisions ActivateRevision. */ public final class ContainerAppsRevisionsActivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Activate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Activate.json */ /** * Sample code: Activate Container App's revision. @@ -787,7 +1516,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsRevisions DeactivateRevision. */ public final class ContainerAppsRevisionsDeactivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Deactivate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Deactivate.json */ /** * Sample code: Deactivate Container App's revision. @@ -811,7 +1540,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsRevisions GetRevision. */ public final class ContainerAppsRevisionsGetRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. @@ -835,7 +1564,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsRevisions ListRevisions. */ public final class ContainerAppsRevisionsListRevisionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. @@ -857,7 +1586,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsRevisions RestartRevision. */ public final class ContainerAppsRevisionsRestartRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Restart.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Restart.json */ /** * Sample code: Restart Container App's revision. @@ -883,7 +1612,7 @@ import com.azure.resourcemanager.appcontainers.models.RegistryInfo; /** Samples for ContainerAppsSourceControls CreateOrUpdate. */ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App SourceControl. @@ -925,7 +1654,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsSourceControls Delete. */ public final class ContainerAppsSourceControlsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Delete.json */ /** * Sample code: Delete Container App SourceControl. @@ -947,7 +1676,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsSourceControls Get. */ public final class ContainerAppsSourceControlsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Get.json */ /** * Sample code: Get Container App's SourceControl. @@ -971,7 +1700,7 @@ import com.azure.core.util.Context; /** Samples for ContainerAppsSourceControls ListByContainerApp. */ public final class ContainerAppsSourceControlsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_ListByContainer.json */ /** * Sample code: List App's Source Controls. @@ -994,7 +1723,7 @@ import java.util.Arrays; /** Samples for DaprComponents CreateOrUpdate. */ public final class DaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate.json */ /** * Sample code: Create or update dapr component. @@ -1033,7 +1762,7 @@ import com.azure.core.util.Context; /** Samples for DaprComponents Delete. */ public final class DaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Delete.json */ /** * Sample code: Delete dapr component. @@ -1054,7 +1783,7 @@ import com.azure.core.util.Context; /** Samples for DaprComponents Get. */ public final class DaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get.json */ /** * Sample code: Get Dapr Component. @@ -1075,7 +1804,7 @@ import com.azure.core.util.Context; /** Samples for DaprComponents List. */ public final class DaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_List.json */ /** * Sample code: List Dapr Components. @@ -1096,7 +1825,7 @@ import com.azure.core.util.Context; /** Samples for DaprComponents ListSecrets. */ public final class DaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. @@ -1110,6 +1839,55 @@ public final class DaprComponentsListSecretsSamples { } ``` +### ManagedEnvironmentDiagnostics_GetDetector + +```java +import com.azure.core.util.Context; + +/** Samples for ManagedEnvironmentDiagnostics GetDetector. */ +public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json + */ + /** + * 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", Context.NONE); + } +} +``` + +### ManagedEnvironmentDiagnostics_ListDetectors + +```java +import com.azure.core.util.Context; + +/** Samples for ManagedEnvironmentDiagnostics ListDetectors. */ +public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_List.json + */ + /** + * 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", Context.NONE); + } +} +``` + ### ManagedEnvironments_CreateOrUpdate ```java @@ -1119,7 +1897,7 @@ import com.azure.resourcemanager.appcontainers.models.LogAnalyticsConfiguration; /** Samples for ManagedEnvironments CreateOrUpdate. */ public final class ManagedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create environments. @@ -1152,7 +1930,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironments Delete. */ public final class ManagedEnvironmentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Delete.json */ /** * Sample code: Delete environment by name. @@ -1174,7 +1952,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironments GetByResourceGroup. */ public final class ManagedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. @@ -1195,7 +1973,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironments List. */ public final class ManagedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListBySubscription.json */ /** * Sample code: List environments by subscription. @@ -1217,7 +1995,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironments ListByResourceGroup. */ public final class ManagedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. @@ -1242,7 +2020,7 @@ import java.util.Map; /** Samples for ManagedEnvironments Update. */ public final class ManagedEnvironmentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Patch.json */ /** * Sample code: Patch Managed Environment. @@ -1275,6 +2053,27 @@ public final class ManagedEnvironmentsUpdateSamples { } ``` +### ManagedEnvironmentsDiagnostics_GetRoot + +```java +import com.azure.core.util.Context; + +/** Samples for ManagedEnvironmentsDiagnostics GetRoot. */ +public final class ManagedEnvironmentsDiagnosticsGetRootSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json + */ + /** + * 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", Context.NONE); + } +} +``` + ### ManagedEnvironmentsStorages_CreateOrUpdate ```java @@ -1285,7 +2084,7 @@ import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentStorageP /** Samples for ManagedEnvironmentsStorages CreateOrUpdate. */ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. @@ -1319,7 +2118,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironmentsStorages Delete. */ public final class ManagedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. @@ -1341,7 +2140,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironmentsStorages Get. */ public final class ManagedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage properties by subscription. @@ -1363,7 +2162,7 @@ import com.azure.core.util.Context; /** Samples for ManagedEnvironmentsStorages List. */ public final class ManagedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. @@ -1386,7 +2185,7 @@ import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityReque /** Samples for Namespaces CheckNameAvailability. */ public final class NamespacesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. @@ -1407,7 +2206,7 @@ public final class NamespacesCheckNameAvailabilitySamples { } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CheckNameAvailability.json */ /** * Sample code: ContainerApps_CheckNameAvailability. @@ -1435,7 +2234,7 @@ import com.azure.core.util.Context; /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Operations_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Operations_List.json */ /** * Sample code: List all operations. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml b/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml index 75a6bbbc039a..cac2c55ef51f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/pom.xml @@ -13,7 +13,7 @@ jar Microsoft Azure SDK for ContainerAppsApi Management - This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-2022-03. + This package contains Microsoft Azure SDK for ContainerAppsApi Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Package tag package-preview-2022-06. https://github.com/Azure/azure-sdk-for-java diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java index 2cda5dd69c19..699fbe3fb96e 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 @@ -25,25 +25,39 @@ import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsApiClient; import com.azure.resourcemanager.appcontainers.implementation.CertificatesImpl; +import com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsCertificatesImpl; +import com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsDaprComponentsImpl; +import com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsImpl; +import com.azure.resourcemanager.appcontainers.implementation.ConnectedEnvironmentsStoragesImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsApiClientBuilder; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsAuthConfigsImpl; +import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsDiagnosticsImpl; import com.azure.resourcemanager.appcontainers.implementation.ContainerAppsImpl; 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.DaprComponentsImpl; +import com.azure.resourcemanager.appcontainers.implementation.ManagedEnvironmentDiagnosticsImpl; +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.models.Certificates; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironments; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsCertificates; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsDaprComponents; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsStorages; import com.azure.resourcemanager.appcontainers.models.ContainerApps; import com.azure.resourcemanager.appcontainers.models.ContainerAppsAuthConfigs; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsDiagnostics; 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.DaprComponents; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentDiagnostics; 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; @@ -66,6 +80,12 @@ public final class ContainerAppsApiManager { private DaprComponents daprComponents; + private ContainerAppsDiagnostics containerAppsDiagnostics; + + private ManagedEnvironmentDiagnostics managedEnvironmentDiagnostics; + + private ManagedEnvironmentsDiagnostics managedEnvironmentsDiagnostics; + private Operations operations; private ManagedEnvironments managedEnvironments; @@ -78,6 +98,14 @@ public final class ContainerAppsApiManager { private ContainerAppsSourceControls containerAppsSourceControls; + private ConnectedEnvironments connectedEnvironments; + + private ConnectedEnvironmentsCertificates connectedEnvironmentsCertificates; + + private ConnectedEnvironmentsDaprComponents connectedEnvironmentsDaprComponents; + + private ConnectedEnvironmentsStorages connectedEnvironmentsStorages; + private final ContainerAppsApiClient clientObject; private ContainerAppsApiManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -243,7 +271,7 @@ public ContainerAppsApiManager authenticate(TokenCredential credential, AzurePro .append("-") .append("com.azure.resourcemanager.appcontainers") .append("/") - .append("1.0.0-beta.3"); + .append("1.0.0-beta.1"); if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) { userAgentBuilder .append(" (") @@ -363,6 +391,45 @@ public DaprComponents daprComponents() { return daprComponents; } + /** + * 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); + } + 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); + } + 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); + } + return managedEnvironmentsDiagnostics; + } + /** * Gets the resource collection API of Operations. * @@ -437,6 +504,58 @@ public ContainerAppsSourceControls containerAppsSourceControls() { return containerAppsSourceControls; } + /** + * Gets the resource collection API of ConnectedEnvironments. It manages ConnectedEnvironment. + * + * @return Resource collection API of ConnectedEnvironments. + */ + public ConnectedEnvironments connectedEnvironments() { + if (this.connectedEnvironments == null) { + this.connectedEnvironments = new ConnectedEnvironmentsImpl(clientObject.getConnectedEnvironments(), this); + } + return connectedEnvironments; + } + + /** + * Gets the resource collection API of ConnectedEnvironmentsCertificates. + * + * @return Resource collection API of ConnectedEnvironmentsCertificates. + */ + public ConnectedEnvironmentsCertificates connectedEnvironmentsCertificates() { + if (this.connectedEnvironmentsCertificates == null) { + this.connectedEnvironmentsCertificates = + new ConnectedEnvironmentsCertificatesImpl(clientObject.getConnectedEnvironmentsCertificates(), this); + } + return connectedEnvironmentsCertificates; + } + + /** + * Gets the resource collection API of ConnectedEnvironmentsDaprComponents. + * + * @return Resource collection API of ConnectedEnvironmentsDaprComponents. + */ + public ConnectedEnvironmentsDaprComponents connectedEnvironmentsDaprComponents() { + if (this.connectedEnvironmentsDaprComponents == null) { + this.connectedEnvironmentsDaprComponents = + new ConnectedEnvironmentsDaprComponentsImpl( + clientObject.getConnectedEnvironmentsDaprComponents(), this); + } + return connectedEnvironmentsDaprComponents; + } + + /** + * Gets the resource collection API of ConnectedEnvironmentsStorages. It manages ConnectedEnvironmentStorage. + * + * @return Resource collection API of ConnectedEnvironmentsStorages. + */ + public ConnectedEnvironmentsStorages connectedEnvironmentsStorages() { + if (this.connectedEnvironmentsStorages == null) { + this.connectedEnvironmentsStorages = + new ConnectedEnvironmentsStoragesImpl(clientObject.getConnectedEnvironmentsStorages(), this); + } + return connectedEnvironmentsStorages; + } + /** * @return Wrapped service client ContainerAppsApiClient providing direct access to the underlying auto-generated * API implementation, based on Azure REST API. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/CertificatesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/CertificatesClient.java index 32178bc86902..650fb77a11cc 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 @@ -145,7 +145,9 @@ Response deleteWithResponse( String resourceGroupName, String environmentName, String certificateName, Context context); /** - * Patches a certificate. Currently only patching of tags is supported. + * Update properties of a certificate + * + *

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. @@ -162,7 +164,9 @@ CertificateInner update( String resourceGroupName, String environmentName, String certificateName, CertificatePatch certificateEnvelope); /** - * Patches a certificate. Currently only patching of tags is supported. + * Update properties of a certificate + * + *

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. 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 new file mode 100644 index 000000000000..6306b6f23e80 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsCertificatesClient.java @@ -0,0 +1,195 @@ +// Copyright (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.CertificateInner; +import com.azure.resourcemanager.appcontainers.models.CertificatePatch; + +/** + * An instance of this class provides access to all the operations defined in ConnectedEnvironmentsCertificatesClient. + */ +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. + * @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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String connectedEnvironmentName); + + /** + * 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. + * @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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String connectedEnvironmentName, 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Certificate. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CertificateInner get(String resourceGroupName, String connectedEnvironmentName, String certificateName); + + /** + * 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. + * @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); + + /** + * 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. + * @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 createOrUpdate(String resourceGroupName, String connectedEnvironmentName, String certificateName); + + /** + * 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. + * @param certificateEnvelope Certificate to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link + * Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String resourceGroupName, + String connectedEnvironmentName, + String certificateName, + CertificateInner certificateEnvelope, + 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String connectedEnvironmentName, String certificateName); + + /** + * 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. + * @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); + + /** + * Update properties of a certificate + * + *

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. + * @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, + CertificatePatch certificateEnvelope); + + /** + * Update properties of a certificate + * + *

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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link + * Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, + String connectedEnvironmentName, + String certificateName, + CertificatePatch certificateEnvelope, + Context context); +} 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 new file mode 100644 index 000000000000..48d95ec51e13 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsClient.java @@ -0,0 +1,308 @@ +// Copyright (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.CheckNameAvailabilityResponseInner; +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. */ +public interface ConnectedEnvironmentsClient { + /** + * Get all connectedEnvironments for a subscription. + * + * @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 all connectedEnvironments for a subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + 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 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 all connectedEnvironments for a subscription as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + 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 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 all connectedEnvironments in a resource group as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * 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. + * @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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listByResourceGroup(String resourceGroupName, 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of an connectedEnvironment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ConnectedEnvironmentInner getByResourceGroup(String resourceGroupName, String connectedEnvironmentName); + + /** + * 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. + * @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); + + /** + * 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. + * @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. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ConnectedEnvironmentInner> beginCreateOrUpdate( + 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. + * @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. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + SyncPoller, ConnectedEnvironmentInner> beginCreateOrUpdate( + 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. + * @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); + + /** + * 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. + * @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); + + /** + * 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. + * @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); + + /** + * 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. + * @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); + + /** + * 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @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 connectedEnvironmentName, Context context); + + /** + * Update connected Environment's properties. + * + *

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. + * @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 update(String resourceGroupName, String connectedEnvironmentName); + + /** + * Update connected Environment's properties. + * + *

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. + * @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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response updateWithResponse( + String resourceGroupName, String connectedEnvironmentName, Context context); + + /** + * Checks the resource connectedEnvironmentName availability. + * + *

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. + * @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, + CheckNameAvailabilityRequest checkNameAvailabilityRequest); + + /** + * Checks the resource connectedEnvironmentName availability. + * + *

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. + * @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); +} 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 new file mode 100644 index 000000000000..24c729b87eb9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsDaprComponentsClient.java @@ -0,0 +1,193 @@ +// Copyright (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.DaprComponentInner; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; + +/** + * 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. + * @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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String connectedEnvironmentName); + + /** + * 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. + * @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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable list(String resourceGroupName, String connectedEnvironmentName, 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a dapr component. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DaprComponentInner get(String resourceGroupName, String connectedEnvironmentName, String componentName); + + /** + * 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. + * @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); + + /** + * Creates or updates a Dapr Component. + * + *

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. + * @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 daprComponentEnvelope); + + /** + * Creates or updates a Dapr Component. + * + *

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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr Component along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String resourceGroupName, + String connectedEnvironmentName, + String componentName, + DaprComponentInner daprComponentEnvelope, + Context context); + + /** + * Delete a Dapr Component. + * + *

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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String connectedEnvironmentName, String componentName); + + /** + * Delete a Dapr Component. + * + *

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. + * @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); + + /** + * 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr component Secrets Collection ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DaprSecretsCollectionInner listSecrets( + 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr component Secrets Collection ARM resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listSecretsWithResponse( + String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); +} 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 new file mode 100644 index 000000000000..637b4b0b548a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ConnectedEnvironmentsStoragesClient.java @@ -0,0 +1,150 @@ +// Copyright (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.ConnectedEnvironmentStorageInner; +import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner; + +/** 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. + * @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 all storages for a connectedEnvironment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ConnectedEnvironmentStoragesCollectionInner list(String resourceGroupName, String connectedEnvironmentName); + + /** + * 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. + * @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); + + /** + * 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return storage for a connectedEnvironment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ConnectedEnvironmentStorageInner get(String resourceGroupName, String connectedEnvironmentName, String storageName); + + /** + * 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. + * @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); + + /** + * 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. + * @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); + + /** + * 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. + * @param context The context to associate with this 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 storage resource for connectedEnvironment along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response createOrUpdateWithResponse( + String resourceGroupName, + String connectedEnvironmentName, + String storageName, + ConnectedEnvironmentStorageInner storageEnvelope, + 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String connectedEnvironmentName, String storageName); + + /** + * 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. + * @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); +} 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 21fe87e369a8..ef1b6e2ece49 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 @@ -79,6 +79,27 @@ public interface ContainerAppsApiClient { */ DaprComponentsClient getDaprComponents(); + /** + * 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 OperationsClient object to access its operations. * @@ -120,4 +141,32 @@ public interface ContainerAppsApiClient { * @return the ContainerAppsSourceControlsClient object. */ ContainerAppsSourceControlsClient getContainerAppsSourceControls(); + + /** + * Gets the ConnectedEnvironmentsClient object to access its operations. + * + * @return the ConnectedEnvironmentsClient object. + */ + ConnectedEnvironmentsClient getConnectedEnvironments(); + + /** + * Gets the ConnectedEnvironmentsCertificatesClient object to access its operations. + * + * @return the ConnectedEnvironmentsCertificatesClient object. + */ + ConnectedEnvironmentsCertificatesClient getConnectedEnvironmentsCertificates(); + + /** + * Gets the ConnectedEnvironmentsDaprComponentsClient object to access its operations. + * + * @return the ConnectedEnvironmentsDaprComponentsClient object. + */ + ConnectedEnvironmentsDaprComponentsClient getConnectedEnvironmentsDaprComponents(); + + /** + * Gets the ConnectedEnvironmentsStoragesClient object to access its operations. + * + * @return the ConnectedEnvironmentsStoragesClient object. + */ + ConnectedEnvironmentsStoragesClient getConnectedEnvironmentsStorages(); } 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 5ee0e85fc0d8..d8149b36b04a 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 @@ -219,7 +219,9 @@ ContainerAppInner createOrUpdate( void delete(String resourceGroupName, String containerAppName, Context context); /** - * Patches a Container App using JSON Merge Patch. + * Update properties of a Container App + * + *

Patches a Container App using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. @@ -235,7 +237,9 @@ SyncPoller, Void> beginUpdate( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope); /** - * Patches a Container App using JSON Merge Patch. + * Update properties of a Container App + * + *

Patches a Container App using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. @@ -252,7 +256,9 @@ SyncPoller, Void> beginUpdate( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context); /** - * Patches a Container App using JSON Merge Patch. + * Update properties of a Container App + * + *

Patches a Container App using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. @@ -266,7 +272,9 @@ SyncPoller, Void> beginUpdate( void update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope); /** - * Patches a Container App using JSON Merge Patch. + * Update properties of a Container App + * + *

Patches a Container App using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. 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 new file mode 100644 index 000000000000..6e08aadf6927 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsDiagnosticsClient.java @@ -0,0 +1,168 @@ +// Copyright (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.ContainerAppInner; +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. */ +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. + * @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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDetectors(String resourceGroupName, String containerAppName); + + /** + * 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. + * @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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listDetectors(String resourceGroupName, String containerAppName, 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a diagnostics result of a Container App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiagnosticsInner getDetector(String resourceGroupName, String containerAppName, String detectorName); + + /** + * 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. + * @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); + + /** + * 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. + * @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); + + /** + * 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. + * @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); + + /** + * 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a revision of a Container App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + RevisionInner getRevision(String resourceGroupName, String containerAppName, String revisionName); + + /** + * 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. + * @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); + + /** + * 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.core.management.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 properties of a Container App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ContainerAppInner getRoot(String resourceGroupName, String containerAppName); + + /** + * 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.core.management.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 properties of a Container App along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getRootWithResponse(String resourceGroupName, String containerAppName, Context context); +} 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 5a659b7517d8..6ba1036ec56b 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 @@ -76,7 +76,9 @@ Response getWithResponse( String resourceGroupName, String environmentName, String componentName, Context context); /** - * Creates or updates a Dapr Component in a Managed Environment. + * Creates or updates a Dapr Component. + * + *

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. @@ -96,7 +98,9 @@ DaprComponentInner createOrUpdate( DaprComponentInner daprComponentEnvelope); /** - * Creates or updates a Dapr Component in a Managed Environment. + * Creates or updates a Dapr Component. + * + *

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. @@ -118,7 +122,9 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete a Dapr Component from a Managed Environment. + * Delete a Dapr Component. + * + *

Delete a Dapr Component from a Managed Environment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. @@ -132,7 +138,9 @@ Response createOrUpdateWithResponse( void delete(String resourceGroupName, String environmentName, String componentName); /** - * Delete a Dapr Component from a Managed Environment. + * Delete a Dapr Component. + * + *

Delete a Dapr Component from a Managed Environment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. 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 new file mode 100644 index 000000000000..558409a4d4c4 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentDiagnosticsClient.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.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.DiagnosticsCollectionInner; +import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; + +/** 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. + * + * @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 list of diagnostics for a Managed Environment used to host container apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiagnosticsCollectionInner listDetectors(String resourceGroupName, String environmentName); + + /** + * Get the list of diagnostics for a given Managed Environment. + * + *

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. + * @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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listDetectorsWithResponse( + String resourceGroupName, String environmentName, Context context); + + /** + * Get the diagnostics data for a given Managed Environment. + * + *

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. + * @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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DiagnosticsInner getDetector(String resourceGroupName, String environmentName, String detectorName); + + /** + * Get the diagnostics data for a given Managed Environment. + * + *

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. + * @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); +} 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 338dd07ce2e9..39fb74de4c97 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 @@ -16,7 +16,9 @@ /** An instance of this class provides access to all the operations defined in ManagedEnvironmentsClient. */ public interface ManagedEnvironmentsClient { /** - * Get all Managed Environments for a subscription. + * Get all 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. @@ -27,7 +29,9 @@ public interface ManagedEnvironmentsClient { PagedIterable list(); /** - * Get all Managed Environments for a subscription. + * Get all 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. @@ -40,7 +44,9 @@ public interface ManagedEnvironmentsClient { PagedIterable list(Context context); /** - * Get all the Managed Environments in a resource group. + * Get all the 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. @@ -53,7 +59,9 @@ public interface ManagedEnvironmentsClient { PagedIterable listByResourceGroup(String resourceGroupName); /** - * Get all the Managed Environments in a resource group. + * Get all the 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. @@ -67,7 +75,9 @@ public interface ManagedEnvironmentsClient { PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Get the properties of a Managed Environment used to host container apps. + * Get the properties of a Managed Environment. + * + *

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. @@ -81,7 +91,9 @@ public interface ManagedEnvironmentsClient { ManagedEnvironmentInner getByResourceGroup(String resourceGroupName, String environmentName); /** - * Get the properties of a Managed Environment used to host container apps. + * Get the properties of a Managed Environment. + * + *

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. @@ -97,7 +109,9 @@ Response getByResourceGroupWithResponse( String resourceGroupName, String environmentName, Context context); /** - * Creates or updates a Managed Environment used to host container apps. + * Creates or updates a Managed Environment. + * + *

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

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

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

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. @@ -163,7 +183,9 @@ ManagedEnvironmentInner createOrUpdate( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); /** - * Delete a Managed Environment if it does not have any container apps. + * Delete a Managed Environment. + * + *

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. @@ -177,7 +199,9 @@ ManagedEnvironmentInner createOrUpdate( SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName); /** - * Delete a Managed Environment if it does not have any container apps. + * Delete a Managed Environment. + * + *

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. @@ -192,7 +216,9 @@ ManagedEnvironmentInner createOrUpdate( SyncPoller, Void> beginDelete(String resourceGroupName, String environmentName, Context context); /** - * Delete a Managed Environment if it does not have any container apps. + * Delete a Managed Environment. + * + *

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. @@ -205,7 +231,9 @@ ManagedEnvironmentInner createOrUpdate( void delete(String resourceGroupName, String environmentName); /** - * Delete a Managed Environment if it does not have any container apps. + * Delete a Managed Environment. + * + *

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. @@ -219,7 +247,9 @@ ManagedEnvironmentInner createOrUpdate( void delete(String resourceGroupName, String environmentName, Context context); /** - * Patches a Managed Environment using JSON Merge Patch. + * Update Managed Environment's properties. + * + *

Patches a Managed Environment using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. @@ -235,7 +265,9 @@ SyncPoller, Void> beginUpdate( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); /** - * Patches a Managed Environment using JSON Merge Patch. + * Update Managed Environment's properties. + * + *

Patches a Managed Environment using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. @@ -252,7 +284,9 @@ SyncPoller, Void> beginUpdate( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); /** - * Patches a Managed Environment using JSON Merge Patch. + * Update Managed Environment's properties. + * + *

Patches a Managed Environment using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. @@ -266,7 +300,9 @@ SyncPoller, Void> beginUpdate( void update(String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); /** - * Patches a Managed Environment using JSON Merge Patch. + * Update Managed Environment's properties. + * + *

Patches a Managed Environment using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. 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 new file mode 100644 index 000000000000..ea0cb95326bf --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsDiagnosticsClient.java @@ -0,0 +1,48 @@ +// Copyright (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.ManagedEnvironmentInner; + +/** 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. + * + * @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 properties of a Managed Environment used to host container apps. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ManagedEnvironmentInner getRoot(String resourceGroupName, String environmentName); + + /** + * Get the properties of a Managed Environment. + * + *

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. + * @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); +} 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 1a0dc5841f94..50960ffcbc3b 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 @@ -14,7 +14,9 @@ /** An instance of this class provides access to all the operations defined in NamespacesClient. */ public interface NamespacesClient { /** - * Checks if resource name is available. + * Checks the resource name availability. + * + *

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. @@ -30,7 +32,9 @@ CheckNameAvailabilityResponseInner checkNameAvailability( String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest); /** - * Checks if resource name is available. + * Checks the resource name availability. + * + *

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. 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 84c4c35a5019..f693d5b9037f 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 @@ -16,37 +16,34 @@ @Fluent public final class AuthConfigProperties { /* - * The configuration settings of the platform of ContainerApp Service - * Authentication/Authorization. + * The configuration settings of the platform of ContainerApp Service Authentication/Authorization. */ @JsonProperty(value = "platform") private AuthPlatform platform; /* - * The configuration settings that determines the validation flow of users - * using Service Authentication/Authorization. + * The configuration settings that determines the validation flow of users using Service + * Authentication/Authorization. */ @JsonProperty(value = "globalValidation") private GlobalValidation globalValidation; /* - * The configuration settings of each of the identity providers used to - * configure ContainerApp Service Authentication/Authorization. + * The configuration settings of each of the identity providers used to configure ContainerApp Service + * Authentication/Authorization. */ @JsonProperty(value = "identityProviders") private IdentityProviders identityProviders; /* - * 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. */ @JsonProperty(value = "login") private Login login; /* - * The configuration settings of the HTTP requests for authentication and - * authorization requests made against ContainerApp Service - * Authentication/Authorization. + * The configuration settings of the HTTP requests for authentication and authorization requests made against + * ContainerApp Service Authentication/Authorization. */ @JsonProperty(value = "httpSettings") private HttpSettings httpSettings; 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 af4a68117d00..9fa25b27dbf4 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 @@ -21,8 +21,7 @@ public final class CertificateInner extends Resource { private CertificateProperties properties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; 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 new file mode 100644 index 000000000000..825f98399001 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentInner.java @@ -0,0 +1,176 @@ +// Copyright (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.ConnectedEnvironmentProvisioningState; +import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; + +/** An environment for Kubernetes cluster specialized for web workloads by Azure App Service. */ +@Fluent +public final class ConnectedEnvironmentInner extends Resource { + /* + * The complex type of the extended location. + */ + @JsonProperty(value = "extendedLocation") + private ExtendedLocation extendedLocation; + + /* + * ConnectedEnvironment resource specific properties + */ + @JsonProperty(value = "properties") + private ConnectedEnvironmentProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * 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 ConnectedEnvironmentInner object itself. + */ + public ConnectedEnvironmentInner withExtendedLocation(ExtendedLocation extendedLocation) { + this.extendedLocation = extendedLocation; + return this; + } + + /** + * Get the innerProperties property: ConnectedEnvironment resource specific properties. + * + * @return the innerProperties value. + */ + private ConnectedEnvironmentProperties 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; + } + + /** {@inheritDoc} */ + @Override + public ConnectedEnvironmentInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public ConnectedEnvironmentInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the provisioningState property: Provisioning state of the Kubernetes Environment. + * + * @return the provisioningState value. + */ + public ConnectedEnvironmentProvisioningState provisioningState() { + return this.innerProperties() == null ? null : this.innerProperties().provisioningState(); + } + + /** + * Get the deploymentErrors property: Any errors that occurred during deployment or deployment validation. + * + * @return the deploymentErrors value. + */ + public String deploymentErrors() { + return this.innerProperties() == null ? null : this.innerProperties().deploymentErrors(); + } + + /** + * Get the defaultDomain property: Default Domain Name for the cluster. + * + * @return the defaultDomain value. + */ + public String defaultDomain() { + return this.innerProperties() == null ? null : this.innerProperties().defaultDomain(); + } + + /** + * Get the staticIp property: Static IP of the connectedEnvironment. + * + * @return the staticIp value. + */ + public String staticIp() { + return this.innerProperties() == null ? null : this.innerProperties().staticIp(); + } + + /** + * Set the staticIp property: Static IP of the connectedEnvironment. + * + * @param staticIp the staticIp value to set. + * @return the ConnectedEnvironmentInner object itself. + */ + public ConnectedEnvironmentInner withStaticIp(String staticIp) { + if (this.innerProperties() == null) { + this.innerProperties = new ConnectedEnvironmentProperties(); + } + this.innerProperties().withStaticIp(staticIp); + return this; + } + + /** + * 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() { + return this.innerProperties() == null ? null : this.innerProperties().daprAIConnectionString(); + } + + /** + * 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. + */ + public ConnectedEnvironmentInner withDaprAIConnectionString(String daprAIConnectionString) { + if (this.innerProperties() == null) { + this.innerProperties = new ConnectedEnvironmentProperties(); + } + this.innerProperties().withDaprAIConnectionString(daprAIConnectionString); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (extendedLocation() != null) { + extendedLocation().validate(); + } + if (innerProperties() != null) { + innerProperties().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 new file mode 100644 index 000000000000..f5a615055b4f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentProperties.java @@ -0,0 +1,120 @@ +// Copyright (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.ConnectedEnvironmentProvisioningState; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** ConnectedEnvironment resource specific properties. */ +@Fluent +public final class ConnectedEnvironmentProperties { + /* + * Provisioning state of the Kubernetes Environment. + */ + @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) + private ConnectedEnvironmentProvisioningState provisioningState; + + /* + * Any errors that occurred during deployment or deployment validation + */ + @JsonProperty(value = "deploymentErrors", access = JsonProperty.Access.WRITE_ONLY) + private String deploymentErrors; + + /* + * Default Domain Name for the cluster + */ + @JsonProperty(value = "defaultDomain", access = JsonProperty.Access.WRITE_ONLY) + private String defaultDomain; + + /* + * Static IP of the connectedEnvironment + */ + @JsonProperty(value = "staticIp") + private String staticIp; + + /* + * Application Insights connection string used by Dapr to export Service to Service communication telemetry + */ + @JsonProperty(value = "daprAIConnectionString") + private String daprAIConnectionString; + + /** + * Get the provisioningState property: Provisioning state of the Kubernetes Environment. + * + * @return the provisioningState value. + */ + public ConnectedEnvironmentProvisioningState provisioningState() { + return this.provisioningState; + } + + /** + * Get the deploymentErrors property: Any errors that occurred during deployment or deployment validation. + * + * @return the deploymentErrors value. + */ + public String deploymentErrors() { + return this.deploymentErrors; + } + + /** + * Get the defaultDomain property: Default Domain Name for the cluster. + * + * @return the defaultDomain value. + */ + public String defaultDomain() { + return this.defaultDomain; + } + + /** + * Get the staticIp property: Static IP of the connectedEnvironment. + * + * @return the staticIp value. + */ + public String staticIp() { + return this.staticIp; + } + + /** + * Set the staticIp property: Static IP of the connectedEnvironment. + * + * @param staticIp the staticIp value to set. + * @return the ConnectedEnvironmentProperties object itself. + */ + public ConnectedEnvironmentProperties withStaticIp(String staticIp) { + this.staticIp = staticIp; + return this; + } + + /** + * 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() { + return this.daprAIConnectionString; + } + + /** + * 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. + */ + public ConnectedEnvironmentProperties withDaprAIConnectionString(String daprAIConnectionString) { + this.daprAIConnectionString = daprAIConnectionString; + 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 new file mode 100644 index 000000000000..2ee1d74dd5e7 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStorageInner.java @@ -0,0 +1,67 @@ +// Copyright (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.ConnectedEnvironmentStorageProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Storage resource for connectedEnvironment. */ +@Fluent +public final class ConnectedEnvironmentStorageInner extends ProxyResource { + /* + * Storage properties + */ + @JsonProperty(value = "properties") + private ConnectedEnvironmentStorageProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the properties property: Storage properties. + * + * @return the properties value. + */ + public ConnectedEnvironmentStorageProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Storage properties. + * + * @param properties the properties value to set. + * @return the ConnectedEnvironmentStorageInner object itself. + */ + public ConnectedEnvironmentStorageInner withProperties(ConnectedEnvironmentStorageProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStoragesCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStoragesCollectionInner.java new file mode 100644 index 000000000000..f152f04bf171 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStoragesCollectionInner.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of Storage for Environments. */ +@Fluent +public final class ConnectedEnvironmentStoragesCollectionInner { + /* + * Collection of storage resources. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /** + * Get the value property: Collection of storage resources. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Collection of storage resources. + * + * @param value the value value to set. + * @return the ConnectedEnvironmentStoragesCollectionInner object itself. + */ + public ConnectedEnvironmentStoragesCollectionInner withValue(List value) { + this.value = value; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (value() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property value in model ConnectedEnvironmentStoragesCollectionInner")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(ConnectedEnvironmentStoragesCollectionInner.class); +} 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 89661084471e..9993dba7afcf 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java @@ -8,6 +8,7 @@ import com.azure.core.management.Resource; import com.azure.resourcemanager.appcontainers.models.Configuration; import com.azure.resourcemanager.appcontainers.models.ContainerAppProvisioningState; +import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; import com.azure.resourcemanager.appcontainers.models.Template; import com.fasterxml.jackson.annotation.JsonProperty; @@ -18,8 +19,14 @@ @Fluent public final class ContainerAppInner extends Resource { /* - * managed identities for the Container App to interact with other Azure - * services without maintaining any secrets or credentials in code. + * The complex type of the extended location. + */ + @JsonProperty(value = "extendedLocation") + private ExtendedLocation extendedLocation; + + /* + * managed identities for the Container App to interact with other Azure services without maintaining any secrets + * or credentials in code. */ @JsonProperty(value = "identity") private ManagedServiceIdentity identity; @@ -30,6 +37,26 @@ public final class ContainerAppInner extends Resource { @JsonProperty(value = "properties") private ContainerAppProperties innerProperties; + /** + * 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 ContainerAppInner object itself. + */ + public ContainerAppInner withExtendedLocation(ExtendedLocation extendedLocation) { + this.extendedLocation = extendedLocation; + return this; + } + /** * Get the identity property: managed identities for the Container App to interact with other Azure services without * maintaining any secrets or credentials in code. @@ -85,7 +112,7 @@ public ContainerAppProvisioningState provisioningState() { } /** - * Get the managedEnvironmentId property: Resource ID of the Container App's environment. + * Get the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment. * * @return the managedEnvironmentId value. */ @@ -94,7 +121,7 @@ public String managedEnvironmentId() { } /** - * Set the managedEnvironmentId property: Resource ID of the Container App's environment. + * 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. @@ -107,6 +134,29 @@ public ContainerAppInner withManagedEnvironmentId(String managedEnvironmentId) { return this; } + /** + * Get the environmentId property: Resource ID of environment. + * + * @return the environmentId value. + */ + public String environmentId() { + return this.innerProperties() == null ? null : this.innerProperties().environmentId(); + } + + /** + * Set the environmentId property: Resource ID of environment. + * + * @param environmentId the environmentId value to set. + * @return the ContainerAppInner object itself. + */ + public ContainerAppInner withEnvironmentId(String environmentId) { + if (this.innerProperties() == null) { + this.innerProperties = new ContainerAppProperties(); + } + this.innerProperties().withEnvironmentId(environmentId); + return this; + } + /** * Get the latestRevisionName property: Name of the latest revision of the Container App. * @@ -195,6 +245,9 @@ public List outboundIpAddresses() { * @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/ContainerAppProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppProperties.java index e3a5b1736b4f..f77ad6a3e174 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 @@ -21,11 +21,17 @@ public final class ContainerAppProperties { private ContainerAppProvisioningState provisioningState; /* - * Resource ID of the Container App's environment. + * Deprecated. Resource ID of the Container App's environment. */ @JsonProperty(value = "managedEnvironmentId") private String managedEnvironmentId; + /* + * Resource ID of environment. + */ + @JsonProperty(value = "environmentId") + private String environmentId; + /* * Name of the latest revision of the Container App. */ @@ -72,7 +78,7 @@ public ContainerAppProvisioningState provisioningState() { } /** - * Get the managedEnvironmentId property: Resource ID of the Container App's environment. + * Get the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment. * * @return the managedEnvironmentId value. */ @@ -81,7 +87,7 @@ public String managedEnvironmentId() { } /** - * Set the managedEnvironmentId property: Resource ID of the Container App's environment. + * 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. @@ -91,6 +97,26 @@ public ContainerAppProperties withManagedEnvironmentId(String managedEnvironment return this; } + /** + * Get the environmentId property: Resource ID of environment. + * + * @return the environmentId value. + */ + public String environmentId() { + return this.environmentId; + } + + /** + * Set the environmentId property: Resource ID of environment. + * + * @param environmentId the environmentId value to set. + * @return the ContainerAppProperties object itself. + */ + public ContainerAppProperties withEnvironmentId(String environmentId) { + this.environmentId = environmentId; + return this; + } + /** * Get the latestRevisionName property: Name of the latest revision of the Container App. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultInner.java index 612f3c3383d7..a0b246103f13 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 @@ -5,46 +5,80 @@ 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.DefaultErrorResponseError; +import com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo; import com.azure.resourcemanager.appcontainers.models.DnsVerificationTestResult; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; /** Custom domain analysis. */ @Fluent -public final class CustomHostnameAnalysisResultInner extends ProxyResource { +public final class CustomHostnameAnalysisResultInner { /* - * CustomHostnameAnalysisResult resource specific properties + * Host name that was analyzed */ - @JsonProperty(value = "properties") - private CustomHostnameAnalysisResultProperties innerProperties; + @JsonProperty(value = "hostName", access = JsonProperty.Access.WRITE_ONLY) + private String hostname; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * true if hostname is already verified; otherwise, false. */ - @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) - private SystemData systemData; + @JsonProperty(value = "isHostnameAlreadyVerified", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isHostnameAlreadyVerified; - /** - * Get the innerProperties property: CustomHostnameAnalysisResult resource specific properties. - * - * @return the innerProperties value. + /* + * DNS verification test result. */ - private CustomHostnameAnalysisResultProperties innerProperties() { - return this.innerProperties; - } + @JsonProperty(value = "customDomainVerificationTest", access = JsonProperty.Access.WRITE_ONLY) + private DnsVerificationTestResult customDomainVerificationTest; - /** - * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. - * - * @return the systemData value. + /* + * Raw failure information if DNS verification fails. */ - public SystemData systemData() { - return this.systemData; - } + @JsonProperty(value = "customDomainVerificationFailureInfo", access = JsonProperty.Access.WRITE_ONLY) + private CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo; + + /* + * true if there is a conflict on the Container App's managed environment; otherwise, + * false. + */ + @JsonProperty(value = "hasConflictOnManagedEnvironment", access = JsonProperty.Access.WRITE_ONLY) + private Boolean hasConflictOnManagedEnvironment; + + /* + * Name of the conflicting Container App on the Managed Environment if it's within the same subscription. + */ + @JsonProperty(value = "conflictingContainerAppResourceId", access = JsonProperty.Access.WRITE_ONLY) + private String conflictingContainerAppResourceId; + + /* + * CName records visible for this hostname. + */ + @JsonProperty(value = "cNameRecords") + private List cNameRecords; + + /* + * TXT records visible for this hostname. + */ + @JsonProperty(value = "txtRecords") + private List txtRecords; + + /* + * A records visible for this hostname. + */ + @JsonProperty(value = "aRecords") + private List aRecords; + + /* + * Alternate CName records visible for this hostname. + */ + @JsonProperty(value = "alternateCNameRecords") + private List alternateCNameRecords; + + /* + * Alternate TXT records visible for this hostname. + */ + @JsonProperty(value = "alternateTxtRecords") + private List alternateTxtRecords; /** * Get the hostname property: Host name that was analyzed. @@ -52,7 +86,7 @@ public SystemData systemData() { * @return the hostname value. */ public String hostname() { - return this.innerProperties() == null ? null : this.innerProperties().hostname(); + return this.hostname; } /** @@ -62,7 +96,7 @@ public String hostname() { * @return the isHostnameAlreadyVerified value. */ public Boolean isHostnameAlreadyVerified() { - return this.innerProperties() == null ? null : this.innerProperties().isHostnameAlreadyVerified(); + return this.isHostnameAlreadyVerified; } /** @@ -71,7 +105,7 @@ public Boolean isHostnameAlreadyVerified() { * @return the customDomainVerificationTest value. */ public DnsVerificationTestResult customDomainVerificationTest() { - return this.innerProperties() == null ? null : this.innerProperties().customDomainVerificationTest(); + return this.customDomainVerificationTest; } /** @@ -79,8 +113,8 @@ public DnsVerificationTestResult customDomainVerificationTest() { * * @return the customDomainVerificationFailureInfo value. */ - public DefaultErrorResponseError customDomainVerificationFailureInfo() { - return this.innerProperties() == null ? null : this.innerProperties().customDomainVerificationFailureInfo(); + public CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo() { + return this.customDomainVerificationFailureInfo; } /** @@ -90,7 +124,7 @@ public DefaultErrorResponseError customDomainVerificationFailureInfo() { * @return the hasConflictOnManagedEnvironment value. */ public Boolean hasConflictOnManagedEnvironment() { - return this.innerProperties() == null ? null : this.innerProperties().hasConflictOnManagedEnvironment(); + return this.hasConflictOnManagedEnvironment; } /** @@ -100,7 +134,7 @@ public Boolean hasConflictOnManagedEnvironment() { * @return the conflictingContainerAppResourceId value. */ public String conflictingContainerAppResourceId() { - return this.innerProperties() == null ? null : this.innerProperties().conflictingContainerAppResourceId(); + return this.conflictingContainerAppResourceId; } /** @@ -109,7 +143,7 @@ public String conflictingContainerAppResourceId() { * @return the cNameRecords value. */ public List cNameRecords() { - return this.innerProperties() == null ? null : this.innerProperties().cNameRecords(); + return this.cNameRecords; } /** @@ -119,10 +153,7 @@ public List cNameRecords() { * @return the CustomHostnameAnalysisResultInner object itself. */ public CustomHostnameAnalysisResultInner withCNameRecords(List cNameRecords) { - if (this.innerProperties() == null) { - this.innerProperties = new CustomHostnameAnalysisResultProperties(); - } - this.innerProperties().withCNameRecords(cNameRecords); + this.cNameRecords = cNameRecords; return this; } @@ -132,7 +163,7 @@ public CustomHostnameAnalysisResultInner withCNameRecords(List cNameReco * @return the txtRecords value. */ public List txtRecords() { - return this.innerProperties() == null ? null : this.innerProperties().txtRecords(); + return this.txtRecords; } /** @@ -142,10 +173,7 @@ public List txtRecords() { * @return the CustomHostnameAnalysisResultInner object itself. */ public CustomHostnameAnalysisResultInner withTxtRecords(List txtRecords) { - if (this.innerProperties() == null) { - this.innerProperties = new CustomHostnameAnalysisResultProperties(); - } - this.innerProperties().withTxtRecords(txtRecords); + this.txtRecords = txtRecords; return this; } @@ -155,7 +183,7 @@ public CustomHostnameAnalysisResultInner withTxtRecords(List txtRecords) * @return the aRecords value. */ public List aRecords() { - return this.innerProperties() == null ? null : this.innerProperties().aRecords(); + return this.aRecords; } /** @@ -165,10 +193,7 @@ public List aRecords() { * @return the CustomHostnameAnalysisResultInner object itself. */ public CustomHostnameAnalysisResultInner withARecords(List aRecords) { - if (this.innerProperties() == null) { - this.innerProperties = new CustomHostnameAnalysisResultProperties(); - } - this.innerProperties().withARecords(aRecords); + this.aRecords = aRecords; return this; } @@ -178,7 +203,7 @@ public CustomHostnameAnalysisResultInner withARecords(List aRecords) { * @return the alternateCNameRecords value. */ public List alternateCNameRecords() { - return this.innerProperties() == null ? null : this.innerProperties().alternateCNameRecords(); + return this.alternateCNameRecords; } /** @@ -188,10 +213,7 @@ public List alternateCNameRecords() { * @return the CustomHostnameAnalysisResultInner object itself. */ public CustomHostnameAnalysisResultInner withAlternateCNameRecords(List alternateCNameRecords) { - if (this.innerProperties() == null) { - this.innerProperties = new CustomHostnameAnalysisResultProperties(); - } - this.innerProperties().withAlternateCNameRecords(alternateCNameRecords); + this.alternateCNameRecords = alternateCNameRecords; return this; } @@ -201,7 +223,7 @@ public CustomHostnameAnalysisResultInner withAlternateCNameRecords(List * @return the alternateTxtRecords value. */ public List alternateTxtRecords() { - return this.innerProperties() == null ? null : this.innerProperties().alternateTxtRecords(); + return this.alternateTxtRecords; } /** @@ -211,10 +233,7 @@ public List alternateTxtRecords() { * @return the CustomHostnameAnalysisResultInner object itself. */ public CustomHostnameAnalysisResultInner withAlternateTxtRecords(List alternateTxtRecords) { - if (this.innerProperties() == null) { - this.innerProperties = new CustomHostnameAnalysisResultProperties(); - } - this.innerProperties().withAlternateTxtRecords(alternateTxtRecords); + this.alternateTxtRecords = alternateTxtRecords; return this; } @@ -224,8 +243,8 @@ public CustomHostnameAnalysisResultInner withAlternateTxtRecords(List al * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { - if (innerProperties() != null) { - innerProperties().validate(); + if (customDomainVerificationFailureInfo() != null) { + customDomainVerificationFailureInfo().validate(); } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultProperties.java deleted file mode 100644 index c567bf14bcfd..000000000000 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CustomHostnameAnalysisResultProperties.java +++ /dev/null @@ -1,252 +0,0 @@ -// Copyright (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.DefaultErrorResponseError; -import com.azure.resourcemanager.appcontainers.models.DnsVerificationTestResult; -import com.fasterxml.jackson.annotation.JsonProperty; -import java.util.List; - -/** CustomHostnameAnalysisResult resource specific properties. */ -@Fluent -public final class CustomHostnameAnalysisResultProperties { - /* - * Host name that was analyzed - */ - @JsonProperty(value = "hostName", access = JsonProperty.Access.WRITE_ONLY) - private String hostname; - - /* - * true if hostname is already verified; otherwise, - * false. - */ - @JsonProperty(value = "isHostnameAlreadyVerified", access = JsonProperty.Access.WRITE_ONLY) - private Boolean isHostnameAlreadyVerified; - - /* - * DNS verification test result. - */ - @JsonProperty(value = "customDomainVerificationTest", access = JsonProperty.Access.WRITE_ONLY) - private DnsVerificationTestResult customDomainVerificationTest; - - /* - * Raw failure information if DNS verification fails. - */ - @JsonProperty(value = "customDomainVerificationFailureInfo", access = JsonProperty.Access.WRITE_ONLY) - private DefaultErrorResponseError customDomainVerificationFailureInfo; - - /* - * true if there is a conflict on the Container App's managed - * environment; otherwise, false. - */ - @JsonProperty(value = "hasConflictOnManagedEnvironment", access = JsonProperty.Access.WRITE_ONLY) - private Boolean hasConflictOnManagedEnvironment; - - /* - * Name of the conflicting Container App on the Managed Environment if it's - * within the same subscription. - */ - @JsonProperty(value = "conflictingContainerAppResourceId", access = JsonProperty.Access.WRITE_ONLY) - private String conflictingContainerAppResourceId; - - /* - * CName records visible for this hostname. - */ - @JsonProperty(value = "cNameRecords") - private List cNameRecords; - - /* - * TXT records visible for this hostname. - */ - @JsonProperty(value = "txtRecords") - private List txtRecords; - - /* - * A records visible for this hostname. - */ - @JsonProperty(value = "aRecords") - private List aRecords; - - /* - * Alternate CName records visible for this hostname. - */ - @JsonProperty(value = "alternateCNameRecords") - private List alternateCNameRecords; - - /* - * Alternate TXT records visible for this hostname. - */ - @JsonProperty(value = "alternateTxtRecords") - private List alternateTxtRecords; - - /** - * Get the hostname property: Host name that was analyzed. - * - * @return the hostname value. - */ - public String hostname() { - return this.hostname; - } - - /** - * Get the isHostnameAlreadyVerified property: <code>true</code> if hostname is already verified; - * otherwise, <code>false</code>. - * - * @return the isHostnameAlreadyVerified value. - */ - public Boolean isHostnameAlreadyVerified() { - return this.isHostnameAlreadyVerified; - } - - /** - * Get the customDomainVerificationTest property: DNS verification test result. - * - * @return the customDomainVerificationTest value. - */ - public DnsVerificationTestResult customDomainVerificationTest() { - return this.customDomainVerificationTest; - } - - /** - * Get the customDomainVerificationFailureInfo property: Raw failure information if DNS verification fails. - * - * @return the customDomainVerificationFailureInfo value. - */ - public DefaultErrorResponseError customDomainVerificationFailureInfo() { - return this.customDomainVerificationFailureInfo; - } - - /** - * 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() { - return this.hasConflictOnManagedEnvironment; - } - - /** - * 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() { - return this.conflictingContainerAppResourceId; - } - - /** - * Get the cNameRecords property: CName records visible for this hostname. - * - * @return the cNameRecords value. - */ - public List cNameRecords() { - return this.cNameRecords; - } - - /** - * Set the cNameRecords property: CName records visible for this hostname. - * - * @param cNameRecords the cNameRecords value to set. - * @return the CustomHostnameAnalysisResultProperties object itself. - */ - public CustomHostnameAnalysisResultProperties withCNameRecords(List cNameRecords) { - this.cNameRecords = cNameRecords; - return this; - } - - /** - * Get the txtRecords property: TXT records visible for this hostname. - * - * @return the txtRecords value. - */ - public List txtRecords() { - return this.txtRecords; - } - - /** - * Set the txtRecords property: TXT records visible for this hostname. - * - * @param txtRecords the txtRecords value to set. - * @return the CustomHostnameAnalysisResultProperties object itself. - */ - public CustomHostnameAnalysisResultProperties withTxtRecords(List txtRecords) { - this.txtRecords = txtRecords; - return this; - } - - /** - * Get the aRecords property: A records visible for this hostname. - * - * @return the aRecords value. - */ - public List aRecords() { - return this.aRecords; - } - - /** - * Set the aRecords property: A records visible for this hostname. - * - * @param aRecords the aRecords value to set. - * @return the CustomHostnameAnalysisResultProperties object itself. - */ - public CustomHostnameAnalysisResultProperties withARecords(List aRecords) { - this.aRecords = aRecords; - return this; - } - - /** - * Get the alternateCNameRecords property: Alternate CName records visible for this hostname. - * - * @return the alternateCNameRecords value. - */ - public List alternateCNameRecords() { - return this.alternateCNameRecords; - } - - /** - * Set the alternateCNameRecords property: Alternate CName records visible for this hostname. - * - * @param alternateCNameRecords the alternateCNameRecords value to set. - * @return the CustomHostnameAnalysisResultProperties object itself. - */ - public CustomHostnameAnalysisResultProperties withAlternateCNameRecords(List alternateCNameRecords) { - this.alternateCNameRecords = alternateCNameRecords; - return this; - } - - /** - * Get the alternateTxtRecords property: Alternate TXT records visible for this hostname. - * - * @return the alternateTxtRecords value. - */ - public List alternateTxtRecords() { - return this.alternateTxtRecords; - } - - /** - * Set the alternateTxtRecords property: Alternate TXT records visible for this hostname. - * - * @param alternateTxtRecords the alternateTxtRecords value to set. - * @return the CustomHostnameAnalysisResultProperties object itself. - */ - public CustomHostnameAnalysisResultProperties withAlternateTxtRecords(List alternateTxtRecords) { - this.alternateTxtRecords = alternateTxtRecords; - return this; - } - - /** - * Validates the instance. - * - * @throws IllegalArgumentException thrown if the instance is not valid. - */ - public void validate() { - if (customDomainVerificationFailureInfo() != null) { - customDomainVerificationFailureInfo().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 7d742a9d49b3..3bb7c38d9e6e 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 @@ -22,8 +22,7 @@ public final class DaprComponentInner extends ProxyResource { private DaprComponentProperties innerProperties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; 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 new file mode 100644 index 000000000000..d799fc3c0a3f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsCollectionInner.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Diagnostics data collection for a resource. */ +@Fluent +public final class DiagnosticsCollectionInner { + /* + * Collection of diagnostic data. + */ + @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; + + /** + * Get the value property: Collection of diagnostic data. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Collection of diagnostic data. + * + * @param value the value value to set. + * @return the DiagnosticsCollectionInner object itself. + */ + public DiagnosticsCollectionInner 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 DiagnosticsCollectionInner")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(DiagnosticsCollectionInner.class); +} 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 new file mode 100644 index 000000000000..fb76d8b7f135 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsInner.java @@ -0,0 +1,67 @@ +// Copyright (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.DiagnosticsProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Diagnostics data for a resource. */ +@Fluent +public final class DiagnosticsInner extends ProxyResource { + /* + * Diagnostics resource specific properties + */ + @JsonProperty(value = "properties") + private DiagnosticsProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** + * Get the properties property: Diagnostics resource specific properties. + * + * @return the properties value. + */ + public DiagnosticsProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Diagnostics resource specific properties. + * + * @param properties the properties value to set. + * @return the DiagnosticsInner object itself. + */ + public DiagnosticsInner withProperties(DiagnosticsProperties properties) { + this.properties = properties; + return this; + } + + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (properties() != null) { + properties().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentInner.java index 6eb3f4a165a4..e0c9b882b223 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 @@ -23,8 +23,7 @@ public final class ManagedEnvironmentInner extends Resource { private ManagedEnvironmentProperties innerProperties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; 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 3a58e75fc37d..3e681ebeb864 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 @@ -20,15 +20,13 @@ public final class ManagedEnvironmentProperties { private EnvironmentProvisioningState provisioningState; /* - * Azure Monitor instrumentation key used by Dapr to export Service to - * Service communication telemetry + * Azure Monitor instrumentation key used by Dapr to export Service to Service communication telemetry */ @JsonProperty(value = "daprAIInstrumentationKey") private String daprAIInstrumentationKey; /* - * Application Insights connection string used by Dapr to export Service to - * Service communication telemetry + * Application Insights connection string used by Dapr to export Service to Service communication telemetry */ @JsonProperty(value = "daprAIConnectionString") private String daprAIConnectionString; 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 887f1f9bd6aa..d022b2eaf5d6 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 @@ -20,8 +20,7 @@ public final class ManagedEnvironmentStorageInner extends ProxyResource { private ManagedEnvironmentStorageProperties properties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; 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 1fdacd15d9fe..ea79ba7d1781 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 @@ -22,8 +22,7 @@ public final class ReplicaInner extends ProxyResource { private ReplicaProperties innerProperties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; 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 10388304b930..4c5f930e7ec4 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 @@ -10,8 +10,10 @@ import com.azure.resourcemanager.appcontainers.models.RevisionHealthState; import com.azure.resourcemanager.appcontainers.models.RevisionProvisioningState; import com.azure.resourcemanager.appcontainers.models.Template; +import com.azure.resourcemanager.appcontainers.models.TrafficLabel; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; +import java.util.List; /** Container App Revision. */ @Fluent @@ -23,8 +25,7 @@ public final class RevisionInner extends ProxyResource { private RevisionProperties innerProperties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; @@ -102,6 +103,15 @@ public Integer trafficWeight() { return this.innerProperties() == null ? null : this.innerProperties().trafficWeight(); } + /** + * Get the trafficLabels property: Traffic labels associated with this revision. + * + * @return the trafficLabels value. + */ + public List trafficLabels() { + return this.innerProperties() == null ? null : this.innerProperties().trafficLabels(); + } + /** * Get the provisioningError property: Optional Field - Platform Error Message. * 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 bae22e238de8..8d75ec7ceb6f 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 @@ -8,8 +8,10 @@ import com.azure.resourcemanager.appcontainers.models.RevisionHealthState; import com.azure.resourcemanager.appcontainers.models.RevisionProvisioningState; import com.azure.resourcemanager.appcontainers.models.Template; +import com.azure.resourcemanager.appcontainers.models.TrafficLabel; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; +import java.util.List; /** Revision resource specific properties. */ @Immutable @@ -53,6 +55,12 @@ public final class RevisionProperties { @JsonProperty(value = "trafficWeight", access = JsonProperty.Access.WRITE_ONLY) private Integer trafficWeight; + /* + * Traffic labels associated with this revision + */ + @JsonProperty(value = "trafficLabels", access = JsonProperty.Access.WRITE_ONLY) + private List trafficLabels; + /* * Optional Field - Platform Error Message */ @@ -126,6 +134,15 @@ public Integer trafficWeight() { return this.trafficWeight; } + /** + * Get the trafficLabels property: Traffic labels associated with this revision. + * + * @return the trafficLabels value. + */ + public List trafficLabels() { + return this.trafficLabels; + } + /** * Get the provisioningError property: Optional Field - Platform Error Message. * @@ -162,5 +179,8 @@ public void validate() { if (template() != null) { template().validate(); } + if (trafficLabels() != null) { + trafficLabels().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 35e2285d769b..980c0cac9ee0 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 @@ -21,8 +21,7 @@ public final class SourceControlInner extends ProxyResource { private SourceControlProperties innerProperties; /* - * Azure Resource Manager metadata containing createdBy and modifiedBy - * information. + * Azure Resource Manager metadata containing createdBy and modifiedBy information. */ @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) private SystemData systemData; 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 419aa65a6c9f..eb07a721d909 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 @@ -866,7 +866,9 @@ public Response deleteWithResponse( } /** - * Patches a certificate. Currently only patching of tags is supported. + * Update properties of a certificate + * + *

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. @@ -933,7 +935,9 @@ private Mono> updateWithResponseAsync( } /** - * Patches a certificate. Currently only patching of tags is supported. + * Update properties of a certificate + * + *

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. @@ -999,7 +1003,9 @@ private Mono> updateWithResponseAsync( } /** - * Patches a certificate. Currently only patching of tags is supported. + * Update properties of a certificate + * + *

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. @@ -1022,7 +1028,9 @@ private Mono updateAsync( } /** - * Patches a certificate. Currently only patching of tags is supported. + * Update properties of a certificate + * + *

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. @@ -1043,7 +1051,9 @@ public CertificateInner update( } /** - * Patches a certificate. Currently only patching of tags is supported. + * Update properties of a certificate + * + *

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. 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 new file mode 100644 index 000000000000..775d10917d31 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentImpl.java @@ -0,0 +1,210 @@ +// Copyright (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.ConnectedEnvironmentInner; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironment; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentProvisioningState; +import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; +import java.util.Collections; +import java.util.Map; + +public final class ConnectedEnvironmentImpl + implements ConnectedEnvironment, ConnectedEnvironment.Definition, ConnectedEnvironment.Update { + private ConnectedEnvironmentInner 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 ExtendedLocation extendedLocation() { + return this.innerModel().extendedLocation(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public ConnectedEnvironmentProvisioningState provisioningState() { + return this.innerModel().provisioningState(); + } + + public String deploymentErrors() { + return this.innerModel().deploymentErrors(); + } + + public String defaultDomain() { + return this.innerModel().defaultDomain(); + } + + public String staticIp() { + return this.innerModel().staticIp(); + } + + public String daprAIConnectionString() { + return this.innerModel().daprAIConnectionString(); + } + + public Region region() { + return Region.fromName(this.regionName()); + } + + public String regionName() { + return this.location(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ConnectedEnvironmentInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String connectedEnvironmentName; + + public ConnectedEnvironmentImpl withExistingResourceGroup(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + public ConnectedEnvironment create() { + 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); + return this; + } + + ConnectedEnvironmentImpl( + String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = new ConnectedEnvironmentInner(); + this.serviceManager = serviceManager; + this.connectedEnvironmentName = name; + } + + public ConnectedEnvironmentImpl update() { + return this; + } + + public ConnectedEnvironment apply() { + 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); + return this; + } + + 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"); + } + + public ConnectedEnvironment refresh() { + 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(); + return this; + } + + public ConnectedEnvironmentImpl withRegion(Region location) { + this.innerModel().withLocation(location.toString()); + return this; + } + + public ConnectedEnvironmentImpl withRegion(String location) { + this.innerModel().withLocation(location); + return this; + } + + public ConnectedEnvironmentImpl withTags(Map tags) { + this.innerModel().withTags(tags); + return this; + } + + public ConnectedEnvironmentImpl withExtendedLocation(ExtendedLocation extendedLocation) { + this.innerModel().withExtendedLocation(extendedLocation); + return this; + } + + public ConnectedEnvironmentImpl withStaticIp(String staticIp) { + this.innerModel().withStaticIp(staticIp); + return this; + } + + public ConnectedEnvironmentImpl withDaprAIConnectionString(String daprAIConnectionString) { + this.innerModel().withDaprAIConnectionString(daprAIConnectionString); + return this; + } +} 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 new file mode 100644 index 000000000000..6b49e3cdead7 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStorageImpl.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.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; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorageProperties; + +public final class ConnectedEnvironmentStorageImpl + implements ConnectedEnvironmentStorage, ConnectedEnvironmentStorage.Definition, ConnectedEnvironmentStorage.Update { + private ConnectedEnvironmentStorageInner 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 ConnectedEnvironmentStorageProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public String resourceGroupName() { + return resourceGroupName; + } + + public ConnectedEnvironmentStorageInner innerModel() { + return this.innerObject; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + private String resourceGroupName; + + private String connectedEnvironmentName; + + private String storageName; + + 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(); + return this; + } + + public ConnectedEnvironmentStorage create(Context context) { + this.innerObject = + serviceManager + .serviceClient() + .getConnectedEnvironmentsStorages() + .createOrUpdateWithResponse( + resourceGroupName, connectedEnvironmentName, storageName, this.innerModel(), context) + .getValue(); + return this; + } + + ConnectedEnvironmentStorageImpl( + String name, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = new ConnectedEnvironmentStorageInner(); + this.serviceManager = serviceManager; + this.storageName = name; + } + + public ConnectedEnvironmentStorageImpl update() { + return this; + } + + public ConnectedEnvironmentStorage apply() { + 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(); + return this; + } + + 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"); + } + + public ConnectedEnvironmentStorage refresh() { + 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(); + return this; + } + + public ConnectedEnvironmentStorageImpl withProperties(ConnectedEnvironmentStorageProperties properties) { + this.innerModel().withProperties(properties); + 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 new file mode 100644 index 000000000000..e3f77be64af1 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentStoragesCollectionImpl.java @@ -0,0 +1,48 @@ +// Copyright (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.ConnectedEnvironmentStorageInner; +import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorage; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStoragesCollection; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class ConnectedEnvironmentStoragesCollectionImpl implements ConnectedEnvironmentStoragesCollection { + private ConnectedEnvironmentStoragesCollectionInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + ConnectedEnvironmentStoragesCollectionImpl( + ConnectedEnvironmentStoragesCollectionInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + 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())); + } else { + return Collections.emptyList(); + } + } + + public ConnectedEnvironmentStoragesCollectionInner 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/ConnectedEnvironmentsCertificatesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java new file mode 100644 index 000000000000..bbe0f161a02e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java @@ -0,0 +1,1175 @@ +// Copyright (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.ConnectedEnvironmentsCertificatesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; +import com.azure.resourcemanager.appcontainers.models.CertificateCollection; +import com.azure.resourcemanager.appcontainers.models.CertificatePatch; +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 ConnectedEnvironmentsCertificatesClient. + */ +public final class ConnectedEnvironmentsCertificatesClientImpl implements ConnectedEnvironmentsCertificatesClient { + /** The proxy service used to perform REST calls. */ + private final ConnectedEnvironmentsCertificatesService service; + + /** 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.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientConnectedEnvironmentsCertificates to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + private interface ConnectedEnvironmentsCertificatesService { + @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, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("connectedEnvironmentName") String connectedEnvironmentName, + @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}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + 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); + + @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, + @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, + Context context); + + @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, + @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); + + @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, + @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, + 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 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (connectedEnvironmentName == 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)) + .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (connectedEnvironmentName == 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)); + } + + /** + * 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 as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 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), + 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. + * @throws DefaultErrorResponseErrorException 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String connectedEnvironmentName) { + return new PagedIterable<>(listAsync(resourceGroupName, connectedEnvironmentName)); + } + + /** + * 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 DefaultErrorResponseErrorException 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Certificate along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (connectedEnvironmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + } + if (certificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateName 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, + 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. + * @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 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) { + 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 (connectedEnvironmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + } + if (certificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateName 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, + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Certificate on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Certificate. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CertificateInner get(String resourceGroupName, String connectedEnvironmentName, String certificateName) { + return getAsync(resourceGroupName, connectedEnvironmentName, certificateName).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. + * @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 specified Certificate along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context) { + return getWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName, 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. + * @param certificateEnvelope Certificate to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (connectedEnvironmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + } + if (certificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); + } + if (certificateEnvelope != null) { + certificateEnvelope.validate(); + } + 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)) + .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. + * @param certificateEnvelope Certificate to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (connectedEnvironmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + } + if (certificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); + } + if (certificateEnvelope != null) { + certificateEnvelope.validate(); + } + 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); + } + + /** + * 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. + * @param certificateEnvelope Certificate to be created or updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String connectedEnvironmentName, + String certificateName, + CertificateInner certificateEnvelope) { + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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())); + } + + /** + * 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 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CertificateInner createOrUpdate( + String resourceGroupName, String connectedEnvironmentName, String certificateName) { + final CertificateInner certificateEnvelope = null; + return createOrUpdateAsync(resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope) + .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. + * @param certificateEnvelope Certificate to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse( + String resourceGroupName, + String connectedEnvironmentName, + String certificateName, + CertificateInner certificateEnvelope, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 connectedEnvironmentName, String certificateName) { + 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 (connectedEnvironmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + } + if (certificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateName 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, + 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. + * @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 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.")); + } + 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 (connectedEnvironmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + } + if (certificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateName 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, + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 connectedEnvironmentName, String certificateName) { + return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * 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 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 connectedEnvironmentName, String certificateName) { + deleteAsync(resourceGroupName, connectedEnvironmentName, certificateName).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. + * @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 connectedEnvironmentName, String certificateName, Context context) { + return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, certificateName, context).block(); + } + + /** + * Update properties of a certificate + * + *

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 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (connectedEnvironmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + } + if (certificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); + } + if (certificateEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateEnvelope is required and cannot be null.")); + } else { + certificateEnvelope.validate(); + } + 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)) + .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. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @param certificateEnvelope Properties of a certificate that need to be updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (connectedEnvironmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + } + if (certificateName == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateName is required and cannot be null.")); + } + if (certificateEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter certificateEnvelope is required and cannot be null.")); + } else { + certificateEnvelope.validate(); + } + 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); + } + + /** + * Update properties of a certificate + * + *

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 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}. + */ + @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())); + } + + /** + * Update properties of a certificate + * + *

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 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public CertificateInner update( + String resourceGroupName, + String connectedEnvironmentName, + String certificateName, + CertificatePatch certificateEnvelope) { + return updateAsync(resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope).block(); + } + + /** + * Update properties of a certificate + * + *

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. + * @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 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(); + } + + /** + * Get the next page of items. + * + * @param nextLink 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 Certificates 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 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 Certificates 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/ConnectedEnvironmentsCertificatesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesImpl.java new file mode 100644 index 000000000000..520533110bfc --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesImpl.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.ConnectedEnvironmentsCertificatesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; +import com.azure.resourcemanager.appcontainers.models.Certificate; +import com.azure.resourcemanager.appcontainers.models.CertificatePatch; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsCertificates; + +public final class ConnectedEnvironmentsCertificatesImpl implements ConnectedEnvironmentsCertificates { + private static final ClientLogger LOGGER = new ClientLogger(ConnectedEnvironmentsCertificatesImpl.class); + + private final ConnectedEnvironmentsCertificatesClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public ConnectedEnvironmentsCertificatesImpl( + ConnectedEnvironmentsCertificatesClient 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 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())); + } + + public Certificate get(String resourceGroupName, String connectedEnvironmentName, String certificateName) { + CertificateInner inner = this.serviceClient().get(resourceGroupName, connectedEnvironmentName, certificateName); + if (inner != null) { + return new CertificateImpl(inner, this.manager()); + } else { + return null; + } + } + + 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(), + new CertificateImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Certificate createOrUpdate( + String resourceGroupName, String connectedEnvironmentName, String certificateName) { + CertificateInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, connectedEnvironmentName, certificateName); + if (inner != null) { + return new CertificateImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateWithResponse( + String resourceGroupName, + String connectedEnvironmentName, + String certificateName, + CertificateInner certificateEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateWithResponse( + resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CertificateImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String connectedEnvironmentName, String certificateName) { + this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, certificateName); + } + + public Response deleteWithResponse( + String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context) { + return this + .serviceClient() + .deleteWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, context); + } + + public Certificate update( + String resourceGroupName, + String connectedEnvironmentName, + String certificateName, + CertificatePatch certificateEnvelope) { + CertificateInner inner = + this + .serviceClient() + .update(resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope); + if (inner != null) { + return new CertificateImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response updateWithResponse( + String resourceGroupName, + String connectedEnvironmentName, + String certificateName, + CertificatePatch certificateEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .updateWithResponse( + resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CertificateImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private ConnectedEnvironmentsCertificatesClient 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/ConnectedEnvironmentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsClientImpl.java new file mode 100644 index 000000000000..3f915061f1b5 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsClientImpl.java @@ -0,0 +1,1697 @@ +// Copyright (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.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.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.ConnectedEnvironmentsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; +import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner; +import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentCollection; +import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; +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 ConnectedEnvironmentsClient. */ +public final class ConnectedEnvironmentsClientImpl implements ConnectedEnvironmentsClient { + /** The proxy service used to perform REST calls. */ + private final ConnectedEnvironmentsService service; + + /** 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.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientConnectedEnvironments to be used by the proxy + * service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + private interface ConnectedEnvironmentsService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/connectedEnvironments") + @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" + + "/connectedEnvironments") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + 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" + + "/connectedEnvironments/{connectedEnvironmentName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + 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); + + @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, + @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); + + @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, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("connectedEnvironmentName") String connectedEnvironmentName, + @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}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + 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); + + @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, + @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); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.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(DefaultErrorResponseErrorException.class) + Mono> listByResourceGroupNext( + @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}. + */ + @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.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}. + */ + @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.getSubscriptionId(), + 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 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)); + } + + /** + * 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 as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(Context 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}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list() { + return new PagedIterable<>(listAsync()); + } + + /** + * 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(Context context) { + return new PagedIterable<>(listAsync(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}. + */ + @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.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}. + */ + @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.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. + * @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 PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listByResourceGroupAsync(String 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. + * @throws 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 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)); + } + + /** + * 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName)); + } + + /** + * 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listByResourceGroup(String resourceGroupName, Context context) { + return new PagedIterable<>(listByResourceGroupAsync(resourceGroupName, 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 DefaultErrorResponseErrorException 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (connectedEnvironmentName == 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)) + .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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (connectedEnvironmentName == 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); + } + + /** + * 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ConnectedEnvironmentInner getByResourceGroup(String resourceGroupName, String connectedEnvironmentName) { + return getByResourceGroupAsync(resourceGroupName, connectedEnvironmentName).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. + * @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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getByResourceGroupWithResponse( + String resourceGroupName, String connectedEnvironmentName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, connectedEnvironmentName, context).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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (connectedEnvironmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + } + if (environmentEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentEnvelope is required and cannot be null.")); + } else { + environmentEnvelope.validate(); + } + 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)) + .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. + * @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 an environment for Kubernetes cluster specialized for web workloads by Azure App Service along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (connectedEnvironmentName == null) { + return Mono + .error( + new IllegalArgumentException("Parameter connectedEnvironmentName is required and cannot be null.")); + } + if (environmentEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter environmentEnvelope is required and cannot be null.")); + } else { + environmentEnvelope.validate(); + } + 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); + } + + /** + * 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 DefaultErrorResponseErrorException thrown 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. + */ + @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()); + } + + /** + * 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 DefaultErrorResponseErrorException thrown 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. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + private PollerFlux, ConnectedEnvironmentInner> beginCreateOrUpdateAsync( + 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); + } + + /** + * 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 DefaultErrorResponseErrorException thrown 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. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ConnectedEnvironmentInner> beginCreateOrUpdate( + String resourceGroupName, String connectedEnvironmentName, ConnectedEnvironmentInner environmentEnvelope) { + return 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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link SyncPoller} for polling of an environment for Kubernetes cluster specialized for web workloads + * by Azure App Service. + */ + @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) + public SyncPoller, ConnectedEnvironmentInner> beginCreateOrUpdate( + String resourceGroupName, + String connectedEnvironmentName, + ConnectedEnvironmentInner environmentEnvelope, + Context context) { + return 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @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 an environment for Kubernetes cluster specialized for web workloads by Azure App Service on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono createOrUpdateAsync( + String resourceGroupName, + String connectedEnvironmentName, + ConnectedEnvironmentInner environmentEnvelope, + Context context) { + return beginCreateOrUpdateAsync(resourceGroupName, connectedEnvironmentName, environmentEnvelope, context) + .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @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 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) { + 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. + * @throws DefaultErrorResponseErrorException thrown 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 connectedEnvironmentName) { + 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 (connectedEnvironmentName == 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)) + .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 connectedEnvironmentName, 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 (connectedEnvironmentName == 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); + } + + /** + * 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 DefaultErrorResponseErrorException thrown 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 connectedEnvironmentName) { + Mono>> mono = deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName); + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 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); + } + + /** + * 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 DefaultErrorResponseErrorException thrown 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 connectedEnvironmentName) { + return beginDeleteAsync(resourceGroupName, connectedEnvironmentName).getSyncPoller(); + } + + /** + * 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 DefaultErrorResponseErrorException thrown 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 connectedEnvironmentName, Context context) { + return 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. + * @throws 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 connectedEnvironmentName) { + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 connectedEnvironmentName, Context context) { + 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. + * @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 connectedEnvironmentName) { + deleteAsync(resourceGroupName, connectedEnvironmentName).block(); + } + + /** + * 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 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 connectedEnvironmentName, Context context) { + deleteAsync(resourceGroupName, connectedEnvironmentName, context).block(); + } + + /** + * Update connected Environment's properties. + * + *

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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (connectedEnvironmentName == 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)) + .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. + * + * @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 an environment for Kubernetes cluster specialized for web workloads by Azure App Service along with + * {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (connectedEnvironmentName == 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); + } + + /** + * Update connected Environment's properties. + * + *

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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono updateAsync(String resourceGroupName, String connectedEnvironmentName) { + return updateWithResponseAsync(resourceGroupName, connectedEnvironmentName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Update connected Environment's properties. + * + *

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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ConnectedEnvironmentInner update(String resourceGroupName, String connectedEnvironmentName) { + return updateAsync(resourceGroupName, connectedEnvironmentName).block(); + } + + /** + * Update connected Environment's properties. + * + *

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 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response updateWithResponse( + String resourceGroupName, String connectedEnvironmentName, Context context) { + return updateWithResponseAsync(resourceGroupName, connectedEnvironmentName, context).block(); + } + + /** + * Checks the resource connectedEnvironmentName availability. + * + *

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 DefaultErrorResponseErrorException thrown if the request 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} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> checkNameAvailabilityWithResponseAsync( + 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.")); + } + 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 (connectedEnvironmentName == 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.")); + } 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)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Checks the resource connectedEnvironmentName availability. + * + *

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 DefaultErrorResponseErrorException thrown if the request 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} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> checkNameAvailabilityWithResponseAsync( + 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.")); + } + 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 (connectedEnvironmentName == 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.")); + } 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); + } + + /** + * Checks the resource connectedEnvironmentName availability. + * + *

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 DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @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())); + } + + /** + * Checks the resource connectedEnvironmentName availability. + * + *

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 DefaultErrorResponseErrorException thrown if the request 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) + public CheckNameAvailabilityResponseInner checkNameAvailability( + String resourceGroupName, + String connectedEnvironmentName, + CheckNameAvailabilityRequest checkNameAvailabilityRequest) { + return checkNameAvailabilityAsync(resourceGroupName, connectedEnvironmentName, checkNameAvailabilityRequest) + .block(); + } + + /** + * Checks the resource connectedEnvironmentName availability. + * + *

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 DefaultErrorResponseErrorException thrown if the request 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) + public Response checkNameAvailabilityWithResponse( + String resourceGroupName, + String connectedEnvironmentName, + CheckNameAvailabilityRequest checkNameAvailabilityRequest, + Context context) { + return checkNameAvailabilityWithResponseAsync( + resourceGroupName, connectedEnvironmentName, checkNameAvailabilityRequest, context) + .block(); + } + + /** + * Get the next page of items. + * + * @param nextLink 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}. + */ + @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 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}. + */ + @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 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}. + */ + @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 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}. + */ + @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/ConnectedEnvironmentsDaprComponentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java new file mode 100644 index 000000000000..3353c97efd80 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java @@ -0,0 +1,1120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.BodyParam; +import com.azure.core.annotation.Delete; +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.Post; +import com.azure.core.annotation.Put; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.PagedFlux; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.PagedResponse; +import com.azure.core.http.rest.PagedResponseBase; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsDaprComponentsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; +import com.azure.resourcemanager.appcontainers.models.DaprComponentsCollection; +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 ConnectedEnvironmentsDaprComponentsClient. + */ +public final class ConnectedEnvironmentsDaprComponentsClientImpl implements ConnectedEnvironmentsDaprComponentsClient { + /** The proxy service used to perform REST calls. */ + private final ConnectedEnvironmentsDaprComponentsService service; + + /** 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.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientConnectedEnvironmentsDaprComponents to be used + * by the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + private interface ConnectedEnvironmentsDaprComponentsService { + @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, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("connectedEnvironmentName") String connectedEnvironmentName, + @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}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + 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); + + @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, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("connectedEnvironmentName") String connectedEnvironmentName, + @PathParam("componentName") String componentName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") DaprComponentInner daprComponentEnvelope, + @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}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + 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); + + @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, + @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); + + @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 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (connectedEnvironmentName == 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)) + .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (connectedEnvironmentName == 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)); + } + + /** + * 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 as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listAsync(String resourceGroupName, String 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 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), + 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. + * @throws DefaultErrorResponseErrorException 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable list(String resourceGroupName, String connectedEnvironmentName) { + return new PagedIterable<>(listAsync(resourceGroupName, connectedEnvironmentName)); + } + + /** + * 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 DefaultErrorResponseErrorException 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a dapr component along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (connectedEnvironmentName == 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 + .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. + * @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 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) { + 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 (connectedEnvironmentName == 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); + } + + /** + * 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 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DaprComponentInner get(String resourceGroupName, String connectedEnvironmentName, String componentName) { + return getAsync(resourceGroupName, connectedEnvironmentName, componentName).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. + * @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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { + return getWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName, context).block(); + } + + /** + * Creates or updates a Dapr Component. + * + *

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 DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr Component along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (connectedEnvironmentName == 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.")); + } + if (daprComponentEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter daprComponentEnvelope is required and cannot be null.")); + } else { + daprComponentEnvelope.validate(); + } + 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)) + .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. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @param daprComponentEnvelope Configuration details of the Dapr Component. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr Component along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (connectedEnvironmentName == 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.")); + } + if (daprComponentEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter daprComponentEnvelope is required and cannot be null.")); + } else { + daprComponentEnvelope.validate(); + } + 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); + } + + /** + * Creates or updates a Dapr Component. + * + *

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 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 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())); + } + + /** + * Creates or updates a Dapr Component. + * + *

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 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DaprComponentInner createOrUpdate( + String resourceGroupName, + String connectedEnvironmentName, + String componentName, + DaprComponentInner daprComponentEnvelope) { + return createOrUpdateAsync(resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope) + .block(); + } + + /** + * Creates or updates a Dapr Component. + * + *

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. + * @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 along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse( + String resourceGroupName, + String connectedEnvironmentName, + String componentName, + DaprComponentInner daprComponentEnvelope, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope, context) + .block(); + } + + /** + * Delete a Dapr Component. + * + *

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 DefaultErrorResponseErrorException thrown 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 connectedEnvironmentName, 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 (connectedEnvironmentName == 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 + .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. + * + * @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 DefaultErrorResponseErrorException thrown 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 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.")); + } + 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 (connectedEnvironmentName == 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); + } + + /** + * Delete a Dapr Component. + * + *

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 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 connectedEnvironmentName, String componentName) { + return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * Delete a Dapr Component. + * + *

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 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 connectedEnvironmentName, String componentName) { + deleteAsync(resourceGroupName, connectedEnvironmentName, componentName).block(); + } + + /** + * Delete a Dapr Component. + * + *

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 DefaultErrorResponseErrorException thrown 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 connectedEnvironmentName, String componentName, Context context) { + return deleteWithResponseAsync(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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 ARM resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (connectedEnvironmentName == 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)) + .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. + * @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 Secrets Collection ARM resource along with {@link Response} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (connectedEnvironmentName == 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); + } + + /** + * 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 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 ARM resource on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 ARM resource. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DaprSecretsCollectionInner listSecrets( + String resourceGroupName, String connectedEnvironmentName, String componentName) { + return listSecretsAsync(resourceGroupName, connectedEnvironmentName, componentName).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. + * @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 Secrets Collection ARM resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listSecretsWithResponse( + String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { + return listSecretsWithResponseAsync(resourceGroupName, connectedEnvironmentName, componentName, context) + .block(); + } + + /** + * Get the next page of items. + * + * @param nextLink 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 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 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 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/ConnectedEnvironmentsDaprComponentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.java new file mode 100644 index 000000000000..4d6724d330df --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsImpl.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.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.ConnectedEnvironmentsDaprComponentsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprSecretsCollectionInner; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsDaprComponents; +import com.azure.resourcemanager.appcontainers.models.DaprComponent; +import com.azure.resourcemanager.appcontainers.models.DaprSecretsCollection; + +public final class ConnectedEnvironmentsDaprComponentsImpl implements ConnectedEnvironmentsDaprComponents { + private static final ClientLogger LOGGER = new ClientLogger(ConnectedEnvironmentsDaprComponentsImpl.class); + + private final ConnectedEnvironmentsDaprComponentsClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + 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())); + } + + 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 DaprComponent get(String resourceGroupName, String connectedEnvironmentName, String componentName) { + DaprComponentInner inner = this.serviceClient().get(resourceGroupName, connectedEnvironmentName, componentName); + if (inner != null) { + return new DaprComponentImpl(inner, this.manager()); + } else { + return null; + } + } + + 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(), + new DaprComponentImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DaprComponent createOrUpdate( + String resourceGroupName, + String connectedEnvironmentName, + String componentName, + DaprComponentInner daprComponentEnvelope) { + DaprComponentInner inner = + this + .serviceClient() + .createOrUpdate(resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope); + if (inner != null) { + return new DaprComponentImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response createOrUpdateWithResponse( + String resourceGroupName, + String connectedEnvironmentName, + String componentName, + DaprComponentInner daprComponentEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateWithResponse( + resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DaprComponentImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String connectedEnvironmentName, String componentName) { + this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, componentName); + } + + public Response deleteWithResponse( + String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { + return this + .serviceClient() + .deleteWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); + } + + 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 { + return null; + } + } + + 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(), + new DaprSecretsCollectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private ConnectedEnvironmentsDaprComponentsClient 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/ConnectedEnvironmentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsImpl.java new file mode 100644 index 000000000000..38f1e4154514 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsImpl.java @@ -0,0 +1,249 @@ +// Copyright (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.ConnectedEnvironmentsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.CheckNameAvailabilityResponseInner; +import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner; +import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; +import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityResponse; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironment; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironments; + +public final class ConnectedEnvironmentsImpl implements ConnectedEnvironments { + private static final ClientLogger LOGGER = new ClientLogger(ConnectedEnvironmentsImpl.class); + + private final ConnectedEnvironmentsClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public ConnectedEnvironmentsImpl( + ConnectedEnvironmentsClient 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 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())); + } + + public PagedIterable listByResourceGroup(String resourceGroupName) { + PagedIterable inner = this.serviceClient().listByResourceGroup(resourceGroupName); + return Utils.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())); + } + + public ConnectedEnvironment getByResourceGroup(String resourceGroupName, String connectedEnvironmentName) { + ConnectedEnvironmentInner inner = + this.serviceClient().getByResourceGroup(resourceGroupName, connectedEnvironmentName); + if (inner != null) { + return new ConnectedEnvironmentImpl(inner, this.manager()); + } else { + return null; + } + } + + 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(), + new ConnectedEnvironmentImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void deleteByResourceGroup(String resourceGroupName, String connectedEnvironmentName) { + this.serviceClient().delete(resourceGroupName, connectedEnvironmentName); + } + + public void delete(String resourceGroupName, String connectedEnvironmentName, Context context) { + this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, context); + } + + public ConnectedEnvironment update(String resourceGroupName, String connectedEnvironmentName) { + ConnectedEnvironmentInner inner = this.serviceClient().update(resourceGroupName, connectedEnvironmentName); + if (inner != null) { + return new ConnectedEnvironmentImpl(inner, this.manager()); + } else { + return null; + } + } + + 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(), + new ConnectedEnvironmentImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + 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 { + return null; + } + } + + 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(), + new CheckNameAvailabilityResponseImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ConnectedEnvironment getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); + } + String connectedEnvironmentName = Utils.getValueFromIdByName(id, "connectedEnvironments"); + if (connectedEnvironmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", + id))); + } + return this + .getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, Context.NONE) + .getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); + } + String connectedEnvironmentName = Utils.getValueFromIdByName(id, "connectedEnvironments"); + if (connectedEnvironmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", + id))); + } + return this.getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); + } + String connectedEnvironmentName = Utils.getValueFromIdByName(id, "connectedEnvironments"); + if (connectedEnvironmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", + id))); + } + this.delete(resourceGroupName, connectedEnvironmentName, Context.NONE); + } + + public void deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourcegroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourcegroups'.", id))); + } + String connectedEnvironmentName = Utils.getValueFromIdByName(id, "connectedEnvironments"); + if (connectedEnvironmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", + id))); + } + this.delete(resourceGroupName, connectedEnvironmentName, context); + } + + private ConnectedEnvironmentsClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + public ConnectedEnvironmentImpl define(String name) { + return new ConnectedEnvironmentImpl(name, this.manager()); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java new file mode 100644 index 000000000000..0b5835e38676 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java @@ -0,0 +1,796 @@ +// Copyright (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.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsStoragesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner; +import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner; +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. */ +public final class ConnectedEnvironmentsStoragesClientImpl implements ConnectedEnvironmentsStoragesClient { + /** The proxy service used to perform REST calls. */ + private final ConnectedEnvironmentsStoragesService service; + + /** 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.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientConnectedEnvironmentsStorages to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + private interface ConnectedEnvironmentsStoragesService { + @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, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("connectedEnvironmentName") String connectedEnvironmentName, + @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}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + 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); + + @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, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @PathParam("connectedEnvironmentName") String connectedEnvironmentName, + @PathParam("storageName") String storageName, + @QueryParam("api-version") String apiVersion, + @BodyParam("application/json") ConnectedEnvironmentStorageInner storageEnvelope, + @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}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + 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); + } + + /** + * 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (connectedEnvironmentName == 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)) + .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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (connectedEnvironmentName == 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); + } + + /** + * 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ConnectedEnvironmentStoragesCollectionInner list(String resourceGroupName, String connectedEnvironmentName) { + return listAsync(resourceGroupName, connectedEnvironmentName).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. + * @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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listWithResponse( + String resourceGroupName, String connectedEnvironmentName, Context context) { + return listWithResponseAsync(resourceGroupName, connectedEnvironmentName, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 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) { + 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 (connectedEnvironmentName == 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)) + .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. + * @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 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) { + 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 (connectedEnvironmentName == 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); + } + + /** + * 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 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 for a connectedEnvironment on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 for a connectedEnvironment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ConnectedEnvironmentStorageInner get( + String resourceGroupName, String connectedEnvironmentName, String storageName) { + return getAsync(resourceGroupName, connectedEnvironmentName, storageName).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. + * @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 storage for a connectedEnvironment along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse( + String resourceGroupName, String connectedEnvironmentName, String storageName, Context context) { + return getWithResponseAsync(resourceGroupName, connectedEnvironmentName, storageName, 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. + * @param storageEnvelope Configuration details of storage. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (connectedEnvironmentName == 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.")); + } + if (storageEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter storageEnvelope is required and cannot be null.")); + } else { + storageEnvelope.validate(); + } + 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)) + .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. + * @param storageEnvelope Configuration details of storage. + * @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 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, + 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 (connectedEnvironmentName == 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.")); + } + if (storageEnvelope == null) { + return Mono + .error(new IllegalArgumentException("Parameter storageEnvelope is required and cannot be null.")); + } else { + storageEnvelope.validate(); + } + 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); + } + + /** + * 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 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 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())); + } + + /** + * 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 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ConnectedEnvironmentStorageInner createOrUpdate( + String resourceGroupName, + String connectedEnvironmentName, + String storageName, + ConnectedEnvironmentStorageInner storageEnvelope) { + return createOrUpdateAsync(resourceGroupName, connectedEnvironmentName, storageName, storageEnvelope).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. + * @param storageEnvelope Configuration details of storage. + * @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 storage resource for connectedEnvironment along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response createOrUpdateWithResponse( + String resourceGroupName, + String connectedEnvironmentName, + String storageName, + ConnectedEnvironmentStorageInner storageEnvelope, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, connectedEnvironmentName, storageName, storageEnvelope, 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown 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 connectedEnvironmentName, String storageName) { + 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 (connectedEnvironmentName == 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)) + .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. + * @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 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.")); + } + 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 (connectedEnvironmentName == 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); + } + + /** + * 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 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 connectedEnvironmentName, String storageName) { + return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, storageName) + .flatMap(ignored -> Mono.empty()); + } + + /** + * 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 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 connectedEnvironmentName, String storageName) { + deleteAsync(resourceGroupName, connectedEnvironmentName, storageName).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. + * @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 connectedEnvironmentName, String storageName, Context context) { + return deleteWithResponseAsync(resourceGroupName, connectedEnvironmentName, storageName, context).block(); + } +} 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 new file mode 100644 index 000000000000..765f6a7240f6 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesImpl.java @@ -0,0 +1,221 @@ +// Copyright (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.ConnectedEnvironmentsStoragesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner; +import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorage; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStoragesCollection; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentsStorages; + +public final class ConnectedEnvironmentsStoragesImpl implements ConnectedEnvironmentsStorages { + private static final ClientLogger LOGGER = new ClientLogger(ConnectedEnvironmentsStoragesImpl.class); + + private final ConnectedEnvironmentsStoragesClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public ConnectedEnvironmentsStoragesImpl( + ConnectedEnvironmentsStoragesClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public ConnectedEnvironmentStoragesCollection list(String resourceGroupName, String connectedEnvironmentName) { + ConnectedEnvironmentStoragesCollectionInner inner = + this.serviceClient().list(resourceGroupName, connectedEnvironmentName); + if (inner != null) { + return new ConnectedEnvironmentStoragesCollectionImpl(inner, this.manager()); + } else { + return null; + } + } + + 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(), + new ConnectedEnvironmentStoragesCollectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + 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 { + return null; + } + } + + 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(), + new ConnectedEnvironmentStorageImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public void delete(String resourceGroupName, String connectedEnvironmentName, String storageName) { + this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, storageName); + } + + public Response deleteWithResponse( + String resourceGroupName, String connectedEnvironmentName, String storageName, Context context) { + return this + .serviceClient() + .deleteWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context); + } + + public ConnectedEnvironmentStorage getById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String connectedEnvironmentName = Utils.getValueFromIdByName(id, "connectedEnvironments"); + if (connectedEnvironmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", + id))); + } + String storageName = Utils.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))); + } + return this.getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, Context.NONE).getValue(); + } + + public Response getByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String connectedEnvironmentName = Utils.getValueFromIdByName(id, "connectedEnvironments"); + if (connectedEnvironmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", + id))); + } + String storageName = Utils.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))); + } + return this.getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context); + } + + public void deleteById(String id) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String connectedEnvironmentName = Utils.getValueFromIdByName(id, "connectedEnvironments"); + if (connectedEnvironmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", + id))); + } + String storageName = Utils.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))); + } + this.deleteWithResponse(resourceGroupName, connectedEnvironmentName, storageName, Context.NONE); + } + + public Response deleteByIdWithResponse(String id, Context context) { + String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); + if (resourceGroupName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format("The resource ID '%s' is not valid. Missing path segment 'resourceGroups'.", id))); + } + String connectedEnvironmentName = Utils.getValueFromIdByName(id, "connectedEnvironments"); + if (connectedEnvironmentName == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + String + .format( + "The resource ID '%s' is not valid. Missing path segment 'connectedEnvironments'.", + id))); + } + String storageName = Utils.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))); + } + return this.deleteWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context); + } + + private ConnectedEnvironmentsStoragesClient serviceClient() { + return this.innerClient; + } + + private com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager() { + return this.serviceManager; + } + + public ConnectedEnvironmentStorageImpl define(String name) { + return new ConnectedEnvironmentStorageImpl(name, this.manager()); + } +} 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 3a5ee744f975..295a2e99e5c3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppImpl.java @@ -12,6 +12,7 @@ import com.azure.resourcemanager.appcontainers.models.ContainerApp; import com.azure.resourcemanager.appcontainers.models.ContainerAppProvisioningState; import com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResult; +import com.azure.resourcemanager.appcontainers.models.ExtendedLocation; import com.azure.resourcemanager.appcontainers.models.ManagedServiceIdentity; import com.azure.resourcemanager.appcontainers.models.SecretsCollection; import com.azure.resourcemanager.appcontainers.models.Template; @@ -49,6 +50,10 @@ public Map tags() { } } + public ExtendedLocation extendedLocation() { + return this.innerModel().extendedLocation(); + } + public ManagedServiceIdentity identity() { return this.innerModel().identity(); } @@ -61,6 +66,10 @@ public String managedEnvironmentId() { return this.innerModel().managedEnvironmentId(); } + public String environmentId() { + return this.innerModel().environmentId(); + } + public String latestRevisionName() { return this.innerModel().latestRevisionName(); } @@ -227,6 +236,11 @@ public ContainerAppImpl withTags(Map tags) { return this; } + public ContainerAppImpl withExtendedLocation(ExtendedLocation extendedLocation) { + this.innerModel().withExtendedLocation(extendedLocation); + return this; + } + public ContainerAppImpl withIdentity(ManagedServiceIdentity identity) { this.innerModel().withIdentity(identity); return this; @@ -237,6 +251,11 @@ public ContainerAppImpl withManagedEnvironmentId(String managedEnvironmentId) { return this; } + public ContainerAppImpl withEnvironmentId(String environmentId) { + this.innerModel().withEnvironmentId(environmentId); + return this; + } + public ContainerAppImpl withConfiguration(Configuration configuration) { this.innerModel().withConfiguration(configuration); return this; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientBuilder.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientBuilder.java index 7c198677b0fc..a05676414f52 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 @@ -119,24 +119,26 @@ public ContainerAppsApiClientBuilder serializerAdapter(SerializerAdapter seriali * @return an instance of ContainerAppsApiClientImpl. */ public ContainerAppsApiClientImpl buildClient() { - if (endpoint == null) { - this.endpoint = "https://management.azure.com"; - } - if (environment == null) { - this.environment = AzureEnvironment.AZURE; - } - if (pipeline == null) { - this.pipeline = new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(); - } - if (defaultPollInterval == null) { - this.defaultPollInterval = Duration.ofSeconds(30); - } - if (serializerAdapter == null) { - this.serializerAdapter = SerializerFactory.createDefaultManagementSerializerAdapter(); - } + 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( - pipeline, serializerAdapter, defaultPollInterval, environment, subscriptionId, endpoint); + localPipeline, + localSerializerAdapter, + localDefaultPollInterval, + localEnvironment, + 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 c55e77b650a3..dd90bb854675 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java @@ -23,14 +23,21 @@ import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; import com.azure.resourcemanager.appcontainers.fluent.CertificatesClient; +import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsCertificatesClient; +import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsClient; +import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsDaprComponentsClient; +import com.azure.resourcemanager.appcontainers.fluent.ConnectedEnvironmentsStoragesClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsApiClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsAuthConfigsClient; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsClient; +import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsDiagnosticsClient; 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.DaprComponentsClient; +import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentDiagnosticsClient; 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; @@ -178,6 +185,42 @@ public DaprComponentsClient getDaprComponents() { return this.daprComponents; } + /** 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. */ + 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. */ + 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. */ private final OperationsClient operations; @@ -250,6 +293,54 @@ public ContainerAppsSourceControlsClient getContainerAppsSourceControls() { return this.containerAppsSourceControls; } + /** The ConnectedEnvironmentsClient object to access its operations. */ + private final ConnectedEnvironmentsClient connectedEnvironments; + + /** + * Gets the ConnectedEnvironmentsClient object to access its operations. + * + * @return the ConnectedEnvironmentsClient object. + */ + public ConnectedEnvironmentsClient getConnectedEnvironments() { + return this.connectedEnvironments; + } + + /** The ConnectedEnvironmentsCertificatesClient object to access its operations. */ + private final ConnectedEnvironmentsCertificatesClient connectedEnvironmentsCertificates; + + /** + * Gets the ConnectedEnvironmentsCertificatesClient object to access its operations. + * + * @return the ConnectedEnvironmentsCertificatesClient object. + */ + public ConnectedEnvironmentsCertificatesClient getConnectedEnvironmentsCertificates() { + return this.connectedEnvironmentsCertificates; + } + + /** The ConnectedEnvironmentsDaprComponentsClient object to access its operations. */ + private final ConnectedEnvironmentsDaprComponentsClient connectedEnvironmentsDaprComponents; + + /** + * Gets the ConnectedEnvironmentsDaprComponentsClient object to access its operations. + * + * @return the ConnectedEnvironmentsDaprComponentsClient object. + */ + public ConnectedEnvironmentsDaprComponentsClient getConnectedEnvironmentsDaprComponents() { + return this.connectedEnvironmentsDaprComponents; + } + + /** The ConnectedEnvironmentsStoragesClient object to access its operations. */ + private final ConnectedEnvironmentsStoragesClient connectedEnvironmentsStorages; + + /** + * Gets the ConnectedEnvironmentsStoragesClient object to access its operations. + * + * @return the ConnectedEnvironmentsStoragesClient object. + */ + public ConnectedEnvironmentsStoragesClient getConnectedEnvironmentsStorages() { + return this.connectedEnvironmentsStorages; + } + /** * Initializes an instance of ContainerAppsApiClient client. * @@ -272,18 +363,25 @@ public ContainerAppsSourceControlsClient getContainerAppsSourceControls() { this.defaultPollInterval = defaultPollInterval; this.subscriptionId = subscriptionId; this.endpoint = endpoint; - this.apiVersion = "2022-03-01"; + this.apiVersion = "2022-06-01-preview"; this.containerAppsAuthConfigs = new ContainerAppsAuthConfigsClientImpl(this); this.containerApps = new ContainerAppsClientImpl(this); this.containerAppsRevisions = new ContainerAppsRevisionsClientImpl(this); this.containerAppsRevisionReplicas = new ContainerAppsRevisionReplicasClientImpl(this); this.daprComponents = new DaprComponentsClientImpl(this); + this.containerAppsDiagnostics = new ContainerAppsDiagnosticsClientImpl(this); + this.managedEnvironmentDiagnostics = new ManagedEnvironmentDiagnosticsClientImpl(this); + this.managedEnvironmentsDiagnostics = new ManagedEnvironmentsDiagnosticsClientImpl(this); this.operations = new OperationsClientImpl(this); this.managedEnvironments = new ManagedEnvironmentsClientImpl(this); this.certificates = new CertificatesClientImpl(this); this.namespaces = new NamespacesClientImpl(this); this.managedEnvironmentsStorages = new ManagedEnvironmentsStoragesClientImpl(this); this.containerAppsSourceControls = new ContainerAppsSourceControlsClientImpl(this); + this.connectedEnvironments = new ConnectedEnvironmentsClientImpl(this); + this.connectedEnvironmentsCertificates = new ConnectedEnvironmentsCertificatesClientImpl(this); + this.connectedEnvironmentsDaprComponents = new ConnectedEnvironmentsDaprComponentsClientImpl(this); + this.connectedEnvironmentsStorages = new ConnectedEnvironmentsStoragesClientImpl(this); } /** 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 e458a6c8c21f..9e531711ea78 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 @@ -1163,7 +1163,9 @@ public void delete(String resourceGroupName, String containerAppName, Context co } /** - * Patches a Container App using JSON Merge Patch. + * Update properties of a Container App + * + *

Patches a Container App using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. @@ -1220,7 +1222,9 @@ private Mono>> updateWithResponseAsync( } /** - * Patches a Container App using JSON Merge Patch. + * Update properties of a Container App + * + *

Patches a Container App using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. @@ -1275,7 +1279,9 @@ private Mono>> updateWithResponseAsync( } /** - * Patches a Container App using JSON Merge Patch. + * Update properties of a Container App + * + *

Patches a Container App using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. @@ -1297,7 +1303,9 @@ private PollerFlux, Void> beginUpdateAsync( } /** - * Patches a Container App using JSON Merge Patch. + * Update properties of a Container App + * + *

Patches a Container App using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. @@ -1320,7 +1328,9 @@ private PollerFlux, Void> beginUpdateAsync( } /** - * Patches a Container App using JSON Merge Patch. + * Update properties of a Container App + * + *

Patches a Container App using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. @@ -1337,7 +1347,9 @@ public SyncPoller, Void> beginUpdate( } /** - * Patches a Container App using JSON Merge Patch. + * Update properties of a Container App + * + *

Patches a Container App using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. @@ -1355,7 +1367,9 @@ public SyncPoller, Void> beginUpdate( } /** - * Patches a Container App using JSON Merge Patch. + * Update properties of a Container App + * + *

Patches a Container App using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. @@ -1374,7 +1388,9 @@ private Mono updateAsync( } /** - * Patches a Container App using JSON Merge Patch. + * Update properties of a Container App + * + *

Patches a Container App using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. @@ -1394,7 +1410,9 @@ private Mono updateAsync( } /** - * Patches a Container App using JSON Merge Patch. + * Update properties of a Container App + * + *

Patches a Container App using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. @@ -1409,7 +1427,9 @@ public void update(String resourceGroupName, String containerAppName, ContainerA } /** - * Patches a Container App using JSON Merge Patch. + * Update properties of a Container App + * + *

Patches a Container App using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. 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 new file mode 100644 index 000000000000..3d37a78866ab --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsClientImpl.java @@ -0,0 +1,1165 @@ +// Copyright (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.ContainerAppsDiagnosticsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; +import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; +import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; +import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; +import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; +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. */ +public final class ContainerAppsDiagnosticsClientImpl implements ContainerAppsDiagnosticsClient { + /** The proxy service used to perform REST calls. */ + private final ContainerAppsDiagnosticsService service; + + /** 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.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientContainerAppsDiagnostics to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + private interface ContainerAppsDiagnosticsService { + @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, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @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}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + 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); + + @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, + @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); + + @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, + @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); + + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" + + "/{containerAppName}/detectorProperties/rootApi/") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + 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); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listDetectorsNext( + @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(DefaultErrorResponseErrorException.class) + Mono> listRevisionsNext( + @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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .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. + * @throws DefaultErrorResponseErrorException 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 as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listDetectorsAsync(String resourceGroupName, String 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 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), + 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. + * @throws DefaultErrorResponseErrorException 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listDetectors(String resourceGroupName, String containerAppName) { + return new PagedIterable<>(listDetectorsAsync(resourceGroupName, containerAppName)); + } + + /** + * 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 DefaultErrorResponseErrorException 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (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, + 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. + * @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 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) { + 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 (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, + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiagnosticsInner getDetector(String resourceGroupName, String containerAppName, String detectorName) { + return getDetectorAsync(resourceGroupName, containerAppName, detectorName).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. + * @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 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) { + return getDetectorWithResponseAsync(resourceGroupName, containerAppName, detectorName, context).block(); + } + + /** + * 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .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. + * @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 Revisions for a given Container App along with {@link PagedResponse} on successful completion of + * {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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 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), + 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. + * @throws DefaultErrorResponseErrorException 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 as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listRevisionsAsync(String resourceGroupName, String containerAppName) { + final String filter = null; + 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. + * @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 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), + 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. + * @throws DefaultErrorResponseErrorException 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listRevisions(String resourceGroupName, String containerAppName) { + final String filter = null; + return new PagedIterable<>(listRevisionsAsync(resourceGroupName, containerAppName, filter)); + } + + /** + * 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 DefaultErrorResponseErrorException 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 as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 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) { + 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.")); + } + 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)) + .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. + * @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 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) { + 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.")); + } + 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); + } + + /** + * 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 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 revision of a Container App on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 revision of a Container App. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public RevisionInner getRevision(String resourceGroupName, String containerAppName, String revisionName) { + return getRevisionAsync(resourceGroupName, containerAppName, revisionName).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. + * @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 revision of a Container App along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getRevisionWithResponse( + String resourceGroupName, String containerAppName, String revisionName, Context context) { + return getRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, 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. + * @throws ManagementException 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 along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + final String accept = "application/json"; + return FluxUtil + .withContext( + context -> + service + .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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException 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 along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + if (this.client.getSubscriptionId() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getSubscriptionId() is required and cannot be null.")); + } + if (resourceGroupName == null) { + return Mono + .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + } + if (containerAppName == null) { + return Mono + .error(new IllegalArgumentException("Parameter containerAppName is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .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. + * @throws ManagementException 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 on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getRootAsync(String resourceGroupName, String containerAppName) { + return getRootWithResponseAsync(resourceGroupName, containerAppName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * 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 ManagementException 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerAppInner getRoot(String resourceGroupName, String containerAppName) { + return getRootAsync(resourceGroupName, containerAppName).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. + * @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 properties of a Container App along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getRootWithResponse( + String resourceGroupName, String containerAppName, Context context) { + return getRootWithResponseAsync(resourceGroupName, containerAppName, context).block(); + } + + /** + * Get the next page of items. + * + * @param nextLink 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDetectorsNextSinglePageAsync(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.listDetectorsNext(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 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listDetectorsNextSinglePageAsync(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 + .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 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRevisionsNextSinglePageAsync(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.listRevisionsNext(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 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listRevisionsNextSinglePageAsync(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 + .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 new file mode 100644 index 000000000000..1c96b18f9597 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsImpl.java @@ -0,0 +1,138 @@ +// Copyright (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.ContainerAppsDiagnosticsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; +import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; +import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; +import com.azure.resourcemanager.appcontainers.models.ContainerApp; +import com.azure.resourcemanager.appcontainers.models.ContainerAppsDiagnostics; +import com.azure.resourcemanager.appcontainers.models.Diagnostics; +import com.azure.resourcemanager.appcontainers.models.Revision; + +public final class ContainerAppsDiagnosticsImpl implements ContainerAppsDiagnostics { + private static final ClientLogger LOGGER = new ClientLogger(ContainerAppsDiagnosticsImpl.class); + + private final ContainerAppsDiagnosticsClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public ContainerAppsDiagnosticsImpl( + ContainerAppsDiagnosticsClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable listDetectors(String resourceGroupName, String containerAppName) { + PagedIterable inner = this.serviceClient().listDetectors(resourceGroupName, containerAppName); + 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 Utils.mapPage(inner, inner1 -> new DiagnosticsImpl(inner1, this.manager())); + } + + public Diagnostics getDetector(String resourceGroupName, String containerAppName, String detectorName) { + DiagnosticsInner inner = this.serviceClient().getDetector(resourceGroupName, containerAppName, detectorName); + if (inner != null) { + return new DiagnosticsImpl(inner, this.manager()); + } else { + return null; + } + } + + 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(), + new DiagnosticsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public PagedIterable listRevisions(String resourceGroupName, String containerAppName) { + PagedIterable inner = this.serviceClient().listRevisions(resourceGroupName, containerAppName); + 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 Utils.mapPage(inner, inner1 -> new RevisionImpl(inner1, this.manager())); + } + + public Revision getRevision(String resourceGroupName, String containerAppName, String revisionName) { + RevisionInner inner = this.serviceClient().getRevision(resourceGroupName, containerAppName, revisionName); + if (inner != null) { + return new RevisionImpl(inner, this.manager()); + } else { + return null; + } + } + + 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(), + new RevisionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ContainerApp getRoot(String resourceGroupName, String containerAppName) { + ContainerAppInner inner = this.serviceClient().getRoot(resourceGroupName, containerAppName); + if (inner != null) { + return new ContainerAppImpl(inner, this.manager()); + } else { + return null; + } + } + + 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(), + new ContainerAppImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private ContainerAppsDiagnosticsClient 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/CustomHostnameAnalysisResultImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CustomHostnameAnalysisResultImpl.java index fb9b87b4236c..f7ff9f2caa45 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 @@ -4,10 +4,9 @@ package com.azure.resourcemanager.appcontainers.implementation; -import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner; import com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResult; -import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseError; +import com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo; import com.azure.resourcemanager.appcontainers.models.DnsVerificationTestResult; import java.util.Collections; import java.util.List; @@ -24,22 +23,6 @@ public final class CustomHostnameAnalysisResultImpl implements CustomHostnameAna this.serviceManager = serviceManager; } - public String id() { - return this.innerModel().id(); - } - - public String name() { - return this.innerModel().name(); - } - - public String type() { - return this.innerModel().type(); - } - - public SystemData systemData() { - return this.innerModel().systemData(); - } - public String hostname() { return this.innerModel().hostname(); } @@ -52,7 +35,7 @@ public DnsVerificationTestResult customDomainVerificationTest() { return this.innerModel().customDomainVerificationTest(); } - public DefaultErrorResponseError customDomainVerificationFailureInfo() { + public CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo() { return this.innerModel().customDomainVerificationFailureInfo(); } 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 b1b7edd5495d..17a2bda6813e 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 @@ -492,7 +492,9 @@ public Response getWithResponse( } /** - * Creates or updates a Dapr Component in a Managed Environment. + * Creates or updates a Dapr Component. + * + *

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. @@ -557,7 +559,9 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Creates or updates a Dapr Component in a Managed Environment. + * Creates or updates a Dapr Component. + * + *

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. @@ -621,7 +625,9 @@ private Mono> createOrUpdateWithResponseAsync( } /** - * Creates or updates a Dapr Component in a Managed Environment. + * Creates or updates a Dapr Component. + * + *

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. @@ -643,7 +649,9 @@ private Mono createOrUpdateAsync( } /** - * Creates or updates a Dapr Component in a Managed Environment. + * Creates or updates a Dapr Component. + * + *

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. @@ -664,7 +672,9 @@ public DaprComponentInner createOrUpdate( } /** - * Creates or updates a Dapr Component in a Managed Environment. + * Creates or updates a Dapr Component. + * + *

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. @@ -689,7 +699,9 @@ public Response createOrUpdateWithResponse( } /** - * Delete a Dapr Component from a Managed Environment. + * Delete a Dapr Component. + * + *

Delete a Dapr Component from a Managed Environment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. @@ -743,7 +755,9 @@ private Mono> deleteWithResponseAsync( } /** - * Delete a Dapr Component from a Managed Environment. + * Delete a Dapr Component. + * + *

Delete a Dapr Component from a Managed Environment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. @@ -795,7 +809,9 @@ private Mono> deleteWithResponseAsync( } /** - * Delete a Dapr Component from a Managed Environment. + * Delete a Dapr Component. + * + *

Delete a Dapr Component from a Managed Environment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. @@ -812,7 +828,9 @@ private Mono deleteAsync(String resourceGroupName, String environmentName, } /** - * Delete a Dapr Component from a Managed Environment. + * Delete a Dapr Component. + * + *

Delete a Dapr Component from a Managed Environment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. @@ -827,7 +845,9 @@ public void delete(String resourceGroupName, String environmentName, String comp } /** - * Delete a Dapr Component from a Managed Environment. + * Delete a Dapr Component. + * + *

Delete a Dapr Component from a Managed Environment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. 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 new file mode 100644 index 000000000000..89edd269aaad --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsCollectionImpl.java @@ -0,0 +1,52 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; +import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; +import com.azure.resourcemanager.appcontainers.models.Diagnostics; +import com.azure.resourcemanager.appcontainers.models.DiagnosticsCollection; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; + +public final class DiagnosticsCollectionImpl implements DiagnosticsCollection { + private DiagnosticsCollectionInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + DiagnosticsCollectionImpl( + DiagnosticsCollectionInner innerObject, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + 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())); + } else { + return Collections.emptyList(); + } + } + + public String nextLink() { + return this.innerModel().nextLink(); + } + + public DiagnosticsCollectionInner 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/DiagnosticsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsImpl.java new file mode 100644 index 000000000000..593d62d7018a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DiagnosticsImpl.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; +import com.azure.resourcemanager.appcontainers.models.Diagnostics; +import com.azure.resourcemanager.appcontainers.models.DiagnosticsProperties; + +public final class DiagnosticsImpl implements Diagnostics { + private DiagnosticsInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + DiagnosticsImpl( + DiagnosticsInner innerObject, com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerObject = innerObject; + this.serviceManager = serviceManager; + } + + public String id() { + return this.innerModel().id(); + } + + public String name() { + return this.innerModel().name(); + } + + public String type() { + return this.innerModel().type(); + } + + public DiagnosticsProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public DiagnosticsInner 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/ManagedEnvironmentDiagnosticsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsClientImpl.java new file mode 100644 index 000000000000..db9686786759 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsClientImpl.java @@ -0,0 +1,419 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentDiagnosticsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; +import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; +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. */ +public final class ManagedEnvironmentDiagnosticsClientImpl implements ManagedEnvironmentDiagnosticsClient { + /** The proxy service used to perform REST calls. */ + private final ManagedEnvironmentDiagnosticsService service; + + /** 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.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientManagedEnvironmentDiagnostics to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + private interface ManagedEnvironmentDiagnosticsService { + @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, + @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}/detectors/{detectorName}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + 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); + } + + /** + * Get the list of diagnostics for a given Managed Environment. + * + *

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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 + .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. + * + * @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} + * on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 + .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. + * + * @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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono listDetectorsAsync(String resourceGroupName, String environmentName) { + return listDetectorsWithResponseAsync(resourceGroupName, environmentName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the list of diagnostics for a given Managed Environment. + * + *

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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiagnosticsCollectionInner listDetectors(String resourceGroupName, String environmentName) { + return listDetectorsAsync(resourceGroupName, environmentName).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. + * + * @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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listDetectorsWithResponse( + String resourceGroupName, String environmentName, Context context) { + return listDetectorsWithResponseAsync(resourceGroupName, environmentName, context).block(); + } + + /** + * Get the diagnostics data for a given Managed Environment. + * + *

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 DefaultErrorResponseErrorException 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (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, + 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. + * + * @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 DefaultErrorResponseErrorException 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 (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, + 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. + * + * @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 DefaultErrorResponseErrorException 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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. + * + * @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 DefaultErrorResponseErrorException 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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DiagnosticsInner getDetector(String resourceGroupName, String environmentName, String detectorName) { + return getDetectorAsync(resourceGroupName, environmentName, detectorName).block(); + } + + /** + * Get the diagnostics data for a given Managed Environment. + * + *

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 DefaultErrorResponseErrorException 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getDetectorWithResponse( + String resourceGroupName, String environmentName, String detectorName, Context context) { + return getDetectorWithResponseAsync(resourceGroupName, environmentName, detectorName, context).block(); + } +} 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 new file mode 100644 index 000000000000..6163126dbb74 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentDiagnosticsImpl.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.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.ManagedEnvironmentDiagnosticsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsCollectionInner; +import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; +import com.azure.resourcemanager.appcontainers.models.Diagnostics; +import com.azure.resourcemanager.appcontainers.models.DiagnosticsCollection; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentDiagnostics; + +public final class ManagedEnvironmentDiagnosticsImpl implements ManagedEnvironmentDiagnostics { + private static final ClientLogger LOGGER = new ClientLogger(ManagedEnvironmentDiagnosticsImpl.class); + + private final ManagedEnvironmentDiagnosticsClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public ManagedEnvironmentDiagnosticsImpl( + ManagedEnvironmentDiagnosticsClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public DiagnosticsCollection listDetectors(String resourceGroupName, String environmentName) { + DiagnosticsCollectionInner inner = this.serviceClient().listDetectors(resourceGroupName, environmentName); + if (inner != null) { + return new DiagnosticsCollectionImpl(inner, this.manager()); + } else { + return null; + } + } + + 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(), + new DiagnosticsCollectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Diagnostics getDetector(String resourceGroupName, String environmentName, String detectorName) { + DiagnosticsInner inner = this.serviceClient().getDetector(resourceGroupName, environmentName, detectorName); + if (inner != null) { + return new DiagnosticsImpl(inner, this.manager()); + } else { + return null; + } + } + + 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(), + new DiagnosticsImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private ManagedEnvironmentDiagnosticsClient 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 f49b7b00fa51..ff95ac1d90b7 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 @@ -174,7 +174,9 @@ Mono> listByResourceGroupNext( } /** - * Get all Managed Environments for a subscription. + * Get all 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. @@ -219,7 +221,9 @@ private Mono> listSinglePageAsync() { } /** - * Get all Managed Environments for a subscription. + * Get all 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. @@ -263,7 +267,9 @@ private Mono> listSinglePageAsync(Context } /** - * Get all Managed Environments for a subscription. + * Get all 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. @@ -276,7 +282,9 @@ private PagedFlux listAsync() { } /** - * Get all Managed Environments for a subscription. + * Get all 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. @@ -291,7 +299,9 @@ private PagedFlux listAsync(Context context) { } /** - * Get all Managed Environments for a subscription. + * Get all 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. @@ -303,7 +313,9 @@ public PagedIterable list() { } /** - * Get all Managed Environments for a subscription. + * Get all 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. @@ -317,7 +329,9 @@ public PagedIterable list(Context context) { } /** - * Get all the Managed Environments in a resource group. + * Get all the 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. @@ -369,7 +383,9 @@ private Mono> listByResourceGroupSinglePa } /** - * Get all the Managed Environments in a resource group. + * Get all the 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. @@ -420,7 +436,9 @@ private Mono> listByResourceGroupSinglePa } /** - * Get all the Managed Environments in a resource group. + * Get all the 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. @@ -436,7 +454,9 @@ private PagedFlux listByResourceGroupAsync(String resou } /** - * Get all the Managed Environments in a resource group. + * Get all the 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. @@ -453,7 +473,9 @@ private PagedFlux listByResourceGroupAsync(String resou } /** - * Get all the Managed Environments in a resource group. + * Get all the 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. @@ -467,7 +489,9 @@ public PagedIterable listByResourceGroup(String resourc } /** - * Get all the Managed Environments in a resource group. + * Get all the 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. @@ -482,7 +506,9 @@ public PagedIterable listByResourceGroup(String resourc } /** - * Get the properties of a Managed Environment used to host container apps. + * Get the properties of a Managed Environment. + * + *

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. @@ -532,7 +558,9 @@ private Mono> getByResourceGroupWithResponseAs } /** - * Get the properties of a Managed Environment used to host container apps. + * Get the properties of a Managed Environment. + * + *

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. @@ -580,7 +608,9 @@ private Mono> getByResourceGroupWithResponseAs } /** - * Get the properties of a Managed Environment used to host container apps. + * Get the properties of a Managed Environment. + * + *

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. @@ -597,7 +627,9 @@ private Mono getByResourceGroupAsync(String resourceGro } /** - * Get the properties of a Managed Environment used to host container apps. + * Get the properties of a Managed Environment. + * + *

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. @@ -612,7 +644,9 @@ public ManagedEnvironmentInner getByResourceGroup(String resourceGroupName, Stri } /** - * Get the properties of a Managed Environment used to host container apps. + * Get the properties of a Managed Environment. + * + *

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. @@ -629,7 +663,9 @@ public Response getByResourceGroupWithResponse( } /** - * Creates or updates a Managed Environment used to host container apps. + * Creates or updates a Managed Environment. + * + *

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. @@ -687,7 +723,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Creates or updates a Managed Environment used to host container apps. + * Creates or updates a Managed Environment. + * + *

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. @@ -746,7 +784,9 @@ private Mono>> createOrUpdateWithResponseAsync( } /** - * Creates or updates a Managed Environment used to host container apps. + * Creates or updates a Managed Environment. + * + *

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. @@ -772,7 +812,9 @@ private PollerFlux, ManagedEnvironmentInner> } /** - * Creates or updates a Managed Environment used to host container apps. + * Creates or updates a Managed Environment. + * + *

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. @@ -803,7 +845,9 @@ private PollerFlux, ManagedEnvironmentInner> } /** - * Creates or updates a Managed Environment used to host container apps. + * Creates or updates a Managed Environment. + * + *

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

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

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. @@ -861,7 +909,9 @@ private Mono createOrUpdateAsync( } /** - * Creates or updates a Managed Environment used to host container apps. + * Creates or updates a Managed Environment. + * + *

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. @@ -884,7 +934,9 @@ private Mono createOrUpdateAsync( } /** - * Creates or updates a Managed Environment used to host container apps. + * Creates or updates a Managed Environment. + * + *

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. @@ -901,7 +953,9 @@ public ManagedEnvironmentInner createOrUpdate( } /** - * Creates or updates a Managed Environment used to host container apps. + * Creates or updates a Managed Environment. + * + *

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. @@ -922,7 +976,9 @@ public ManagedEnvironmentInner createOrUpdate( } /** - * Delete a Managed Environment if it does not have any container apps. + * Delete a Managed Environment. + * + *

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. @@ -970,7 +1026,9 @@ private Mono>> deleteWithResponseAsync(String resource } /** - * Delete a Managed Environment if it does not have any container apps. + * Delete a Managed Environment. + * + *

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. @@ -1017,7 +1075,9 @@ private Mono>> deleteWithResponseAsync( } /** - * Delete a Managed Environment if it does not have any container apps. + * Delete a Managed Environment. + * + *

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. @@ -1036,7 +1096,9 @@ private PollerFlux, Void> beginDeleteAsync(String resourceGroup } /** - * Delete a Managed Environment if it does not have any container apps. + * Delete a Managed Environment. + * + *

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. @@ -1057,7 +1119,9 @@ private PollerFlux, Void> beginDeleteAsync( } /** - * Delete a Managed Environment if it does not have any container apps. + * Delete a Managed Environment. + * + *

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. @@ -1072,7 +1136,9 @@ public SyncPoller, Void> beginDelete(String resourceGroupName, } /** - * Delete a Managed Environment if it does not have any container apps. + * Delete a Managed Environment. + * + *

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. @@ -1089,7 +1155,9 @@ public SyncPoller, Void> beginDelete( } /** - * Delete a Managed Environment if it does not have any container apps. + * Delete a Managed Environment. + * + *

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. @@ -1106,7 +1174,9 @@ private Mono deleteAsync(String resourceGroupName, String environmentName) } /** - * Delete a Managed Environment if it does not have any container apps. + * Delete a Managed Environment. + * + *

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. @@ -1124,7 +1194,9 @@ private Mono deleteAsync(String resourceGroupName, String environmentName, } /** - * Delete a Managed Environment if it does not have any container apps. + * Delete a Managed Environment. + * + *

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. @@ -1138,7 +1210,9 @@ public void delete(String resourceGroupName, String environmentName) { } /** - * Delete a Managed Environment if it does not have any container apps. + * Delete a Managed Environment. + * + *

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. @@ -1153,7 +1227,9 @@ public void delete(String resourceGroupName, String environmentName, Context con } /** - * Patches a Managed Environment using JSON Merge Patch. + * Update Managed Environment's properties. + * + *

Patches a Managed Environment using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. @@ -1210,7 +1286,9 @@ private Mono>> updateWithResponseAsync( } /** - * Patches a Managed Environment using JSON Merge Patch. + * Update Managed Environment's properties. + * + *

Patches a Managed Environment using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. @@ -1268,7 +1346,9 @@ private Mono>> updateWithResponseAsync( } /** - * Patches a Managed Environment using JSON Merge Patch. + * Update Managed Environment's properties. + * + *

Patches a Managed Environment using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. @@ -1290,7 +1370,9 @@ private PollerFlux, Void> beginUpdateAsync( } /** - * Patches a Managed Environment using JSON Merge Patch. + * Update Managed Environment's properties. + * + *

Patches a Managed Environment using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. @@ -1316,7 +1398,9 @@ private PollerFlux, Void> beginUpdateAsync( } /** - * Patches a Managed Environment using JSON Merge Patch. + * Update Managed Environment's properties. + * + *

Patches a Managed Environment using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. @@ -1333,7 +1417,9 @@ public SyncPoller, Void> beginUpdate( } /** - * Patches a Managed Environment using JSON Merge Patch. + * Update Managed Environment's properties. + * + *

Patches a Managed Environment using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. @@ -1354,7 +1440,9 @@ public SyncPoller, Void> beginUpdate( } /** - * Patches a Managed Environment using JSON Merge Patch. + * Update Managed Environment's properties. + * + *

Patches a Managed Environment using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. @@ -1373,7 +1461,9 @@ private Mono updateAsync( } /** - * Patches a Managed Environment using JSON Merge Patch. + * Update Managed Environment's properties. + * + *

Patches a Managed Environment using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. @@ -1396,7 +1486,9 @@ private Mono updateAsync( } /** - * Patches a Managed Environment using JSON Merge Patch. + * Update Managed Environment's properties. + * + *

Patches a Managed Environment using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. @@ -1411,7 +1503,9 @@ public void update(String resourceGroupName, String environmentName, ManagedEnvi } /** - * Patches a Managed Environment using JSON Merge Patch. + * Update Managed Environment's properties. + * + *

Patches a Managed Environment using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. 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 new file mode 100644 index 000000000000..0b0945586a58 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsClientImpl.java @@ -0,0 +1,230 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.annotation.ExpectedResponses; +import com.azure.core.annotation.Get; +import com.azure.core.annotation.HeaderParam; +import com.azure.core.annotation.Headers; +import com.azure.core.annotation.Host; +import com.azure.core.annotation.HostParam; +import com.azure.core.annotation.PathParam; +import com.azure.core.annotation.QueryParam; +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceInterface; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.annotation.UnexpectedResponseExceptionType; +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.RestProxy; +import com.azure.core.util.Context; +import com.azure.core.util.FluxUtil; +import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsDiagnosticsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; +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. */ +public final class ManagedEnvironmentsDiagnosticsClientImpl implements ManagedEnvironmentsDiagnosticsClient { + /** The proxy service used to perform REST calls. */ + private final ManagedEnvironmentsDiagnosticsService service; + + /** 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.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientManagedEnvironmentsDiagnostics to be used by + * the proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + private interface ManagedEnvironmentsDiagnosticsService { + @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, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @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. + * + * @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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 + .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. + * + * @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 properties of a Managed Environment used to host container apps along with {@link Response} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + 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.")); + } + 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 + .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. + * + * @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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getRootAsync(String resourceGroupName, String environmentName) { + return getRootWithResponseAsync(resourceGroupName, environmentName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get the properties of a Managed Environment. + * + *

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. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ManagedEnvironmentInner getRoot(String resourceGroupName, String environmentName) { + return getRootAsync(resourceGroupName, environmentName).block(); + } + + /** + * Get the properties of a Managed Environment. + * + *

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 DefaultErrorResponseErrorException 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}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getRootWithResponse( + String resourceGroupName, String environmentName, Context context) { + return getRootWithResponseAsync(resourceGroupName, environmentName, context).block(); + } +} 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 new file mode 100644 index 000000000000..4decfe562f9d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsDiagnosticsImpl.java @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.http.rest.Response; +import com.azure.core.http.rest.SimpleResponse; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsDiagnosticsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironment; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentsDiagnostics; + +public final class ManagedEnvironmentsDiagnosticsImpl implements ManagedEnvironmentsDiagnostics { + private static final ClientLogger LOGGER = new ClientLogger(ManagedEnvironmentsDiagnosticsImpl.class); + + private final ManagedEnvironmentsDiagnosticsClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public ManagedEnvironmentsDiagnosticsImpl( + ManagedEnvironmentsDiagnosticsClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public ManagedEnvironment getRoot(String resourceGroupName, String environmentName) { + ManagedEnvironmentInner inner = this.serviceClient().getRoot(resourceGroupName, environmentName); + if (inner != null) { + return new ManagedEnvironmentImpl(inner, this.manager()); + } else { + return null; + } + } + + 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(), + new ManagedEnvironmentImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + private ManagedEnvironmentsDiagnosticsClient 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/NamespacesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesClientImpl.java index 8dc0a74267be..67573d1fd9ae 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 @@ -71,7 +71,9 @@ Mono> checkNameAvailability( } /** - * Checks if resource name is available. + * Checks the resource name availability. + * + *

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. @@ -130,7 +132,9 @@ private Mono> checkNameAvailability } /** - * Checks if resource name is available. + * Checks the resource name availability. + * + *

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. @@ -190,7 +194,9 @@ private Mono> checkNameAvailability } /** - * Checks if resource name is available. + * Checks the resource name availability. + * + *

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. @@ -208,7 +214,9 @@ private Mono checkNameAvailabilityAsync( } /** - * Checks if resource name is available. + * Checks the resource name availability. + * + *

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. @@ -225,7 +233,9 @@ public CheckNameAvailabilityResponseInner checkNameAvailability( } /** - * Checks if resource name is available. + * Checks the resource name availability. + * + *

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. 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 2154f786b1e1..f2a7f06ccd43 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 @@ -10,7 +10,10 @@ import com.azure.resourcemanager.appcontainers.models.RevisionHealthState; import com.azure.resourcemanager.appcontainers.models.RevisionProvisioningState; import com.azure.resourcemanager.appcontainers.models.Template; +import com.azure.resourcemanager.appcontainers.models.TrafficLabel; import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.List; public final class RevisionImpl implements Revision { private RevisionInner innerObject; @@ -63,6 +66,15 @@ public Integer trafficWeight() { return this.innerModel().trafficWeight(); } + public List trafficLabels() { + List inner = this.innerModel().trafficLabels(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public String provisioningError() { return this.innerModel().provisioningError(); } 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 887906a892ba..bcb6d46d4eec 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 @@ -12,8 +12,7 @@ @Fluent public final class AllowedAudiencesValidation { /* - * The configuration settings of the allowed list of audiences from which - * to validate the JWT token. + * The configuration settings of the allowed list of audiences from which to validate the JWT token. */ @JsonProperty(value = "allowedAudiences") private List allowedAudiences; 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 5a7a4eb8b291..7a4b7948ef9d 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 @@ -11,8 +11,8 @@ @Fluent public final class Apple { /* - * false if the Apple provider should not be enabled despite - * the set registration; otherwise, true. + * false if the Apple provider should not be enabled despite the set registration; otherwise, + * true. */ @JsonProperty(value = "enabled") private Boolean enabled; 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 0450f8bd4299..85400026423f 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 @@ -11,17 +11,16 @@ @Fluent public final class AuthPlatform { /* - * true if the Authentication / Authorization feature is - * enabled for the current app; otherwise, false. + * true if the Authentication / Authorization feature is enabled for the current app; otherwise, + * false. */ @JsonProperty(value = "enabled") private Boolean enabled; /* - * 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. + * 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. */ @JsonProperty(value = "runtimeVersion") private String runtimeVersion; 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 daef4f26cf8b..f46e632bdb1a 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 @@ -11,15 +11,14 @@ @Fluent public final class AzureActiveDirectory { /* - * false if the Azure Active Directory provider should not be - * enabled despite the set registration; otherwise, true. + * false if the Azure Active Directory provider should not be enabled despite the set registration; + * otherwise, true. */ @JsonProperty(value = "enabled") private Boolean enabled; /* - * The configuration settings of the Azure Active Directory app - * registration. + * The configuration settings of the Azure Active Directory app registration. */ @JsonProperty(value = "registration") private AzureActiveDirectoryRegistration registration; @@ -31,17 +30,14 @@ public final class AzureActiveDirectory { private AzureActiveDirectoryLogin login; /* - * The configuration settings of the Azure Active Directory token - * validation flow. + * The configuration settings of the Azure Active Directory token validation flow. */ @JsonProperty(value = "validation") private AzureActiveDirectoryValidation validation; /* - * 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 + * 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. */ @JsonProperty(value = "isAutoProvisioned") 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 c7622a3e8248..572ab78792ee 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 @@ -12,16 +12,15 @@ @Fluent public final class AzureActiveDirectoryLogin { /* - * Login parameters to send to the OpenID Connect authorization endpoint - * when + * Login parameters to send to the OpenID Connect authorization endpoint when * a user logs in. Each parameter must be in the form "key=value". */ @JsonProperty(value = "loginParameters") private List loginParameters; /* - * true if the www-authenticate provider should be omitted - * from the request; otherwise, false. + * true if the www-authenticate provider should be omitted from the request; otherwise, + * false. */ @JsonProperty(value = "disableWWWAuthenticate") private Boolean disableWwwAuthenticate; 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 e02a78b65fab..0a54c9b945a1 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 @@ -11,59 +11,50 @@ @Fluent public final class AzureActiveDirectoryRegistration { /* - * 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. + * 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 + * More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html */ @JsonProperty(value = "openIdIssuer") private String openIdIssuer; /* * 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 + * 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 + * More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html */ @JsonProperty(value = "clientId") private String clientId; /* - * The app setting name that contains the client secret of the relying - * party application. + * The app setting name that contains the client secret of the relying party application. */ @JsonProperty(value = "clientSecretSettingName") private String clientSecretSettingName; /* - * An alternative to the client secret, that is the thumbprint of a - * certificate used for signing purposes. This property acts as + * 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. */ @JsonProperty(value = "clientSecretCertificateThumbprint") private String clientSecretCertificateThumbprint; /* - * 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. + * 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. */ @JsonProperty(value = "clientSecretCertificateSubjectAlternativeName") private String clientSecretCertificateSubjectAlternativeName; /* - * 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. + * 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. */ @JsonProperty(value = "clientSecretCertificateIssuer") private String clientSecretCertificateIssuer; 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 40b4c3118561..553e0cb843d4 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 @@ -12,15 +12,13 @@ @Fluent public final class AzureActiveDirectoryValidation { /* - * 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. */ @JsonProperty(value = "jwtClaimChecks") private JwtClaimChecks jwtClaimChecks; /* - * The list of audiences that can make successful - * authentication/authorization requests. + * The list of audiences that can make successful authentication/authorization requests. */ @JsonProperty(value = "allowedAudiences") private List allowedAudiences; 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 0662fc06212a..81f758544374 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 @@ -11,8 +11,8 @@ @Fluent public final class AzureStaticWebApps { /* - * false if the Azure Static Web Apps provider should not be - * enabled despite the set registration; otherwise, true. + * false if the Azure Static Web Apps provider should not be enabled despite the set registration; + * otherwise, true. */ @JsonProperty(value = "enabled") private Boolean enabled; 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 40de74d38aa4..d6ebd44cf847 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 @@ -8,6 +8,7 @@ import com.azure.core.util.CoreUtils; import com.fasterxml.jackson.annotation.JsonProperty; import java.time.OffsetDateTime; +import java.util.List; /** Certificate resource specific properties. */ @Fluent @@ -30,6 +31,12 @@ public final class CertificateProperties { @JsonProperty(value = "subjectName", access = JsonProperty.Access.WRITE_ONLY) private String subjectName; + /* + * Subject alternative names the certificate applies to. + */ + @JsonProperty(value = "subjectAlternativeNames", access = JsonProperty.Access.WRITE_ONLY) + private List subjectAlternativeNames; + /* * PFX or PEM blob */ @@ -110,6 +117,15 @@ public String subjectName() { return this.subjectName; } + /** + * Get the subjectAlternativeNames property: Subject alternative names the certificate applies to. + * + * @return the subjectAlternativeNames value. + */ + public List subjectAlternativeNames() { + return this.subjectAlternativeNames; + } + /** * Get the value property: PFX or PEM blob. * 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 449e7d2d5653..341784e9e587 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 @@ -27,6 +27,9 @@ public enum ClientCredentialMethod { */ @JsonCreator public static ClientCredentialMethod fromString(String value) { + if (value == null) { + return null; + } ClientCredentialMethod[] items = ClientCredentialMethod.values(); for (ClientCredentialMethod item : items) { if (item.toString().equalsIgnoreCase(value)) { 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 e47ac5bce80d..0d1730a04f36 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 @@ -18,12 +18,9 @@ public final class Configuration { private List secrets; /* - * ActiveRevisionsMode controls how active revisions are handled for the - * Container app: - * Multiple: multiple revisions can be - * active.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. + * ActiveRevisionsMode controls how active revisions are handled for the Container app: + * Multiple: multiple revisions can be active.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. */ @JsonProperty(value = "activeRevisionsMode") private ActiveRevisionsMode activeRevisionsMode; @@ -35,8 +32,7 @@ public final class Configuration { private Ingress ingress; /* - * Collection of private container registry credentials for containers used - * by the Container app + * Collection of private container registry credentials for containers used by the Container app */ @JsonProperty(value = "registries") private List registries; 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 new file mode 100644 index 000000000000..78303ad48dd4 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironment.java @@ -0,0 +1,322 @@ +// Copyright (c) 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.ConnectedEnvironmentInner; +import java.util.Map; + +/** 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(); + + /** + * 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 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 ConnectedEnvironment definition stages. */ + interface DefinitionStages { + /** The first stage of the ConnectedEnvironment definition. */ + interface Blank extends WithLocation { + } + /** 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. + */ + 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 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. + */ + WithCreate withExistingResourceGroup(String resourceGroupName); + } + /** + * The stage of the ConnectedEnvironment 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.WithStaticIp, + DefinitionStages.WithDaprAIConnectionString { + /** + * 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. */ + 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. */ + 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. */ + 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. */ + 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. + * @return the next definition stage. + */ + WithCreate withDaprAIConnectionString(String daprAIConnectionString); + } + } + /** + * 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 { + /** + * 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. */ + interface UpdateStages { + /** 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. */ + 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. */ + 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. */ + 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. + * @return the next definition stage. + */ + Update withDaprAIConnectionString(String daprAIConnectionString); + } + } + /** + * 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. + */ + ConnectedEnvironment refresh(Context context); +} 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 new file mode 100644 index 000000000000..6fa1d7cb8e41 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentCollection.java @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of connectedEnvironments. */ +@Fluent +public final class ConnectedEnvironmentCollection { + /* + * Collection of resources. + */ + @JsonProperty(value = "value") + private List value; + + /* + * Link to next page of resources. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** + * 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 ConnectedEnvironmentCollection object itself. + */ + public ConnectedEnvironmentCollection 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) { + value().forEach(e -> e.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 new file mode 100644 index 000000000000..714bdb8ed09b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentProvisioningState.java @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Defines values for ConnectedEnvironmentProvisioningState. */ +public final class ConnectedEnvironmentProvisioningState + extends ExpandableStringEnum { + /** Static value Succeeded for ConnectedEnvironmentProvisioningState. */ + public static final ConnectedEnvironmentProvisioningState SUCCEEDED = fromString("Succeeded"); + + /** Static value Failed for ConnectedEnvironmentProvisioningState. */ + public static final ConnectedEnvironmentProvisioningState FAILED = fromString("Failed"); + + /** Static value Canceled for ConnectedEnvironmentProvisioningState. */ + public static final ConnectedEnvironmentProvisioningState CANCELED = fromString("Canceled"); + + /** 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 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 ScheduledForDelete for ConnectedEnvironmentProvisioningState. */ + public static final ConnectedEnvironmentProvisioningState SCHEDULED_FOR_DELETE = fromString("ScheduledForDelete"); + + /** + * Creates or finds a ConnectedEnvironmentProvisioningState from its string representation. + * + * @param name a name to look for. + * @return the corresponding ConnectedEnvironmentProvisioningState. + */ + @JsonCreator + public static ConnectedEnvironmentProvisioningState fromString(String name) { + return fromString(name, ConnectedEnvironmentProvisioningState.class); + } + + /** + * Gets known ConnectedEnvironmentProvisioningState values. + * + * @return known ConnectedEnvironmentProvisioningState values. + */ + public static Collection values() { + return values(ConnectedEnvironmentProvisioningState.class); + } +} 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 new file mode 100644 index 000000000000..0b383982af49 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorage.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.management.SystemData; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStorageInner; + +/** 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. */ + interface Definition + extends DefinitionStages.Blank, DefinitionStages.WithParentResource, DefinitionStages.WithCreate { + } + /** The ConnectedEnvironmentStorage definition stages. */ + interface DefinitionStages { + /** The first stage of the ConnectedEnvironmentStorage definition. */ + interface Blank extends WithParentResource { + } + /** 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. + */ + WithCreate withExistingConnectedEnvironment(String resourceGroupName, String connectedEnvironmentName); + } + /** + * The stage of the ConnectedEnvironmentStorage definition which contains all the minimum required properties + * for the resource to be created, but also allows for any other optional properties to be specified. + */ + interface WithCreate extends DefinitionStages.WithProperties { + /** + * Executes the create request. + * + * @return the created resource. + */ + 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. */ + interface WithProperties { + /** + * Specifies the properties property: Storage properties. + * + * @param properties Storage properties. + * @return the next definition stage. + */ + WithCreate withProperties(ConnectedEnvironmentStorageProperties properties); + } + } + /** + * Begins update for the ConnectedEnvironmentStorage resource. + * + * @return the stage of resource update. + */ + ConnectedEnvironmentStorage.Update 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. */ + interface UpdateStages { + /** 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. + */ + Update withProperties(ConnectedEnvironmentStorageProperties properties); + } + } + /** + * 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. + */ + ConnectedEnvironmentStorage refresh(Context context); +} 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 new file mode 100644 index 000000000000..5287664e0994 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProperties.java @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Storage properties. */ +@Fluent +public final class ConnectedEnvironmentStorageProperties { + /* + * Azure file properties + */ + @JsonProperty(value = "azureFile") + private AzureFileProperties azureFile; + + /** + * Get the azureFile property: Azure file properties. + * + * @return the azureFile value. + */ + public AzureFileProperties azureFile() { + return this.azureFile; + } + + /** + * Set the azureFile property: Azure file properties. + * + * @param azureFile the azureFile value to set. + * @return the ConnectedEnvironmentStorageProperties object itself. + */ + public ConnectedEnvironmentStorageProperties withAzureFile(AzureFileProperties azureFile) { + this.azureFile = azureFile; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (azureFile() != null) { + azureFile().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 new file mode 100644 index 000000000000..1177335e4438 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStoragesCollection.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentStoragesCollectionInner; +import java.util.List; + +/** An immutable client-side representation of ConnectedEnvironmentStoragesCollection. */ +public interface ConnectedEnvironmentStoragesCollection { + /** + * Gets the value property: Collection of storage resources. + * + * @return the value value. + */ + List value(); + + /** + * 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 new file mode 100644 index 000000000000..2dc9b8cd4801 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironments.java @@ -0,0 +1,241 @@ +// Copyright (c) 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 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. + * @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}. + */ + 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 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 all connectedEnvironments for a subscription as paginated response with {@link PagedIterable}. + */ + 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 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 all connectedEnvironments in a resource group as paginated response with {@link PagedIterable}. + */ + PagedIterable listByResourceGroup(String resourceGroupName); + + /** + * 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. + * @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}. + */ + PagedIterable listByResourceGroup(String resourceGroupName, 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of an connectedEnvironment. + */ + ConnectedEnvironment getByResourceGroup(String resourceGroupName, String connectedEnvironmentName); + + /** + * 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. + * @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); + + /** + * 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. + * @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. + * @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. + * + * @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. + * @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. + */ + ConnectedEnvironment update(String resourceGroupName, String connectedEnvironmentName); + + /** + * Update connected Environment's properties. + * + *

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. + * @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}. + */ + Response updateWithResponse( + String resourceGroupName, String connectedEnvironmentName, Context context); + + /** + * Checks the resource connectedEnvironmentName availability. + * + *

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. + * @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, + CheckNameAvailabilityRequest checkNameAvailabilityRequest); + + /** + * Checks the resource connectedEnvironmentName availability. + * + *

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. + * @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); + + /** + * 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the properties of an connectedEnvironment along with {@link Response}. + */ + ConnectedEnvironment getById(String id); + + /** + * 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. + * @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 getByIdWithResponse(String id, Context context); + + /** + * 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. + * @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. + * @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. + */ + ConnectedEnvironment.DefinitionStages.Blank define(String name); +} 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 new file mode 100644 index 000000000000..432a4d5eae11 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsCertificates.java @@ -0,0 +1,180 @@ +// Copyright (c) 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; +import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; + +/** 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. + * @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}. + */ + PagedIterable list(String resourceGroupName, String connectedEnvironmentName); + + /** + * 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. + * @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}. + */ + PagedIterable list(String resourceGroupName, String connectedEnvironmentName, 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the specified Certificate. + */ + Certificate get(String resourceGroupName, String connectedEnvironmentName, String certificateName); + + /** + * 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. + * @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); + + /** + * 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. + */ + Certificate createOrUpdate(String resourceGroupName, String connectedEnvironmentName, String certificateName); + + /** + * 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. + * @param certificateEnvelope Certificate to be created or updated. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link + * Response}. + */ + Response createOrUpdateWithResponse( + String resourceGroupName, + String connectedEnvironmentName, + String certificateName, + CertificateInner certificateEnvelope, + 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String connectedEnvironmentName, String certificateName); + + /** + * 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. + * @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); + + /** + * Update properties of a certificate + * + *

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. + * @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 connectedEnvironmentName, + String certificateName, + CertificatePatch certificateEnvelope); + + /** + * Update properties of a certificate + * + *

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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link + * Response}. + */ + Response updateWithResponse( + String resourceGroupName, + String connectedEnvironmentName, + String certificateName, + CertificatePatch certificateEnvelope, + Context context); +} 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 new file mode 100644 index 000000000000..7b353ecfc5c8 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsDaprComponents.java @@ -0,0 +1,177 @@ +// Copyright (c) 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; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; + +/** 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. + * @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}. + */ + PagedIterable list(String resourceGroupName, String connectedEnvironmentName); + + /** + * 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. + * @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}. + */ + PagedIterable list(String resourceGroupName, String connectedEnvironmentName, 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a dapr component. + */ + DaprComponent get(String resourceGroupName, String connectedEnvironmentName, String componentName); + + /** + * 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. + * @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); + + /** + * Creates or updates a Dapr Component. + * + *

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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr Component. + */ + DaprComponent createOrUpdate( + String resourceGroupName, + String connectedEnvironmentName, + String componentName, + DaprComponentInner daprComponentEnvelope); + + /** + * Creates or updates a Dapr Component. + * + *

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. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr Component along with {@link Response}. + */ + Response createOrUpdateWithResponse( + String resourceGroupName, + String connectedEnvironmentName, + String componentName, + DaprComponentInner daprComponentEnvelope, + Context context); + + /** + * Delete a Dapr Component. + * + *

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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String connectedEnvironmentName, String componentName); + + /** + * Delete a Dapr Component. + * + *

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. + * @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); + + /** + * 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr component Secrets Collection ARM resource. + */ + DaprSecretsCollection listSecrets(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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr component Secrets Collection ARM resource along with {@link Response}. + */ + Response listSecretsWithResponse( + String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); +} 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 new file mode 100644 index 000000000000..4198008dd868 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentsStorages.java @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** 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. + * @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 all storages for a connectedEnvironment. + */ + ConnectedEnvironmentStoragesCollection list(String resourceGroupName, String connectedEnvironmentName); + + /** + * 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. + * @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); + + /** + * 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return storage for a connectedEnvironment. + */ + ConnectedEnvironmentStorage get(String resourceGroupName, String connectedEnvironmentName, String storageName); + + /** + * 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. + * @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); + + /** + * 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void delete(String resourceGroupName, String connectedEnvironmentName, String storageName); + + /** + * 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. + * @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); + + /** + * 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return storage for a connectedEnvironment along with {@link Response}. + */ + ConnectedEnvironmentStorage getById(String id); + + /** + * 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return storage for a connectedEnvironment along with {@link Response}. + */ + Response getByIdWithResponse(String id, Context context); + + /** + * 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. + * @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. + * @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 ConnectedEnvironmentStorage resource. + * + * @param name resource name. + * @return the first stage of the new ConnectedEnvironmentStorage definition. + */ + ConnectedEnvironmentStorage.DefinitionStages.Blank define(String name); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java index 8793ada5e92c..514346c746f8 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 @@ -48,6 +48,13 @@ public interface ContainerApp { */ 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 for the Container App to interact with other Azure services * without maintaining any secrets or credentials in code. @@ -64,12 +71,19 @@ public interface ContainerApp { ContainerAppProvisioningState provisioningState(); /** - * Gets the managedEnvironmentId property: Resource ID of the Container App's environment. + * 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 latestRevisionName property: Name of the latest revision of the Container App. * @@ -186,8 +200,10 @@ interface WithResourceGroup { */ interface WithCreate extends DefinitionStages.WithTags, + DefinitionStages.WithExtendedLocation, DefinitionStages.WithIdentity, DefinitionStages.WithManagedEnvironmentId, + DefinitionStages.WithEnvironmentId, DefinitionStages.WithConfiguration, DefinitionStages.WithTemplate { /** @@ -215,6 +231,16 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** 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. */ interface WithIdentity { /** @@ -230,13 +256,23 @@ interface WithIdentity { /** The stage of the ContainerApp definition allowing to specify managedEnvironmentId. */ interface WithManagedEnvironmentId { /** - * Specifies the managedEnvironmentId property: Resource ID of the Container App's environment.. + * Specifies the managedEnvironmentId property: Deprecated. Resource ID of the Container App's environment.. * - * @param managedEnvironmentId 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. */ + 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 configuration. */ interface WithConfiguration { /** @@ -268,6 +304,7 @@ interface WithTemplate { /** The template for ContainerApp update. */ interface Update extends UpdateStages.WithTags, + UpdateStages.WithExtendedLocation, UpdateStages.WithIdentity, UpdateStages.WithConfiguration, UpdateStages.WithTemplate { @@ -298,6 +335,16 @@ interface WithTags { */ Update withTags(Map tags); } + /** 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. */ interface WithIdentity { /** 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 f4d33a73ee6f..c2608aa5af88 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 @@ -14,9 +14,8 @@ @Fluent public final class ContainerAppProbe { /* - * Minimum consecutive failures for the probe to be considered failed after - * having succeeded. Defaults to 3. Minimum value is 1. Maximum value is - * 10. + * Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. + * Minimum value is 1. Maximum value is 10. */ @JsonProperty(value = "failureThreshold") private Integer failureThreshold; @@ -28,53 +27,46 @@ public final class ContainerAppProbe { private ContainerAppProbeHttpGet httpGet; /* - * Number of seconds after the container has started before liveness probes - * are initiated. Minimum value is 1. Maximum value is 60. + * Number of seconds after the container has started before liveness probes are initiated. Minimum value is 1. + * Maximum value is 60. */ @JsonProperty(value = "initialDelaySeconds") private Integer initialDelaySeconds; /* - * How often (in seconds) to perform the probe. Default to 10 seconds. - * Minimum value is 1. Maximum value is 240. + * How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value is 240. */ @JsonProperty(value = "periodSeconds") private Integer periodSeconds; /* - * 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. + * 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. */ @JsonProperty(value = "successThreshold") private Integer successThreshold; /* - * TCPSocket specifies an action involving a TCP port. TCP hooks not yet - * supported. + * TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. */ @JsonProperty(value = "tcpSocket") private ContainerAppProbeTcpSocket tcpSocket; /* - * 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 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) + * 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 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) */ @JsonProperty(value = "terminationGracePeriodSeconds") private Long terminationGracePeriodSeconds; /* - * Number of seconds after which the probe times out. Defaults to 1 second. - * Minimum value is 1. Maximum value is 240. + * Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is + * 240. */ @JsonProperty(value = "timeoutSeconds") private Integer timeoutSeconds; 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 cfb6d80072bc..3ca38a6e764f 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 @@ -12,8 +12,7 @@ @Fluent public final class ContainerAppProbeHttpGet { /* - * Host name to connect to, defaults to the pod IP. You probably want to - * set "Host" in httpHeaders instead. + * Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead. */ @JsonProperty(value = "host") private String host; @@ -31,8 +30,8 @@ public final class ContainerAppProbeHttpGet { private String path; /* - * Name or number of the port to access on the container. Number must be in - * the range 1 to 65535. Name must be an IANA_SVC_NAME. + * Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an + * IANA_SVC_NAME. */ @JsonProperty(value = "port", required = true) private int port; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeTcpSocket.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeTcpSocket.java index 75c842fc4568..0757aa9e16c9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeTcpSocket.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeTcpSocket.java @@ -17,8 +17,8 @@ public final class ContainerAppProbeTcpSocket { private String host; /* - * Number or name of the port to access on the container. Number must be in - * the range 1 to 65535. Name must be an IANA_SVC_NAME. + * Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an + * IANA_SVC_NAME. */ @JsonProperty(value = "port", required = true) private int port; 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 eea4e5414e71..f789624bf159 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 @@ -110,7 +110,9 @@ Response getByResourceGroupWithResponse( void delete(String resourceGroupName, String containerAppName, Context context); /** - * Patches a Container App using JSON Merge Patch. + * Update properties of a Container App + * + *

Patches a Container App using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. @@ -123,7 +125,9 @@ Response getByResourceGroupWithResponse( void update(String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope); /** - * Patches a Container App using JSON Merge Patch. + * Update properties of a Container App + * + *

Patches a Container App using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. 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 new file mode 100644 index 000000000000..5403bef5f819 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsDiagnostics.java @@ -0,0 +1,153 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** 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. + * @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}. + */ + PagedIterable listDetectors(String resourceGroupName, String containerAppName); + + /** + * 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. + * @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}. + */ + PagedIterable listDetectors(String resourceGroupName, String containerAppName, 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a diagnostics result of a Container App. + */ + Diagnostics getDetector(String resourceGroupName, String containerAppName, String detectorName); + + /** + * 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. + * @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); + + /** + * 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. + * @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); + + /** + * 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. + * @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); + + /** + * 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. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return a revision of a Container App. + */ + Revision getRevision(String resourceGroupName, String containerAppName, String revisionName); + + /** + * 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. + * @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); + + /** + * 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.core.management.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 properties of a Container App. + */ + ContainerApp getRoot(String resourceGroupName, String containerAppName); + + /** + * 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.core.management.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 properties of a Container App along with {@link Response}. + */ + Response getRootWithResponse(String resourceGroupName, String containerAppName, Context context); +} 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 8312b3ee5b65..c52235874328 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 @@ -17,8 +17,7 @@ public final class CookieExpiration { private CookieExpirationConvention convention; /* - * The time after the request is made when the session cookie should - * expire. + * The time after the request is made when the session cookie should expire. */ @JsonProperty(value = "timeToExpiration") private String timeToExpiration; 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 40118638404f..ca60776fb8a7 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 @@ -30,6 +30,9 @@ public enum CookieExpirationConvention { */ @JsonCreator public static CookieExpirationConvention fromString(String value) { + if (value == null) { + return null; + } CookieExpirationConvention[] items = CookieExpirationConvention.values(); for (CookieExpirationConvention item : items) { if (item.toString().equalsIgnoreCase(value)) { 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 8c7e016e0587..26cfedaa2b04 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 @@ -24,8 +24,7 @@ public final class CustomDomain { private BindingType bindingType; /* - * Resource Id of the Certificate to be bound to this hostname. Must exist - * in the Managed Environment. + * Resource Id of the Certificate to be bound to this hostname. Must exist in the Managed Environment. */ @JsonProperty(value = "certificateId", required = true) private String certificateId; 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 b2d9b4e1aa66..74303340899f 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 @@ -4,40 +4,11 @@ package com.azure.resourcemanager.appcontainers.models; -import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner; import java.util.List; /** An immutable client-side representation of CustomHostnameAnalysisResult. */ public interface CustomHostnameAnalysisResult { - /** - * 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 hostname property: Host name that was analyzed. * @@ -65,7 +36,7 @@ public interface CustomHostnameAnalysisResult { * * @return the customDomainVerificationFailureInfo value. */ - DefaultErrorResponseError customDomainVerificationFailureInfo(); + CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo customDomainVerificationFailureInfo(); /** * Gets the hasConflictOnManagedEnvironment property: <code>true</code> if there is a conflict on the 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 new file mode 100644 index 000000000000..c7f5329111ba --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo.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.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Raw failure information if DNS verification fails. */ +@Fluent +public final class CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo { + /* + * Standardized string to programmatically identify the error. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /* + * Detailed error description and debugging information. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /* + * Detailed error description and debugging information. + */ + @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY) + private String target; + + /* + * Details or the error + */ + @JsonProperty(value = "details") + private List details; + + /** + * Get the code property: Standardized string to programmatically identify the error. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Get the message property: Detailed error description and debugging information. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Get the target property: Detailed error description and debugging information. + * + * @return the target value. + */ + public String target() { + return this.target; + } + + /** + * Get the details property: Details or the error. + * + * @return the details value. + */ + public List details() { + return this.details; + } + + /** + * Set the details property: Details or the error. + * + * @param details the details value to set. + * @return the CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo object itself. + */ + 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() { + if (details() != null) { + details().forEach(e -> e.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 new file mode 100644 index 000000000000..ee0e6e680a03 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem.java @@ -0,0 +1,65 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Detailed errors. */ +@Immutable +public final class CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem { + /* + * Standardized string to programmatically identify the error. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private String code; + + /* + * Detailed error description and debugging information. + */ + @JsonProperty(value = "message", access = JsonProperty.Access.WRITE_ONLY) + private String message; + + /* + * Detailed error description and debugging information. + */ + @JsonProperty(value = "target", access = JsonProperty.Access.WRITE_ONLY) + private String target; + + /** + * Get the code property: Standardized string to programmatically identify the error. + * + * @return the code value. + */ + public String code() { + return this.code; + } + + /** + * Get the message property: Detailed error description and debugging information. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Get the target property: Detailed error description and debugging information. + * + * @return the target value. + */ + public String target() { + return this.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 d8db7dcb6afd..d42f5d4eaeab 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 @@ -11,22 +11,19 @@ @Fluent public final class CustomOpenIdConnectProvider { /* - * false if the custom Open ID provider provider should not be - * enabled; otherwise, true. + * false if the custom Open ID provider provider should not be enabled; otherwise, true. */ @JsonProperty(value = "enabled") private Boolean enabled; /* - * 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. */ @JsonProperty(value = "registration") private OpenIdConnectRegistration registration; /* - * 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. */ @JsonProperty(value = "login") private OpenIdConnectLogin login; 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 2674b4fbc2fe..6e5403c5aedf 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 @@ -23,8 +23,7 @@ public final class Dapr { private String appId; /* - * 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 */ @JsonProperty(value = "appProtocol") private AppProtocol appProtocol; @@ -35,6 +34,12 @@ public final class Dapr { @JsonProperty(value = "appPort") private Integer appPort; + /* + * The httpReadBufferSize property. + */ + @JsonProperty(value = "httpReadBufferSize") + private Integer httpReadBufferSize; + /** * Get the enabled property: Boolean indicating if the Dapr side car is enabled. * @@ -117,6 +122,26 @@ public Dapr withAppPort(Integer appPort) { return this; } + /** + * Get the httpReadBufferSize property: The httpReadBufferSize property. + * + * @return the httpReadBufferSize value. + */ + public Integer httpReadBufferSize() { + return this.httpReadBufferSize; + } + + /** + * Set the httpReadBufferSize property: The httpReadBufferSize property. + * + * @param httpReadBufferSize the httpReadBufferSize value to set. + * @return the Dapr object itself. + */ + public Dapr withHttpReadBufferSize(Integer httpReadBufferSize) { + this.httpReadBufferSize = httpReadBufferSize; + return this; + } + /** * Validates the instance. * 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 133f3dc3e14f..4fca26425314 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 @@ -68,7 +68,9 @@ Response getWithResponse( String resourceGroupName, String environmentName, String componentName, Context context); /** - * Delete a Dapr Component from a Managed Environment. + * Delete a Dapr Component. + * + *

Delete a Dapr Component from a Managed Environment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. @@ -81,7 +83,9 @@ Response getWithResponse( void delete(String resourceGroupName, String environmentName, String componentName); /** - * Delete a Dapr Component from a Managed Environment. + * Delete a Dapr Component. + * + *

Delete a Dapr Component from a Managed Environment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. @@ -152,7 +156,9 @@ Response listSecretsWithResponse( Response getByIdWithResponse(String id, Context context); /** - * Delete a Dapr Component from a Managed Environment. + * Delete a Dapr Component. + * + *

Delete a Dapr Component from a Managed Environment. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -163,7 +169,9 @@ Response listSecretsWithResponse( void deleteById(String id); /** - * Delete a Dapr Component from a Managed Environment. + * Delete a Dapr Component. + * + *

Delete a Dapr Component from a Managed Environment. * * @param id the resource ID. * @param context The context to associate with this operation. 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 c34b305a6301..da8488ddeb2f 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 @@ -23,8 +23,7 @@ public final class DaprMetadata { private String value; /* - * Name of the Dapr Component secret from which to pull the metadata - * property value. + * Name of the Dapr Component secret from which to pull the metadata property value. */ @JsonProperty(value = "secretRef") private String secretRef; 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 8147b632b3ef..ac2ae2a0ac9e 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 @@ -12,15 +12,13 @@ @Fluent public final class DefaultAuthorizationPolicy { /* - * The configuration settings of the Azure Active Directory allowed - * principals. + * The configuration settings of the Azure Active Directory allowed principals. */ @JsonProperty(value = "allowedPrincipals") private AllowedPrincipals allowedPrincipals; /* - * The configuration settings of the Azure Active Directory allowed - * applications. + * The configuration settings of the Azure Active Directory allowed applications. */ @JsonProperty(value = "allowedApplications") private List allowedApplications; 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 new file mode 100644 index 000000000000..e4ef25b4ddcf --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadata.java @@ -0,0 +1,77 @@ +// Copyright (c) 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; + +/** Details of a diagnostics data provider. */ +@Fluent +public final class DiagnosticDataProviderMetadata { + /* + * Name of data provider + */ + @JsonProperty(value = "providerName") + private String providerName; + + /* + * Collection of properties + */ + @JsonProperty(value = "propertyBag") + private List propertyBag; + + /** + * Get the providerName property: Name of data provider. + * + * @return the providerName value. + */ + public String providerName() { + return this.providerName; + } + + /** + * Set the providerName property: Name of data provider. + * + * @param providerName the providerName value to set. + * @return the DiagnosticDataProviderMetadata object itself. + */ + public DiagnosticDataProviderMetadata withProviderName(String providerName) { + this.providerName = providerName; + return this; + } + + /** + * Get the propertyBag property: Collection of properties. + * + * @return the propertyBag value. + */ + public List propertyBag() { + return this.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) { + this.propertyBag = propertyBag; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (propertyBag() != null) { + propertyBag().forEach(e -> e.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 new file mode 100644 index 000000000000..972972731d65 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadataPropertyBagItem.java @@ -0,0 +1,72 @@ +// Copyright (c) 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; + +/** Property details. */ +@Fluent +public final class DiagnosticDataProviderMetadataPropertyBagItem { + /* + * Property name + */ + @JsonProperty(value = "name") + private String name; + + /* + * Property value + */ + @JsonProperty(value = "value") + private String value; + + /** + * Get the name property: Property name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Property name. + * + * @param name the name value to set. + * @return the DiagnosticDataProviderMetadataPropertyBagItem object itself. + */ + public DiagnosticDataProviderMetadataPropertyBagItem withName(String name) { + this.name = name; + return this; + } + + /** + * Get the value property: Property value. + * + * @return the value value. + */ + public String value() { + return this.value; + } + + /** + * Set the value property: Property value. + * + * @param value the value value to set. + * @return the DiagnosticDataProviderMetadataPropertyBagItem object itself. + */ + public DiagnosticDataProviderMetadataPropertyBagItem 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/DiagnosticDataTableResponseColumn.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseColumn.java new file mode 100644 index 000000000000..757e942335be --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseColumn.java @@ -0,0 +1,98 @@ +// Copyright (c) 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; + +/** Diagnostics data column. */ +@Fluent +public final class DiagnosticDataTableResponseColumn { + /* + * Column name + */ + @JsonProperty(value = "columnName") + private String columnName; + + /* + * Data type of the column + */ + @JsonProperty(value = "dataType") + private String dataType; + + /* + * Column type + */ + @JsonProperty(value = "columnType") + private String columnType; + + /** + * Get the columnName property: Column name. + * + * @return the columnName value. + */ + public String columnName() { + return this.columnName; + } + + /** + * Set the columnName property: Column name. + * + * @param columnName the columnName value to set. + * @return the DiagnosticDataTableResponseColumn object itself. + */ + public DiagnosticDataTableResponseColumn withColumnName(String columnName) { + this.columnName = columnName; + return this; + } + + /** + * Get the dataType property: Data type of the column. + * + * @return the dataType value. + */ + public String dataType() { + return this.dataType; + } + + /** + * Set the dataType property: Data type of the column. + * + * @param dataType the dataType value to set. + * @return the DiagnosticDataTableResponseColumn object itself. + */ + public DiagnosticDataTableResponseColumn withDataType(String dataType) { + this.dataType = dataType; + return this; + } + + /** + * Get the columnType property: Column type. + * + * @return the columnType value. + */ + public String columnType() { + return this.columnType; + } + + /** + * Set the columnType property: Column type. + * + * @param columnType the columnType value to set. + * @return the DiagnosticDataTableResponseColumn object itself. + */ + public DiagnosticDataTableResponseColumn withColumnType(String columnType) { + this.columnType = columnType; + 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/DiagnosticDataTableResponseObject.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseObject.java new file mode 100644 index 000000000000..3c03967d6937 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseObject.java @@ -0,0 +1,102 @@ +// Copyright (c) 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; + +/** Diagnostics data table. */ +@Fluent +public final class DiagnosticDataTableResponseObject { + /* + * Table name + */ + @JsonProperty(value = "tableName") + private String tableName; + + /* + * Columns in the table + */ + @JsonProperty(value = "columns") + private List columns; + + /* + * Rows in the table + */ + @JsonProperty(value = "rows") + private List rows; + + /** + * Get the tableName property: Table name. + * + * @return the tableName value. + */ + public String tableName() { + return this.tableName; + } + + /** + * Set the tableName property: Table name. + * + * @param tableName the tableName value to set. + * @return the DiagnosticDataTableResponseObject object itself. + */ + public DiagnosticDataTableResponseObject withTableName(String tableName) { + this.tableName = tableName; + return this; + } + + /** + * Get the columns property: Columns in the table. + * + * @return the columns value. + */ + public List columns() { + return this.columns; + } + + /** + * Set the columns property: Columns in the table. + * + * @param columns the columns value to set. + * @return the DiagnosticDataTableResponseObject object itself. + */ + public DiagnosticDataTableResponseObject withColumns(List columns) { + this.columns = columns; + return this; + } + + /** + * Get the rows property: Rows in the table. + * + * @return the rows value. + */ + public List rows() { + return this.rows; + } + + /** + * Set the rows property: Rows in the table. + * + * @param rows the rows value to set. + * @return the DiagnosticDataTableResponseObject object itself. + */ + public DiagnosticDataTableResponseObject withRows(List rows) { + this.rows = rows; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (columns() != null) { + columns().forEach(e -> e.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 new file mode 100644 index 000000000000..e0eca4e48776 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticRendering.java @@ -0,0 +1,124 @@ +// Copyright (c) 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; + +/** Rendering details of a diagnostics table. */ +@Fluent +public final class DiagnosticRendering { + /* + * Rendering type + */ + @JsonProperty(value = "type") + private Integer type; + + /* + * Title of the table + */ + @JsonProperty(value = "title") + private String title; + + /* + * Description of the table + */ + @JsonProperty(value = "description") + private String description; + + /* + * Flag if the table should be rendered + */ + @JsonProperty(value = "isVisible") + private Boolean isVisible; + + /** + * Get the type property: Rendering type. + * + * @return the type value. + */ + public Integer type() { + return this.type; + } + + /** + * Set the type property: Rendering type. + * + * @param type the type value to set. + * @return the DiagnosticRendering object itself. + */ + public DiagnosticRendering withType(Integer type) { + this.type = type; + return this; + } + + /** + * Get the title property: Title of the table. + * + * @return the title value. + */ + public String title() { + return this.title; + } + + /** + * Set the title property: Title of the table. + * + * @param title the title value to set. + * @return the DiagnosticRendering object itself. + */ + public DiagnosticRendering withTitle(String title) { + this.title = title; + return this; + } + + /** + * Get the description property: Description of the table. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Description of the table. + * + * @param description the description value to set. + * @return the DiagnosticRendering object itself. + */ + public DiagnosticRendering withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the isVisible property: Flag if the table should be rendered. + * + * @return the isVisible value. + */ + public Boolean isVisible() { + return this.isVisible; + } + + /** + * Set the isVisible property: Flag if the table should be rendered. + * + * @param isVisible the isVisible value to set. + * @return the DiagnosticRendering object itself. + */ + public DiagnosticRendering withIsVisible(Boolean isVisible) { + this.isVisible = isVisible; + 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/DiagnosticSupportTopic.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticSupportTopic.java new file mode 100644 index 000000000000..4fcac8700138 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticSupportTopic.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Support topic information. */ +@Immutable +public final class DiagnosticSupportTopic { + /* + * Unique topic identifier + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * PES identifier + */ + @JsonProperty(value = "pesId", access = JsonProperty.Access.WRITE_ONLY) + private String pesId; + + /** + * Get the id property: Unique topic identifier. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the pesId property: PES identifier. + * + * @return the pesId value. + */ + public String pesId() { + return this.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 new file mode 100644 index 000000000000..097fd4f2d489 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Diagnostics.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.management.SystemData; +import com.azure.resourcemanager.appcontainers.fluent.models.DiagnosticsInner; + +/** 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 new file mode 100644 index 000000000000..855f169b1bca --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsCollection.java @@ -0,0 +1,32 @@ +// Copyright (c) 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.DiagnosticsCollectionInner; +import java.util.List; + +/** 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 new file mode 100644 index 000000000000..78546ed510a1 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDataApiResponse.java @@ -0,0 +1,78 @@ +// Copyright (c) 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; + +/** Diagnostics data returned from a detector. */ +@Fluent +public final class DiagnosticsDataApiResponse { + /* + * Table response + */ + @JsonProperty(value = "table") + private DiagnosticDataTableResponseObject table; + + /* + * Details of the table response + */ + @JsonProperty(value = "renderingProperties") + private DiagnosticRendering renderingProperties; + + /** + * Get the table property: Table response. + * + * @return the table value. + */ + public DiagnosticDataTableResponseObject table() { + return this.table; + } + + /** + * Set the table property: Table response. + * + * @param table the table value to set. + * @return the DiagnosticsDataApiResponse object itself. + */ + public DiagnosticsDataApiResponse withTable(DiagnosticDataTableResponseObject table) { + this.table = table; + return this; + } + + /** + * Get the renderingProperties property: Details of the table response. + * + * @return the renderingProperties value. + */ + public DiagnosticRendering renderingProperties() { + return this.renderingProperties; + } + + /** + * Set the renderingProperties property: Details of the table response. + * + * @param renderingProperties the renderingProperties value to set. + * @return the DiagnosticsDataApiResponse object itself. + */ + public DiagnosticsDataApiResponse withRenderingProperties(DiagnosticRendering renderingProperties) { + this.renderingProperties = renderingProperties; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (table() != null) { + table().validate(); + } + if (renderingProperties() != null) { + renderingProperties().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 new file mode 100644 index 000000000000..4fb714ae83c6 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDefinition.java @@ -0,0 +1,181 @@ +// Copyright (c) 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; + +/** Metadata of the diagnostics response. */ +@Fluent +public final class DiagnosticsDefinition { + /* + * Unique detector name + */ + @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY) + private String id; + + /* + * Display Name of the detector + */ + @JsonProperty(value = "name", access = JsonProperty.Access.WRITE_ONLY) + private String name; + + /* + * Details of the diagnostics info + */ + @JsonProperty(value = "description", access = JsonProperty.Access.WRITE_ONLY) + private String description; + + /* + * Authors' names of the detector + */ + @JsonProperty(value = "author", access = JsonProperty.Access.WRITE_ONLY) + private String author; + + /* + * Category of the detector + */ + @JsonProperty(value = "category", access = JsonProperty.Access.WRITE_ONLY) + private String category; + + /* + * List of support topics + */ + @JsonProperty(value = "supportTopicList") + private List supportTopicList; + + /* + * List of analysis types + */ + @JsonProperty(value = "analysisTypes") + private List analysisTypes; + + /* + * Authors' names of the detector + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /* + * Authors' names of the detector + */ + @JsonProperty(value = "score", access = JsonProperty.Access.WRITE_ONLY) + private Float score; + + /** + * Get the id property: Unique detector name. + * + * @return the id value. + */ + public String id() { + return this.id; + } + + /** + * Get the name property: Display Name of the detector. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Get the description property: Details of the diagnostics info. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Get the author property: Authors' names of the detector. + * + * @return the author value. + */ + public String author() { + return this.author; + } + + /** + * Get the category property: Category of the detector. + * + * @return the category value. + */ + public String category() { + return this.category; + } + + /** + * Get the supportTopicList property: List of support topics. + * + * @return the supportTopicList value. + */ + public List supportTopicList() { + return this.supportTopicList; + } + + /** + * Set the supportTopicList property: List of support topics. + * + * @param supportTopicList the supportTopicList value to set. + * @return the DiagnosticsDefinition object itself. + */ + public DiagnosticsDefinition withSupportTopicList(List supportTopicList) { + this.supportTopicList = supportTopicList; + return this; + } + + /** + * Get the analysisTypes property: List of analysis types. + * + * @return the analysisTypes value. + */ + public List analysisTypes() { + return this.analysisTypes; + } + + /** + * Set the analysisTypes property: List of analysis types. + * + * @param analysisTypes the analysisTypes value to set. + * @return the DiagnosticsDefinition object itself. + */ + public DiagnosticsDefinition withAnalysisTypes(List analysisTypes) { + this.analysisTypes = analysisTypes; + return this; + } + + /** + * Get the type property: Authors' names of the detector. + * + * @return the type value. + */ + public String type() { + return this.type; + } + + /** + * Get the score property: Authors' names of the detector. + * + * @return the score value. + */ + public Float score() { + return this.score; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (supportTopicList() != null) { + supportTopicList().forEach(e -> e.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 new file mode 100644 index 000000000000..b2098a5927a6 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsProperties.java @@ -0,0 +1,137 @@ +// Copyright (c) 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; + +/** Diagnostics resource specific properties. */ +@Fluent +public final class DiagnosticsProperties { + /* + * Metadata of the diagnostics response. + */ + @JsonProperty(value = "metadata") + private DiagnosticsDefinition metadata; + + /* + * Set of data collections associated with the response. + */ + @JsonProperty(value = "dataset") + private List dataset; + + /* + * Status of the diagnostics response. + */ + @JsonProperty(value = "status") + private DiagnosticsStatus status; + + /* + * List of data providers' metadata. + */ + @JsonProperty(value = "dataProviderMetadata") + private DiagnosticDataProviderMetadata dataProviderMetadata; + + /** + * Get the metadata property: Metadata of the diagnostics response. + * + * @return the metadata value. + */ + public DiagnosticsDefinition metadata() { + return this.metadata; + } + + /** + * Set the metadata property: Metadata of the diagnostics response. + * + * @param metadata the metadata value to set. + * @return the DiagnosticsProperties object itself. + */ + public DiagnosticsProperties withMetadata(DiagnosticsDefinition metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the dataset property: Set of data collections associated with the response. + * + * @return the dataset value. + */ + public List dataset() { + return this.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. + */ + public DiagnosticsProperties withDataset(List dataset) { + this.dataset = dataset; + return this; + } + + /** + * Get the status property: Status of the diagnostics response. + * + * @return the status value. + */ + public DiagnosticsStatus status() { + return this.status; + } + + /** + * Set the status property: Status of the diagnostics response. + * + * @param status the status value to set. + * @return the DiagnosticsProperties object itself. + */ + public DiagnosticsProperties withStatus(DiagnosticsStatus status) { + this.status = status; + return this; + } + + /** + * Get the dataProviderMetadata property: List of data providers' metadata. + * + * @return the dataProviderMetadata value. + */ + public DiagnosticDataProviderMetadata dataProviderMetadata() { + return this.dataProviderMetadata; + } + + /** + * Set the dataProviderMetadata property: List of data providers' metadata. + * + * @param dataProviderMetadata the dataProviderMetadata value to set. + * @return the DiagnosticsProperties object itself. + */ + public DiagnosticsProperties withDataProviderMetadata(DiagnosticDataProviderMetadata dataProviderMetadata) { + this.dataProviderMetadata = dataProviderMetadata; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (metadata() != null) { + metadata().validate(); + } + if (dataset() != null) { + dataset().forEach(e -> e.validate()); + } + if (status() != null) { + status().validate(); + } + if (dataProviderMetadata() != null) { + dataProviderMetadata().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 new file mode 100644 index 000000000000..bb36ff3e7be5 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsStatus.java @@ -0,0 +1,72 @@ +// Copyright (c) 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; + +/** Rendering details of a diagnostics table. */ +@Fluent +public final class DiagnosticsStatus { + /* + * Diagnostic message + */ + @JsonProperty(value = "message") + private String message; + + /* + * Status + */ + @JsonProperty(value = "statusId") + private Integer statusId; + + /** + * Get the message property: Diagnostic message. + * + * @return the message value. + */ + public String message() { + return this.message; + } + + /** + * Set the message property: Diagnostic message. + * + * @param message the message value to set. + * @return the DiagnosticsStatus object itself. + */ + public DiagnosticsStatus withMessage(String message) { + this.message = message; + return this; + } + + /** + * Get the statusId property: Status. + * + * @return the statusId value. + */ + public Integer statusId() { + return this.statusId; + } + + /** + * Set the statusId property: Status. + * + * @param statusId the statusId value to set. + * @return the DiagnosticsStatus object itself. + */ + public DiagnosticsStatus withStatusId(Integer statusId) { + this.statusId = statusId; + 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/DnsVerificationTestResult.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DnsVerificationTestResult.java index 635453133af6..e10892940243 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 @@ -33,6 +33,9 @@ public enum DnsVerificationTestResult { */ @JsonCreator public static DnsVerificationTestResult fromString(String value) { + if (value == null) { + return null; + } DnsVerificationTestResult[] items = DnsVerificationTestResult.values(); for (DnsVerificationTestResult item : items) { if (item.toString().equalsIgnoreCase(value)) { 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 68f15cc14478..b7603465274c 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 @@ -23,8 +23,7 @@ public final class EnvironmentVar { private String value; /* - * Name of the Container App secret from which to pull the environment - * variable value. + * Name of the Container App secret from which to pull the environment variable value. */ @JsonProperty(value = "secretRef") private String secretRef; 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 new file mode 100644 index 000000000000..3de38c3f6fd9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocation.java @@ -0,0 +1,72 @@ +// Copyright (c) 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 complex type of the extended location. */ +@Fluent +public final class ExtendedLocation { + /* + * The name of the extended location. + */ + @JsonProperty(value = "name") + private String name; + + /* + * The type of the extended location. + */ + @JsonProperty(value = "type") + private ExtendedLocationTypes type; + + /** + * Get the name property: The name of the extended location. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: The name of the extended location. + * + * @param name the name value to set. + * @return the ExtendedLocation object itself. + */ + public ExtendedLocation withName(String name) { + this.name = name; + return this; + } + + /** + * Get the type property: The type of the extended location. + * + * @return the type value. + */ + public ExtendedLocationTypes type() { + return this.type; + } + + /** + * Set the type property: The type of the extended location. + * + * @param type the type value to set. + * @return the ExtendedLocation object itself. + */ + public ExtendedLocation withType(ExtendedLocationTypes type) { + this.type = type; + 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/ExtendedLocationTypes.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocationTypes.java new file mode 100644 index 000000000000..cbba7bfc48fe --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocationTypes.java @@ -0,0 +1,35 @@ +// Copyright (c) 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; + +/** Defines values for ExtendedLocationTypes. */ +public final class ExtendedLocationTypes extends ExpandableStringEnum { + /** Static value CustomLocation for ExtendedLocationTypes. */ + public static final ExtendedLocationTypes CUSTOM_LOCATION = fromString("CustomLocation"); + + /** + * Creates or finds a ExtendedLocationTypes from its string representation. + * + * @param name a name to look for. + * @return the corresponding ExtendedLocationTypes. + */ + @JsonCreator + public static ExtendedLocationTypes fromString(String name) { + return fromString(name, ExtendedLocationTypes.class); + } + + /** + * Gets known ExtendedLocationTypes values. + * + * @return known ExtendedLocationTypes values. + */ + public static Collection values() { + return values(ExtendedLocationTypes.class); + } +} 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 156bdd036587..44fe1582df4d 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 @@ -11,15 +11,14 @@ @Fluent public final class Facebook { /* - * false if the Facebook provider should not be enabled - * despite the set registration; otherwise, true. + * false if the Facebook provider should not be enabled despite the set registration; otherwise, + * true. */ @JsonProperty(value = "enabled") private Boolean enabled; /* - * The configuration settings of the app registration for the Facebook - * provider. + * The configuration settings of the app registration for the Facebook provider. */ @JsonProperty(value = "registration") private AppRegistration registration; 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 682f9dc4f3f6..c6d9711209af 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 @@ -33,6 +33,9 @@ public enum ForwardProxyConvention { */ @JsonCreator public static ForwardProxyConvention fromString(String value) { + if (value == null) { + return null; + } ForwardProxyConvention[] items = ForwardProxyConvention.values(); for (ForwardProxyConvention item : items) { if (item.toString().equalsIgnoreCase(value)) { 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 3a909ed77235..f6c178bf2786 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 @@ -11,15 +11,14 @@ @Fluent public final class GitHub { /* - * false if the GitHub provider should not be enabled despite - * the set registration; otherwise, true. + * false if the GitHub provider should not be enabled despite the set registration; otherwise, + * true. */ @JsonProperty(value = "enabled") private Boolean enabled; /* - * The configuration settings of the app registration for the GitHub - * provider. + * The configuration settings of the app registration for the GitHub provider. */ @JsonProperty(value = "registration") private ClientRegistration registration; 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 62ed62bf27ef..76ab8a2d9812 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 @@ -15,25 +15,21 @@ @Fluent public final class GlobalValidation { /* - * 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. */ @JsonProperty(value = "unauthenticatedClientAction") private UnauthenticatedClientActionV2 unauthenticatedClientAction; /* - * 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 + * 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 * action is set to "RedirectToLoginPage". */ @JsonProperty(value = "redirectToProvider") private String redirectToProvider; /* - * The paths for which unauthenticated flow would not be redirected to the - * login page. + * The paths for which unauthenticated flow would not be redirected to the login page. */ @JsonProperty(value = "excludedPaths") private List excludedPaths; 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 e054143330f3..0a91403e9bb2 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 @@ -11,15 +11,14 @@ @Fluent public final class Google { /* - * false if the Google provider should not be enabled despite - * the set registration; otherwise, true. + * false if the Google provider should not be enabled despite the set registration; otherwise, + * true. */ @JsonProperty(value = "enabled") private Boolean enabled; /* - * The configuration settings of the app registration for the Google - * provider. + * The configuration settings of the app registration for the Google provider. */ @JsonProperty(value = "registration") private ClientRegistration registration; @@ -31,8 +30,7 @@ public final class Google { private LoginScopes login; /* - * The configuration settings of the Azure Active Directory token - * validation flow. + * The configuration settings of the Azure Active Directory token validation flow. */ @JsonProperty(value = "validation") private AllowedAudiencesValidation validation; 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 dceff513a349..d88fdbe67680 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 @@ -14,8 +14,8 @@ @Fluent public final class HttpSettings { /* - * false if the authentication/authorization responses not - * having the HTTPS scheme are permissible; otherwise, true. + * false if the authentication/authorization responses not having the HTTPS scheme are permissible; + * otherwise, true. */ @JsonProperty(value = "requireHttps") private Boolean requireHttps; 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 10778321bbc3..2d2973ea962e 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 @@ -11,8 +11,7 @@ @Fluent public final class HttpSettingsRoutes { /* - * The prefix that should precede all the authentication/authorization - * paths. + * The prefix that should precede all the authentication/authorization paths. */ @JsonProperty(value = "apiPrefix") private String apiPrefix; 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 839f1ea096e5..cc4f5adf2de1 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 @@ -58,8 +58,7 @@ public final class IdentityProviders { private AzureStaticWebApps azureStaticWebApps; /* - * The map of the name of the alias of each custom Open ID Connect provider - * to the + * 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. */ @JsonProperty(value = "customOpenIdConnectProviders") 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 1c041e51fc56..79c134df3c04 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 @@ -48,8 +48,8 @@ public final class Ingress { private List customDomains; /* - * Bool indicating if HTTP connections to is allowed. If set to false HTTP - * connections are automatically redirected to HTTPS connections + * Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected + * to HTTPS connections */ @JsonProperty(value = "allowInsecure") private Boolean allowInsecure; 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 ba800efe5120..47f0dcdd1b4c 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 @@ -12,24 +12,22 @@ @Fluent public final class Login { /* - * The routes that specify the endpoints used for login and logout - * requests. + * The routes that specify the endpoints used for login and logout requests. */ @JsonProperty(value = "routes") private LoginRoutes routes; /* - * true if the fragments from the request are preserved after - * the login request is made; otherwise, false. + * true if the fragments from the request are preserved after the login request is made; otherwise, + * false. */ @JsonProperty(value = "preserveUrlFragmentsForLogins") private Boolean preserveUrlFragmentsForLogins; /* - * 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. + * 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. */ @JsonProperty(value = "allowedExternalRedirectUrls") 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 ae6a433bef4c..48be36e5e3ad 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 @@ -290,7 +290,11 @@ interface WithZoneRedundant { /** The template for ManagedEnvironment update. */ interface Update - extends UpdateStages.WithTags, UpdateStages.WithVnetConfiguration, UpdateStages.WithAppLogsConfiguration { + extends UpdateStages.WithTags, + UpdateStages.WithDaprAIInstrumentationKey, + UpdateStages.WithDaprAIConnectionString, + UpdateStages.WithVnetConfiguration, + UpdateStages.WithAppLogsConfiguration { /** * Executes the update request. * @@ -318,6 +322,30 @@ interface WithTags { */ Update withTags(Map tags); } + /** 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. + * @return the next definition stage. + */ + Update withDaprAIInstrumentationKey(String daprAIInstrumentationKey); + } + /** 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. + * @return the next definition stage. + */ + Update withDaprAIConnectionString(String daprAIConnectionString); + } /** The stage of the ManagedEnvironment update allowing to specify vnetConfiguration. */ interface WithVnetConfiguration { /** 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 new file mode 100644 index 000000000000..362649cbfb49 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentDiagnostics.java @@ -0,0 +1,78 @@ +// Copyright (c) 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 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. + * + * @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 list of diagnostics for a Managed Environment used to host container apps. + */ + DiagnosticsCollection listDetectors(String resourceGroupName, String environmentName); + + /** + * Get the list of diagnostics for a given Managed Environment. + * + *

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. + * @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}. + */ + Response listDetectorsWithResponse( + String resourceGroupName, String environmentName, Context context); + + /** + * Get the diagnostics data for a given Managed Environment. + * + *

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. + * @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. + */ + Diagnostics getDetector(String resourceGroupName, String environmentName, String detectorName); + + /** + * Get the diagnostics data for a given Managed Environment. + * + *

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. + * @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); +} 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 2477278f7a9d..c264553d5e85 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 @@ -12,7 +12,9 @@ /** Resource collection API of ManagedEnvironments. */ public interface ManagedEnvironments { /** - * Get all Managed Environments for a subscription. + * Get all 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. @@ -22,7 +24,9 @@ public interface ManagedEnvironments { PagedIterable list(); /** - * Get all Managed Environments for a subscription. + * Get all 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. @@ -34,7 +38,9 @@ public interface ManagedEnvironments { PagedIterable list(Context context); /** - * Get all the Managed Environments in a resource group. + * Get all the 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. @@ -46,7 +52,9 @@ public interface ManagedEnvironments { PagedIterable listByResourceGroup(String resourceGroupName); /** - * Get all the Managed Environments in a resource group. + * Get all the 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. @@ -59,7 +67,9 @@ public interface ManagedEnvironments { PagedIterable listByResourceGroup(String resourceGroupName, Context context); /** - * Get the properties of a Managed Environment used to host container apps. + * Get the properties of a Managed Environment. + * + *

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. @@ -72,7 +82,9 @@ public interface ManagedEnvironments { ManagedEnvironment getByResourceGroup(String resourceGroupName, String environmentName); /** - * Get the properties of a Managed Environment used to host container apps. + * Get the properties of a Managed Environment. + * + *

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. @@ -87,7 +99,9 @@ Response getByResourceGroupWithResponse( String resourceGroupName, String environmentName, Context context); /** - * Delete a Managed Environment if it does not have any container apps. + * Delete a Managed Environment. + * + *

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. @@ -99,7 +113,9 @@ Response getByResourceGroupWithResponse( void deleteByResourceGroup(String resourceGroupName, String environmentName); /** - * Delete a Managed Environment if it does not have any container apps. + * Delete a Managed Environment. + * + *

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. @@ -112,7 +128,9 @@ Response getByResourceGroupWithResponse( void delete(String resourceGroupName, String environmentName, Context context); /** - * Patches a Managed Environment using JSON Merge Patch. + * Update Managed Environment's properties. + * + *

Patches a Managed Environment using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. @@ -125,7 +143,9 @@ Response getByResourceGroupWithResponse( void update(String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope); /** - * Patches a Managed Environment using JSON Merge Patch. + * Update Managed Environment's properties. + * + *

Patches a Managed Environment using JSON Merge Patch. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. @@ -140,7 +160,9 @@ void update( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); /** - * Get the properties of a Managed Environment used to host container apps. + * Get the properties of a Managed Environment. + * + *

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. @@ -152,7 +174,9 @@ void update( ManagedEnvironment getById(String id); /** - * Get the properties of a Managed Environment used to host container apps. + * Get the properties of a Managed Environment. + * + *

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. @@ -165,7 +189,9 @@ void update( Response getByIdWithResponse(String id, Context context); /** - * Delete a Managed Environment if it does not have any container apps. + * Delete a Managed Environment. + * + *

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. @@ -176,7 +202,9 @@ void update( void deleteById(String id); /** - * Delete a Managed Environment if it does not have any container apps. + * Delete a Managed Environment. + * + *

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. 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 new file mode 100644 index 000000000000..1bc7e9e5b754 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsDiagnostics.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 ManagedEnvironmentsDiagnostics. */ +public interface ManagedEnvironmentsDiagnostics { + /** + * Get the properties of a Managed Environment. + * + *

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. + * @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. + */ + ManagedEnvironment getRoot(String resourceGroupName, String environmentName); + + /** + * Get the properties of a Managed Environment. + * + *

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. + * @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 getRootWithResponse(String resourceGroupName, String environmentName, Context context); +} 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 2b5d019da283..5250763c9df8 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 @@ -15,30 +15,28 @@ @Fluent public class ManagedServiceIdentity { /* - * The service principal ID of the system assigned identity. This property - * will only be provided for a system assigned identity. + * The service principal ID of the system assigned identity. This property will only be provided for a system + * assigned identity. */ @JsonProperty(value = "principalId", access = JsonProperty.Access.WRITE_ONLY) private UUID principalId; /* - * The tenant ID of the system assigned identity. This property will only - * be provided for a system assigned identity. + * The tenant ID of the system assigned identity. This property will only be provided for a system assigned + * identity. */ @JsonProperty(value = "tenantId", access = JsonProperty.Access.WRITE_ONLY) private UUID tenantId; /* - * 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). */ @JsonProperty(value = "type", required = true) private ManagedServiceIdentityType type; /* - * The set of user assigned identities associated with the resource. The - * userAssignedIdentities dictionary keys will be ARM resource ids in the - * form: + * 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}. * The dictionary values can be empty objects ({}) in requests. */ 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 31ec2a5bd7a8..33caa710265c 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 @@ -10,7 +10,9 @@ /** Resource collection API of Namespaces. */ public interface Namespaces { /** - * Checks if resource name is available. + * Checks the resource name availability. + * + *

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. @@ -25,7 +27,9 @@ CheckNameAvailabilityResponse checkNameAvailability( String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest); /** - * Checks if resource name is available. + * Checks the resource name availability. + * + *

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. 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 fdb34ac0fe66..4e6591baf156 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 @@ -11,8 +11,8 @@ @Fluent public final class Nonce { /* - * false if the nonce should not be validated while completing - * the login flow; otherwise, true. + * false if the nonce should not be validated while completing the login flow; otherwise, + * true. */ @JsonProperty(value = "validateNonce") private Boolean validateNonce; 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 b6bdca9cff8e..e447a556082c 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 @@ -17,8 +17,7 @@ public final class OpenIdConnectClientCredential { private ClientCredentialMethod method; /* - * The app setting that contains the client secret for the custom Open ID - * Connect provider. + * The app setting that contains the client secret for the custom Open ID Connect provider. */ @JsonProperty(value = "clientSecretSettingName") private String clientSecretSettingName; 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 5c7e05a305dc..ab349cbb4593 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 @@ -35,8 +35,7 @@ public final class OpenIdConnectConfig { private String certificationUri; /* - * The endpoint that contains all the configuration endpoints for the - * provider. + * The endpoint that contains all the configuration endpoints for the provider. */ @JsonProperty(value = "wellKnownOpenIdConfiguration") private String wellKnownOpenIdConfiguration; 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 192a661f3b98..acf654b8ded4 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 @@ -23,8 +23,7 @@ public final class OpenIdConnectRegistration { private OpenIdConnectClientCredential clientCredential; /* - * 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. */ @JsonProperty(value = "openIdConnectConfiguration") private OpenIdConnectConfig openIdConnectConfiguration; 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 2ede306b687b..40a50abfa8f0 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 @@ -29,9 +29,8 @@ public final class RegistryCredentials { private String passwordSecretRef; /* - * 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' + * 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' */ @JsonProperty(value = "identity") private String identity; 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 460de54465b7..e50d44d74b76 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 @@ -7,6 +7,7 @@ import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.fluent.models.RevisionInner; import java.time.OffsetDateTime; +import java.util.List; /** An immutable client-side representation of Revision. */ public interface Revision { @@ -81,6 +82,13 @@ public interface Revision { */ Integer trafficWeight(); + /** + * Gets the trafficLabels property: Traffic labels associated with this revision. + * + * @return the trafficLabels value. + */ + List trafficLabels(); + /** * Gets the provisioningError property: Optional Field - Platform Error Message. * 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 2af107980c75..c1cc83350c77 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 @@ -18,8 +18,7 @@ public final class Scale { private Integer minReplicas; /* - * Optional. Maximum number of container replicas. Defaults to 10 if not - * set. + * Optional. Maximum number of container replicas. Defaults to 10 if not set. */ @JsonProperty(value = "maxReplicas") private Integer maxReplicas; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TrafficLabel.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TrafficLabel.java new file mode 100644 index 000000000000..a3e14519991b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TrafficLabel.java @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Traffic label information. */ +@Immutable +public final class TrafficLabel { + /* + * Traffic label assigned to a revision + */ + @JsonProperty(value = "label", access = JsonProperty.Access.WRITE_ONLY) + private String label; + + /* + * Fully qualified domain name of a labelled revision + */ + @JsonProperty(value = "fqdn", access = JsonProperty.Access.WRITE_ONLY) + private String fqdn; + + /** + * Get the label property: Traffic label assigned to a revision. + * + * @return the label value. + */ + public String label() { + return this.label; + } + + /** + * Get the fqdn property: Fully qualified domain name of a labelled revision. + * + * @return the fqdn value. + */ + public String fqdn() { + return this.fqdn; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Twitter.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Twitter.java index 4e07b3aff83e..b6f91e49b5fd 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 @@ -11,15 +11,14 @@ @Fluent public final class Twitter { /* - * false if the Twitter provider should not be enabled despite - * the set registration; otherwise, true. + * false if the Twitter provider should not be enabled despite the set registration; otherwise, + * true. */ @JsonProperty(value = "enabled") private Boolean enabled; /* - * The configuration settings of the app registration for the Twitter - * provider. + * The configuration settings of the app registration for the Twitter provider. */ @JsonProperty(value = "registration") private TwitterRegistration registration; 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 37bf160c12b9..0314f25bb5a1 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 @@ -19,8 +19,7 @@ public final class TwitterRegistration { private String consumerKey; /* - * The app setting name that contains the OAuth 1.0a consumer secret of the - * Twitter + * The app setting name that contains the OAuth 1.0a consumer secret of the Twitter * application used for sign-in. */ @JsonProperty(value = "consumerSecretSettingName") 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 a3a2fc415bfe..b2b1fb7d6817 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 @@ -36,6 +36,9 @@ public enum UnauthenticatedClientActionV2 { */ @JsonCreator public static UnauthenticatedClientActionV2 fromString(String value) { + if (value == null) { + return null; + } UnauthenticatedClientActionV2[] items = UnauthenticatedClientActionV2.values(); for (UnauthenticatedClientActionV2 item : items) { if (item.toString().equalsIgnoreCase(value)) { 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 068b95ab5637..90c141c2ade6 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 @@ -11,57 +11,51 @@ @Fluent public final class VnetConfiguration { /* - * Boolean indicating the environment only has an internal load balancer. - * These environments do not have a public static IP resource, must provide - * ControlPlaneSubnetResourceId and AppSubnetResourceId if enabling this - * property + * Boolean indicating the environment only has an internal load balancer. These environments do not have a public + * static IP resource. They must provide runtimeSubnetId and infrastructureSubnetId if enabling this property */ @JsonProperty(value = "internal") private Boolean internal; /* - * Resource ID of a subnet for infrastructure components. This subnet must - * be in the same VNET as the subnet defined in runtimeSubnetId. Must not - * overlap with any other provided IP ranges. + * Resource ID of a subnet for infrastructure components. This subnet must be in the same VNET as the subnet + * defined in runtimeSubnetId. Must not overlap with any other provided IP ranges. */ @JsonProperty(value = "infrastructureSubnetId") private String infrastructureSubnetId; /* - * Resource ID of a subnet that Container App containers are injected into. - * This subnet must be in the same VNET as the subnet defined in - * infrastructureSubnetId. Must not overlap with any other provided IP - * ranges. + * Resource ID of a subnet that Container App containers are injected into. This subnet must be in the same VNET as + * the subnet defined in infrastructureSubnetId. Must not overlap with any other provided IP ranges. */ @JsonProperty(value = "runtimeSubnetId") private String runtimeSubnetId; /* - * CIDR notation IP range assigned to the Docker bridge, network. Must not - * overlap with any other provided IP ranges. + * CIDR notation IP range assigned to the Docker bridge, network. Must not overlap with any other provided IP + * ranges. */ @JsonProperty(value = "dockerBridgeCidr") private String dockerBridgeCidr; /* - * IP range in CIDR notation that can be reserved for environment - * infrastructure IP addresses. Must not overlap with any other provided IP - * ranges. + * IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. Must not overlap + * with any other provided IP ranges. */ @JsonProperty(value = "platformReservedCidr") private String platformReservedCidr; /* - * An IP address from the IP range defined by platformReservedCidr that - * will be reserved for the internal DNS server. + * An IP address from the IP range defined by platformReservedCidr that will be reserved for the internal DNS + * server. */ @JsonProperty(value = "platformReservedDnsIP") private String platformReservedDnsIp; /** * Get the internal property: Boolean indicating the environment only has an internal load balancer. These - * environments do not have a public static IP resource, must provide ControlPlaneSubnetResourceId and - * AppSubnetResourceId if enabling this property. + * environments do not have a public static IP resource. They must provide runtimeSubnetId and + * infrastructureSubnetId if enabling this property. * * @return the internal value. */ @@ -71,8 +65,8 @@ 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, must provide ControlPlaneSubnetResourceId and - * AppSubnetResourceId if enabling this property. + * environments do not have a public static IP resource. They must provide runtimeSubnetId and + * infrastructureSubnetId if enabling this property. * * @param internal the internal value to set. * @return the VnetConfiguration object itself. 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 81c761c51802..5718251f03bf 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 @@ -17,8 +17,7 @@ public final class VolumeMount { private String volumeName; /* - * Path within the container at which the volume should be mounted.Must not - * contain ':'. + * Path within the container at which the volume should be mounted.Must not contain ':'. */ @JsonProperty(value = "mountPath") private String mountPath; 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 f32420e6af4e..01c68c8b82cd 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 @@ -9,7 +9,7 @@ /** Samples for Certificates CreateOrUpdate. */ public final class CertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_CreateOrUpdate.json */ /** * Sample code: Create or Update Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java index 12b6d83e16de..ba5d9fdaca29 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for Certificates Delete. */ public final class CertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Delete.json */ /** * Sample code: Delete Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java index 6279efd0587d..8c03998b60ca 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesGetSamples.java @@ -9,7 +9,7 @@ /** Samples for Certificates Get. */ public final class CertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificate_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificate_Get.json */ /** * Sample code: Get Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java index de192f2ea995..78d2e8e1bdbb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesListSamples.java @@ -9,7 +9,7 @@ /** Samples for Certificates List. */ public final class CertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_ListByManagedEnvironment.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_ListByManagedEnvironment.json */ /** * Sample code: List Certificates by Managed Environment. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesUpdateSamples.java index 1780385c470d..db66bc2a7f9d 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 @@ -12,7 +12,7 @@ /** Samples for Certificates Update. */ public final class CertificatesUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_Patch.json */ /** * Sample code: Patch Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.java new file mode 100644 index 000000000000..0b2dd0645194 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesCreateOrUpdateSamples.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; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.CertificateInner; +import com.azure.resourcemanager.appcontainers.models.CertificateProperties; + +/** Samples for ConnectedEnvironmentsCertificates CreateOrUpdate. */ +public final class ConnectedEnvironmentsCertificatesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateCertificate( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironmentsCertificates() + .createOrUpdateWithResponse( + "examplerg", + "testcontainerenv", + "certificate-firendly-name", + new CertificateInner() + .withLocation("East US") + .withProperties( + new CertificateProperties() + .withPassword("private key password") + .withValue("PFX-or-PEM-blob".getBytes())), + Context.NONE); + } +} 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 new file mode 100644 index 000000000000..21e25b3fd21c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesDeleteSamples.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; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsCertificates Delete. */ +public final class ConnectedEnvironmentsCertificatesDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Delete.json + */ + /** + * 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", 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 new file mode 100644 index 000000000000..7516a6391ae8 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesGetSamples.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; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsCertificates Get. */ +public final class ConnectedEnvironmentsCertificatesGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificate_Get.json + */ + /** + * 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", 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 new file mode 100644 index 000000000000..5b8c0e11d2f6 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesListSamples.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; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsCertificates List. */ +public final class ConnectedEnvironmentsCertificatesListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_ListByConnectedEnvironment.json + */ + /** + * 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", 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 new file mode 100644 index 000000000000..c2ea3462e495 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCertificatesUpdateSamples.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.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.models.CertificatePatch; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ConnectedEnvironmentsCertificates Update. */ +public final class ConnectedEnvironmentsCertificatesUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_Patch.json + */ + /** + * Sample code: Patch Certificate. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void patchCertificate(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironmentsCertificates() + .updateWithResponse( + "examplerg", + "testcontainerenv", + "certificate-firendly-name", + new CertificatePatch().withTags(mapOf("tag1", "value1", "tag2", "value2")), + Context.NONE); + } + + @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/ConnectedEnvironmentsCheckNameAvailabilitySamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java new file mode 100644 index 000000000000..eb7a2b950c5b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCheckNameAvailabilitySamples.java @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; + +/** Samples for ConnectedEnvironments CheckNameAvailability. */ +public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsCertificates_CheckNameAvailability.json + */ + /** + * 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"), + 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 new file mode 100644 index 000000000000..07e512496af4 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.java @@ -0,0 +1,28 @@ +// Copyright (c) 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 ConnectedEnvironments CreateOrUpdate. */ +public final class ConnectedEnvironmentsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_CreateOrUpdate.json + */ + /** + * 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") + .withStaticIp("1.2.3.4") + .withDaprAIConnectionString( + "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") + .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 new file mode 100644 index 000000000000..cd3fa3e3ef56 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples.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.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.DaprComponentInner; +import com.azure.resourcemanager.appcontainers.models.DaprMetadata; +import com.azure.resourcemanager.appcontainers.models.Secret; +import java.util.Arrays; + +/** Samples for ConnectedEnvironmentsDaprComponents CreateOrUpdate. */ +public final class ConnectedEnvironmentsDaprComponentsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_CreateOrUpdate.json + */ + /** + * 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() + .createOrUpdateWithResponse( + "examplerg", + "myenvironment", + "reddog", + new DaprComponentInner() + .withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecrets(Arrays.asList(new Secret().withName("masterkey").withValue("keyvalue"))) + .withMetadata( + Arrays + .asList( + new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("masterkey"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")), + Context.NONE); + } +} 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 new file mode 100644 index 000000000000..a69345b86f61 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsDeleteSamples.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; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsDaprComponents Delete. */ +public final class ConnectedEnvironmentsDaprComponentsDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Delete.json + */ + /** + * 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", 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 new file mode 100644 index 000000000000..d390a2855c97 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsGetSamples.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; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsDaprComponents Get. */ +public final class ConnectedEnvironmentsDaprComponentsGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_Get.json + */ + /** + * 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", 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 new file mode 100644 index 000000000000..128602c62d89 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsDaprComponents List. */ +public final class ConnectedEnvironmentsDaprComponentsListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_List.json + */ + /** + * 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", 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 new file mode 100644 index 000000000000..a61beb852670 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDaprComponentsListSecretsSamples.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; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsDaprComponents ListSecrets. */ +public final class ConnectedEnvironmentsDaprComponentsListSecretsSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsDaprComponents_ListSecrets.json + */ + /** + * 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", 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 new file mode 100644 index 000000000000..e9217065c241 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsDeleteSamples.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; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironments Delete. */ +public final class ConnectedEnvironmentsDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Delete.json + */ + /** + * 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", Context.NONE); + } +} 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 new file mode 100644 index 000000000000..a7d39482efc5 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsGetByResourceGroupSamples.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; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironments GetByResourceGroup. */ +public final class ConnectedEnvironmentsGetByResourceGroupSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Get.json + */ + /** + * 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", 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 new file mode 100644 index 000000000000..82cc091edcaa --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListByResourceGroupSamples.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; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironments ListByResourceGroup. */ +public final class ConnectedEnvironmentsListByResourceGroupSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_ListByResourceGroup.json + */ + /** + * 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", 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 new file mode 100644 index 000000000000..30f3f82abc13 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsListSamples.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; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironments List. */ +public final class ConnectedEnvironmentsListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_ListBySubscription.json + */ + /** + * 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(Context.NONE); + } +} 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 new file mode 100644 index 000000000000..48dd759809e9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesCreateOrUpdateSamples.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; + +import com.azure.resourcemanager.appcontainers.models.AccessMode; +import com.azure.resourcemanager.appcontainers.models.AzureFileProperties; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentStorageProperties; + +/** Samples for ConnectedEnvironmentsStorages CreateOrUpdate. */ +public final class ConnectedEnvironmentsStoragesCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_CreateOrUpdate.json + */ + /** + * Sample code: Create or update environments storage. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateEnvironmentsStorage( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .connectedEnvironmentsStorages() + .define("jlaw-demo1") + .withExistingConnectedEnvironment("examplerg", "env") + .withProperties( + new ConnectedEnvironmentStorageProperties() + .withAzureFile( + new AzureFileProperties() + .withAccountName("account1") + .withAccountKey("key") + .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 new file mode 100644 index 000000000000..3d32e15e66d4 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesDeleteSamples.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; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsStorages Delete. */ +public final class ConnectedEnvironmentsStoragesDeleteSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Delete.json + */ + /** + * 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", 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 new file mode 100644 index 000000000000..985b69a863c2 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesGetSamples.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; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsStorages Get. */ +public final class ConnectedEnvironmentsStoragesGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_Get.json + */ + /** + * 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", 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 new file mode 100644 index 000000000000..7bc9c5c70084 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsStoragesListSamples.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; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironmentsStorages List. */ +public final class ConnectedEnvironmentsStoragesListSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironmentsStorages_List.json + */ + /** + * 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", 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 new file mode 100644 index 000000000000..0ab238827263 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsUpdateSamples.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; + +import com.azure.core.util.Context; + +/** Samples for ConnectedEnvironments Update. */ +public final class ConnectedEnvironmentsUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ConnectedEnvironments_Patch.json + */ + /** + * 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", 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 ae3c05b4fcd2..2af3fe3a1f3d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsCreateOrUpdateSamples.java @@ -14,7 +14,7 @@ /** Samples for ContainerAppsAuthConfigs CreateOrUpdate. */ public final class ContainerAppsAuthConfigsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App AuthConfig. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java index 100de975abd0..02b1f78b7217 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsAuthConfigs Delete. */ public final class ContainerAppsAuthConfigsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Delete.json */ /** * Sample code: Delete Container App AuthConfig. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java index a3b229eab31e..eba01b17982f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsAuthConfigs Get. */ public final class ContainerAppsAuthConfigsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_Get.json */ /** * Sample code: Get Container App's AuthConfig. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java index 2e075bb0d1fc..5151311e9b5e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsAuthConfigsListByContainerAppSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsAuthConfigs ListByContainerApp. */ public final class ContainerAppsAuthConfigsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/AuthConfigs_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AuthConfigs_ListByContainer.json */ /** * Sample code: List Auth Configs by Container Apps. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsCreateOrUpdateSamples.java index 01f361f3f654..554cf82f8838 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 @@ -27,7 +27,7 @@ /** Samples for ContainerApps CreateOrUpdate. */ public final class ContainerAppsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App. @@ -41,7 +41,7 @@ public static void createOrUpdateContainerApp( .define("testcontainerApp0") .withRegion("East US") .withExistingResourceGroup("rg") - .withManagedEnvironmentId( + .withEnvironmentId( "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") .withConfiguration( new Configuration() @@ -69,7 +69,12 @@ public static void createOrUpdateContainerApp( .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")))) - .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000))) + .withDapr( + new Dapr() + .withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30))) .withTemplate( new Template() .withContainers( 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 bde6e97ea925..8add349fae66 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerApps Delete. */ public final class ContainerAppsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Delete.json */ /** * Sample code: Delete Container App. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java new file mode 100644 index 000000000000..33994d2b505a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetDetectorSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ContainerAppsDiagnostics GetDetector. */ +public final class ContainerAppsDiagnosticsGetDetectorSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_Get.json + */ + /** + * 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", 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 new file mode 100644 index 000000000000..e5c4a8156457 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRevisionSamples.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; + +import com.azure.core.util.Context; + +/** Samples for ContainerAppsDiagnostics GetRevision. */ +public final class ContainerAppsDiagnosticsGetRevisionSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json + */ + /** + * 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", 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 new file mode 100644 index 000000000000..e0c052a830ae --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsGetRootSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ContainerAppsDiagnostics GetRoot. */ +public final class ContainerAppsDiagnosticsGetRootSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json + */ + /** + * 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", 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 new file mode 100644 index 000000000000..94801afae727 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListDetectorsSamples.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; + +import com.azure.core.util.Context; + +/** Samples for ContainerAppsDiagnostics ListDetectors. */ +public final class ContainerAppsDiagnosticsListDetectorsSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerAppsDiagnostics_List.json + */ + /** + * 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", 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 new file mode 100644 index 000000000000..fecef91f927a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsDiagnosticsListRevisionsSamples.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; + +import com.azure.core.util.Context; + +/** Samples for ContainerAppsDiagnostics ListRevisions. */ +public final class ContainerAppsDiagnosticsListRevisionsSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json + */ + /** + * 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, 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 8c693e63ff7a..cd34f1b253fa 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerApps GetByResourceGroup. */ public final class ContainerAppsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Get.json */ /** * Sample code: Get Container App. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java index 5dce39d0e3fb..5d328c5b2fb4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerApps ListByResourceGroup. */ public final class ContainerAppsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListByResourceGroup.json */ /** * Sample code: List Container Apps by resource group. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java index a0f775c3c2b3..9a017f67da97 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListCustomHostnameAnalysisSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerApps ListCustomHostnameAnalysis. */ public final class ContainerAppsListCustomHostnameAnalysisSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListCustomHostNameAnalysis.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListCustomHostNameAnalysis.json */ /** * Sample code: Analyze Custom Hostname. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java index 6c5c0243b54a..d88568039981 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerApps List. */ public final class ContainerAppsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListBySubscription.json */ /** * Sample code: List Container Apps by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java index 40a50a752a6f..9a17fe1e8d4a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsListSecretsSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerApps ListSecrets. */ public final class ContainerAppsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java index 11bfc8009ce7..f61fd0c8c7ae 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasGetReplicaSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsRevisionReplicas GetReplica. */ public final class ContainerAppsRevisionReplicasGetReplicaSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Replicas_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_Get.json */ /** * Sample code: Get Container App's revision replica. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java index 630f2ae29868..d8dd9e3f9dd6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionReplicasListReplicasSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsRevisionReplicas ListReplicas. */ public final class ContainerAppsRevisionReplicasListReplicasSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Replicas_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Replicas_List.json */ /** * Sample code: List Container App's replicas. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java index 08235e1e1fc9..c874ecf8f9db 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsActivateRevisionSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsRevisions ActivateRevision. */ public final class ContainerAppsRevisionsActivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Activate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Activate.json */ /** * Sample code: Activate Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java index c15271d94791..a50104cc5545 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsDeactivateRevisionSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsRevisions DeactivateRevision. */ public final class ContainerAppsRevisionsDeactivateRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Deactivate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Deactivate.json */ /** * Sample code: Deactivate Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java index d8d564d91864..40770dc22e01 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsGetRevisionSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsRevisions GetRevision. */ public final class ContainerAppsRevisionsGetRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Get.json */ /** * Sample code: Get Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java index 5324581d5a8b..8b6e6137e0a5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsListRevisionsSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsRevisions ListRevisions. */ public final class ContainerAppsRevisionsListRevisionsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_List.json */ /** * Sample code: List Container App's revisions. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java index cc55c0c2db00..75ec2cca6581 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsRevisionsRestartRevisionSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsRevisions RestartRevision. */ public final class ContainerAppsRevisionsRestartRevisionSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Revisions_Restart.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Revisions_Restart.json */ /** * Sample code: Restart Container App's revision. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java index ab4193d13f6b..b22cf60e9378 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for ContainerAppsSourceControls CreateOrUpdate. */ public final class ContainerAppsSourceControlsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_CreateOrUpdate.json */ /** * Sample code: Create or Update Container App SourceControl. 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 6b809a4f2c7a..243a89a2b538 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsSourceControls Delete. */ public final class ContainerAppsSourceControlsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Delete.json */ /** * Sample code: Delete Container App SourceControl. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java index 83e817f9115b..c8e88ef5d8b3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsSourceControls Get. */ public final class ContainerAppsSourceControlsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_Get.json */ /** * Sample code: Get Container App's SourceControl. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java index aecbfe983746..ed84c27a47b4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsSourceControlsListByContainerAppSamples.java @@ -9,7 +9,7 @@ /** Samples for ContainerAppsSourceControls ListByContainerApp. */ public final class ContainerAppsSourceControlsListByContainerAppSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/SourceControls_ListByContainer.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/SourceControls_ListByContainer.json */ /** * Sample code: List App's Source Controls. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsUpdateSamples.java index 5c4c90935a88..1f29f75e0b3a 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 @@ -29,7 +29,7 @@ /** Samples for ContainerApps Update. */ public final class ContainerAppsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_Patch.json */ /** * Sample code: Patch Container App. @@ -71,7 +71,12 @@ public static void patchContainerApp(com.azure.resourcemanager.appcontainers.Con .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")))) - .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000))) + .withDapr( + new Dapr() + .withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30))) .withTemplate( new Template() .withContainers( 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 34a651567bca..3b8bd083dc96 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 @@ -11,7 +11,7 @@ /** Samples for DaprComponents CreateOrUpdate. */ public final class DaprComponentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate.json */ /** * Sample code: Create or update dapr component. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java index 1493afdd3344..b7da35a6649a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for DaprComponents Delete. */ public final class DaprComponentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Delete.json */ /** * Sample code: Delete dapr component. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java index 23dd68e6619f..16abc1caaca2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsGetSamples.java @@ -9,7 +9,7 @@ /** Samples for DaprComponents Get. */ public final class DaprComponentsGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get.json */ /** * Sample code: Get Dapr Component. 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 a2306a54f73b..722a171a9c77 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java @@ -9,7 +9,7 @@ /** Samples for DaprComponents List. */ public final class DaprComponentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_List.json */ /** * Sample code: List Dapr Components. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java index e8a47ef3f268..f301616014ca 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSecretsSamples.java @@ -9,7 +9,7 @@ /** Samples for DaprComponents ListSecrets. */ public final class DaprComponentsListSecretsSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/DaprComponents_ListSecrets.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_ListSecrets.json */ /** * Sample code: List Container Apps Secrets. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java new file mode 100644 index 000000000000..8f468b00f2e5 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsGetDetectorSamples.java @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ManagedEnvironmentDiagnostics GetDetector. */ +public final class ManagedEnvironmentDiagnosticsGetDetectorSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_Get.json + */ + /** + * 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", 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 new file mode 100644 index 000000000000..a85c61336f73 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentDiagnosticsListDetectorsSamples.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; + +import com.azure.core.util.Context; + +/** Samples for ManagedEnvironmentDiagnostics ListDetectors. */ +public final class ManagedEnvironmentDiagnosticsListDetectorsSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentDiagnostics_List.json + */ + /** + * 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", 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 6fd91f9b1cca..3b625a927329 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 @@ -10,7 +10,7 @@ /** Samples for ManagedEnvironments CreateOrUpdate. */ public final class ManagedEnvironmentsCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_CreateOrUpdate.json */ /** * Sample code: Create environments. 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 607d4c44bb7d..4166699a9962 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for ManagedEnvironments Delete. */ public final class ManagedEnvironmentsDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Delete.json */ /** * Sample code: Delete environment by name. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java new file mode 100644 index 000000000000..efb4da6fedf3 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDiagnosticsGetRootSamples.java @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.generated; + +import com.azure.core.util.Context; + +/** Samples for ManagedEnvironmentsDiagnostics GetRoot. */ +public final class ManagedEnvironmentsDiagnosticsGetRootSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json + */ + /** + * 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", 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 dafccc1ccd56..de387050cbce 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for ManagedEnvironments GetByResourceGroup. */ public final class ManagedEnvironmentsGetByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Get.json */ /** * Sample code: Get environments by name. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java index d5cc68e7ea40..56733c8475f4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListByResourceGroupSamples.java @@ -9,7 +9,7 @@ /** Samples for ManagedEnvironments ListByResourceGroup. */ public final class ManagedEnvironmentsListByResourceGroupSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_ListByResourceGroup.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListByResourceGroup.json */ /** * Sample code: List environments by resource group. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java index f33c68f8b9a5..fb5a7e7e2aaf 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListSamples.java @@ -9,7 +9,7 @@ /** Samples for ManagedEnvironments List. */ public final class ManagedEnvironmentsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_ListBySubscription.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListBySubscription.json */ /** * Sample code: List environments by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java index df8dad2f9675..3bef9aeafacd 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java @@ -11,7 +11,7 @@ /** Samples for ManagedEnvironmentsStorages CreateOrUpdate. */ public final class ManagedEnvironmentsStoragesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_CreateOrUpdate.json */ /** * Sample code: Create or update environments storage. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java index bd34d5966e2d..042571857672 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesDeleteSamples.java @@ -9,7 +9,7 @@ /** Samples for ManagedEnvironmentsStorages Delete. */ public final class ManagedEnvironmentsStoragesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_Delete.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Delete.json */ /** * Sample code: List environments storages by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java index f0493b5be2bf..923f94843e83 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesGetSamples.java @@ -9,7 +9,7 @@ /** Samples for ManagedEnvironmentsStorages Get. */ public final class ManagedEnvironmentsStoragesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_Get.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_Get.json */ /** * Sample code: get a environments storage properties by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java index 41c79218d077..10f08f791fee 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesListSamples.java @@ -9,7 +9,7 @@ /** Samples for ManagedEnvironmentsStorages List. */ public final class ManagedEnvironmentsStoragesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironmentsStorages_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironmentsStorages_List.json */ /** * Sample code: List environments storages by subscription. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsUpdateSamples.java index e0d5de098a3a..99932fc462a6 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 @@ -12,7 +12,7 @@ /** Samples for ManagedEnvironments Update. */ public final class ManagedEnvironmentsUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ManagedEnvironments_Patch.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_Patch.json */ /** * Sample code: Patch Managed Environment. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java index 353367eeff1a..9fe9d81cd386 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/NamespacesCheckNameAvailabilitySamples.java @@ -10,7 +10,7 @@ /** Samples for Namespaces CheckNameAvailability. */ public final class NamespacesCheckNameAvailabilitySamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Certificates_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Certificates_CheckNameAvailability.json */ /** * Sample code: Certificates_CheckNameAvailability. @@ -31,7 +31,7 @@ public static void certificatesCheckNameAvailability( } /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/ContainerApps_CheckNameAvailability.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CheckNameAvailability.json */ /** * Sample code: ContainerApps_CheckNameAvailability. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java index 93c196bea0eb..41eb1cd667b7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/OperationsListSamples.java @@ -9,7 +9,7 @@ /** Samples for Operations List. */ public final class OperationsListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/stable/2022-03-01/examples/Operations_List.json + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/Operations_List.json */ /** * Sample code: List all operations.