diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md b/sdk/appcontainers/azure-resourcemanager-appcontainers/CHANGELOG.md index 60c849290ef0..1f2149eabe2e 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-10-10) + +- 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..a72d4197cf51 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/SAMPLE.md @@ -1,6 +1,14 @@ # Code snippets and samples +## AvailableWorkloadProfiles + +- [Get](#availableworkloadprofiles_get) + +## BillingMeters + +- [Get](#billingmeters_get) + ## Certificates - [CreateOrUpdate](#certificates_createorupdate) @@ -9,10 +17,44 @@ - [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) - [Delete](#containerapps_delete) +- [GetAuthToken](#containerapps_getauthtoken) - [GetByResourceGroup](#containerapps_getbyresourcegroup) - [List](#containerapps_list) - [ListByResourceGroup](#containerapps_listbyresourcegroup) @@ -27,6 +69,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,15 +105,26 @@ - [List](#daprcomponents_list) - [ListSecrets](#daprcomponents_listsecrets) +## ManagedEnvironmentDiagnostics + +- [GetDetector](#managedenvironmentdiagnostics_getdetector) +- [ListDetectors](#managedenvironmentdiagnostics_listdetectors) + ## ManagedEnvironments - [CreateOrUpdate](#managedenvironments_createorupdate) - [Delete](#managedenvironments_delete) +- [GetAuthToken](#managedenvironments_getauthtoken) - [GetByResourceGroup](#managedenvironments_getbyresourcegroup) - [List](#managedenvironments_list) - [ListByResourceGroup](#managedenvironments_listbyresourcegroup) +- [ListWorkloadProfileStates](#managedenvironments_listworkloadprofilestates) - [Update](#managedenvironments_update) +## ManagedEnvironmentsDiagnostics + +- [GetRoot](#managedenvironmentsdiagnostics_getroot) + ## ManagedEnvironmentsStorages - [CreateOrUpdate](#managedenvironmentsstorages_createorupdate) @@ -78,6 +139,48 @@ ## Operations - [List](#operations_list) +### AvailableWorkloadProfiles_Get + +```java +import com.azure.core.util.Context; + +/** Samples for AvailableWorkloadProfiles Get. */ +public final class AvailableWorkloadProfilesGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AvailableWorkloadProfiles_Get.json + */ + /** + * Sample code: BillingMeters_Get. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void billingMetersGet(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.availableWorkloadProfiles().get("East US", Context.NONE); + } +} +``` + +### BillingMeters_Get + +```java +import com.azure.core.util.Context; + +/** Samples for BillingMeters Get. */ +public final class BillingMetersGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/BillingMeters_Get.json + */ + /** + * Sample code: BillingMeters_Get. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void billingMetersGet(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.billingMeters().getWithResponse("East US", Context.NONE); + } +} +``` + ### Certificates_CreateOrUpdate ```java @@ -86,7 +189,7 @@ import com.azure.resourcemanager.appcontainers.models.CertificateProperties; /** Samples for Certificates CreateOrUpdate. */ public final class CertificatesCreateOrUpdateSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/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. @@ -117,7 +220,7 @@ import com.azure.core.util.Context; /** Samples for Certificates Delete. */ public final class CertificatesDeleteSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/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. @@ -140,7 +243,7 @@ import com.azure.core.util.Context; /** Samples for Certificates Get. */ public final class CertificatesGetSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/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. @@ -163,7 +266,7 @@ import com.azure.core.util.Context; /** Samples for Certificates List. */ public final class CertificatesListSamples { /* - * x-ms-original-file: specification/app/resource-manager/Microsoft.App/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. @@ -188,7 +291,7 @@ import java.util.Map; /** 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. @@ -217,99 +320,763 @@ public final class CertificatesUpdateSamples { } ``` -### ContainerApps_CreateOrUpdate +### ConnectedEnvironments_CheckNameAvailability ```java -import com.azure.resourcemanager.appcontainers.models.AppProtocol; -import com.azure.resourcemanager.appcontainers.models.BindingType; -import com.azure.resourcemanager.appcontainers.models.Configuration; -import com.azure.resourcemanager.appcontainers.models.Container; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; -import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; -import com.azure.resourcemanager.appcontainers.models.CustomDomain; -import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; -import com.azure.resourcemanager.appcontainers.models.Dapr; -import com.azure.resourcemanager.appcontainers.models.Ingress; -import com.azure.resourcemanager.appcontainers.models.Scale; -import com.azure.resourcemanager.appcontainers.models.ScaleRule; -import com.azure.resourcemanager.appcontainers.models.Template; -import com.azure.resourcemanager.appcontainers.models.TrafficWeight; -import com.azure.resourcemanager.appcontainers.models.Type; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.models.CheckNameAvailabilityRequest; -/** Samples for ContainerApps CreateOrUpdate. */ -public final class ContainerAppsCreateOrUpdateSamples { +/** Samples for ConnectedEnvironments CheckNameAvailability. */ +public final class ConnectedEnvironmentsCheckNameAvailabilitySamples { /* - * 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/ConnectedEnvironmentsCertificates_CheckNameAvailability.json */ /** - * Sample code: Create or Update Container App. + * Sample code: Certificates_CheckNameAvailability. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateContainerApp( + public static void certificatesCheckNameAvailability( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager - .containerApps() - .define("testcontainerApp0") + .connectedEnvironments() + .checkNameAvailabilityWithResponse( + "examplerg", + "testcontainerenv", + new CheckNameAvailabilityRequest() + .withName("testcertificatename") + .withType("Microsoft.App/connectedEnvironments/certificates"), + Context.NONE); + } +} +``` + +### ConnectedEnvironments_CreateOrUpdate + +```java +import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; + +/** Samples for ConnectedEnvironments CreateOrUpdate. */ +public final class ConnectedEnvironmentsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-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("rg") - .withManagedEnvironmentId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") - .withConfiguration( - new Configuration() - .withIngress( - new Ingress() - .withExternal(true) - .withTargetPort(3000) - .withTraffic( - Arrays - .asList( - new TrafficWeight() - .withRevisionName("testcontainerApp0-ab1234") - .withWeight(100) - .withLabel("production"))) - .withCustomDomains( + .withExistingResourceGroup("examplerg") + .withStaticIp("1.2.3.4") + .withDaprAIConnectionString( + "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") + .withCustomDomainConfiguration( + new CustomDomainConfiguration() + .withDnsSuffix("www.my-name.com") + .withCertificateValue("PFX-or-PEM-blob".getBytes()) + .withCertificatePassword("private key password".getBytes())) + .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 + +```java +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); + } +} +``` + +### ConnectedEnvironmentsDaprComponents_List + +```java +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); + } +} +``` + +### ConnectedEnvironmentsDaprComponents_ListSecrets + +```java +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); + } +} +``` + +### ConnectedEnvironmentsStorages_CreateOrUpdate + +```java +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(); + } +} +``` + +### ConnectedEnvironmentsStorages_Delete + +```java +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); + } +} +``` + +### ConnectedEnvironmentsStorages_Get + +```java +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); + } +} +``` + +### ConnectedEnvironmentsStorages_List + +```java +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); + } +} +``` + +### ContainerApps_CreateOrUpdate + +```java +import com.azure.resourcemanager.appcontainers.models.Action; +import com.azure.resourcemanager.appcontainers.models.AppProtocol; +import com.azure.resourcemanager.appcontainers.models.BindingType; +import com.azure.resourcemanager.appcontainers.models.Configuration; +import com.azure.resourcemanager.appcontainers.models.Container; +import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; +import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; +import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; +import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; +import com.azure.resourcemanager.appcontainers.models.ContainerResources; +import com.azure.resourcemanager.appcontainers.models.CustomDomain; +import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; +import com.azure.resourcemanager.appcontainers.models.Dapr; +import com.azure.resourcemanager.appcontainers.models.Ingress; +import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; +import com.azure.resourcemanager.appcontainers.models.InitContainer; +import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; +import com.azure.resourcemanager.appcontainers.models.LogLevel; +import com.azure.resourcemanager.appcontainers.models.Scale; +import com.azure.resourcemanager.appcontainers.models.ScaleRule; +import com.azure.resourcemanager.appcontainers.models.TcpScaleRule; +import com.azure.resourcemanager.appcontainers.models.Template; +import com.azure.resourcemanager.appcontainers.models.TrafficWeight; +import com.azure.resourcemanager.appcontainers.models.Type; +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; + +/** Samples for ContainerApps CreateOrUpdate. */ +public final class ContainerAppsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update Container App. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateContainerApp( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .containerApps() + .define("testcontainerApp0") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") + .withWorkloadProfileType("GeneralPurpose") + .withConfiguration( + new Configuration() + .withIngress( + new Ingress() + .withExternal(true) + .withTargetPort(3000) + .withTraffic( + Arrays + .asList( + new TrafficWeight() + .withRevisionName("testcontainerApp0-ab1234") + .withWeight(100) + .withLabel("production"))) + .withCustomDomains( + Arrays + .asList( + new CustomDomain() + .withName("www.my-name.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), + new CustomDomain() + .withName("www.my-other-name.com") + .withBindingType(BindingType.SNI_ENABLED) + .withCertificateId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions( + Arrays + .asList( + new IpSecurityRestrictionRule() + .withName("Allow work IP A subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/32") + .withAction(Action.ALLOW), + new IpSecurityRestrictionRule() + .withName("Allow work IP B subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/8") + .withAction(Action.ALLOW)))) + .withDapr( + new Dapr() + .withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30) + .withHttpMaxRequestSize(10) + .withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withMaxInactiveRevisions(10)) + .withTemplate( + new Template() + .withInitContainers( + Arrays + .asList( + new InitContainer() + .withImage("repo/testcontainerApp0:v4") + .withName("testinitcontainerApp0") + .withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) + .withContainers( + Arrays + .asList( + new Container() + .withImage("repo/testcontainerApp0:v1") + .withName("testcontainerApp0") + .withProbes( + Arrays + .asList( + new ContainerAppProbe() + .withHttpGet( + new ContainerAppProbeHttpGet() + .withHttpHeaders( + Arrays + .asList( + new ContainerAppProbeHttpGetHttpHeadersItem() + .withName("Custom-Header") + .withValue("Awesome"))) + .withPath("/health") + .withPort(8080)) + .withInitialDelaySeconds(3) + .withPeriodSeconds(3) + .withType(Type.LIVENESS))))) + .withScale( + new Scale() + .withMinReplicas(1) + .withMaxReplicas(5) + .withRules( + Arrays + .asList( + new ScaleRule() + .withName("httpscalingrule") + .withCustom( + new CustomScaleRule() + .withType("http") + .withMetadata(mapOf("concurrentRequests", "50"))))))) + .create(); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update Tcp App. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateTcpApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .containerApps() + .define("testcontainerAppTcp") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") + .withConfiguration( + new Configuration() + .withIngress( + new Ingress() + .withExternal(true) + .withTargetPort(3000) + .withExposedPort(4000) + .withTransport(IngressTransportMethod.TCP) + .withTraffic( Arrays .asList( - new CustomDomain() - .withName("www.my-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-name-dot-com"), - new CustomDomain() - .withName("www.my-other-name.com") - .withBindingType(BindingType.SNI_ENABLED) - .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com")))) - .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000))) + new TrafficWeight() + .withRevisionName("testcontainerAppTcp-ab1234") + .withWeight(100))))) .withTemplate( new Template() .withContainers( Arrays .asList( new Container() - .withImage("repo/testcontainerApp0:v1") - .withName("testcontainerApp0") + .withImage("repo/testcontainerAppTcp:v1") + .withName("testcontainerAppTcp") .withProbes( Arrays .asList( new ContainerAppProbe() - .withHttpGet( - new ContainerAppProbeHttpGet() - .withHttpHeaders( - Arrays - .asList( - new ContainerAppProbeHttpGetHttpHeadersItem() - .withName("Custom-Header") - .withValue("Awesome"))) - .withPath("/health") - .withPort(8080)) .withInitialDelaySeconds(3) .withPeriodSeconds(3) + .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)) .withType(Type.LIVENESS))))) .withScale( new Scale() @@ -319,11 +1086,10 @@ public final class ContainerAppsCreateOrUpdateSamples { Arrays .asList( new ScaleRule() - .withName("httpscalingrule") - .withCustom( - new CustomScaleRule() - .withType("http") - .withMetadata(mapOf("concurrentRequests", "50"))))))) + .withName("tcpscalingrule") + .withTcp( + new TcpScaleRule() + .withMetadata(mapOf("concurrentConnections", "50"))))))) .create(); } @@ -348,7 +1114,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. @@ -361,6 +1127,28 @@ public final class ContainerAppsDeleteSamples { } ``` +### ContainerApps_GetAuthToken + +```java +import com.azure.core.util.Context; + +/** Samples for ContainerApps GetAuthToken. */ +public final class ContainerAppsGetAuthTokenSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_GetAuthToken.json + */ + /** + * Sample code: Get Container App Auth Token. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getContainerAppAuthToken( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().getAuthTokenWithResponse("rg", "testcontainerApp0", Context.NONE); + } +} +``` + ### ContainerApps_GetByResourceGroup ```java @@ -369,7 +1157,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 +1178,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 +1200,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 +1222,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 +1245,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. @@ -476,6 +1264,7 @@ public final class ContainerAppsListSecretsSamples { ```java import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; +import com.azure.resourcemanager.appcontainers.models.Action; import com.azure.resourcemanager.appcontainers.models.AppProtocol; import com.azure.resourcemanager.appcontainers.models.BindingType; import com.azure.resourcemanager.appcontainers.models.Configuration; @@ -483,10 +1272,14 @@ import com.azure.resourcemanager.appcontainers.models.Container; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; +import com.azure.resourcemanager.appcontainers.models.ContainerResources; import com.azure.resourcemanager.appcontainers.models.CustomDomain; import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; import com.azure.resourcemanager.appcontainers.models.Dapr; import com.azure.resourcemanager.appcontainers.models.Ingress; +import com.azure.resourcemanager.appcontainers.models.InitContainer; +import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; +import com.azure.resourcemanager.appcontainers.models.LogLevel; import com.azure.resourcemanager.appcontainers.models.Scale; import com.azure.resourcemanager.appcontainers.models.ScaleRule; import com.azure.resourcemanager.appcontainers.models.Template; @@ -499,7 +1292,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. @@ -540,10 +1333,43 @@ public final class ContainerAppsUpdateSamples { .withName("www.my-other-name.com") .withBindingType(BindingType.SNI_ENABLED) .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com")))) - .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000))) + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions( + Arrays + .asList( + new IpSecurityRestrictionRule() + .withName("Allow work IP A subnet") + .withDescription( + "Allowing all IP's within the subnet below to access" + + " containerapp") + .withIpAddressRange("192.168.1.1/32") + .withAction(Action.ALLOW), + new IpSecurityRestrictionRule() + .withName("Allow work IP B subnet") + .withDescription( + "Allowing all IP's within the subnet below to access" + + " containerapp") + .withIpAddressRange("192.168.1.1/8") + .withAction(Action.ALLOW)))) + .withDapr( + new Dapr() + .withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30) + .withHttpMaxRequestSize(10) + .withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withMaxInactiveRevisions(10)) .withTemplate( new Template() + .withInitContainers( + Arrays + .asList( + new InitContainer() + .withImage("repo/testcontainerApp0:v4") + .withName("testinitcontainerApp0") + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) .withContainers( Arrays .asList( @@ -609,7 +1435,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 +1470,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 +1494,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 +1518,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 +1532,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 +1656,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 +1681,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 +1705,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 +1729,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 +1753,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 +1777,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 +1799,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 +1825,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 +1867,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 +1889,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 +1913,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,14 +1936,14 @@ 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_Secrets.json */ /** - * Sample code: Create or update dapr component. + * Sample code: Create or update dapr component with secrets. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateDaprComponent( + public static void createOrUpdateDaprComponentWithSecrets( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .daprComponents() @@ -1022,6 +1964,36 @@ public final class DaprComponentsCreateOrUpdateSamples { .withScopes(Arrays.asList("container-app-1", "container-app-2")) .create(); } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json + */ + /** + * Sample code: Create or update dapr component with secret store component. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateDaprComponentWithSecretStoreComponent( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .daprComponents() + .define("reddog") + .withExistingManagedEnvironment("examplerg", "myenvironment") + .withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecretStoreComponent("my-secret-store") + .withMetadata( + Arrays + .asList( + new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("masterkey"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .create(); + } } ``` @@ -1033,7 +2005,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,14 +2026,28 @@ 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_SecretStoreComponent.json */ /** - * Sample code: Get Dapr Component. + * Sample code: Get Dapr Component with secret store component. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void getDaprComponentWithSecretStoreComponent( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponents().getWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_Secrets.json + */ + /** + * Sample code: Get Dapr Component with secrets. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getDaprComponentWithSecrets( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.daprComponents().getWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); } } @@ -1075,7 +2061,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 +2082,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,16 +2096,73 @@ 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 import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; +import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; +import com.azure.resourcemanager.appcontainers.models.EnvironmentSkuProperties; import com.azure.resourcemanager.appcontainers.models.LogAnalyticsConfiguration; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentOutBoundType; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentOutboundSettings; +import com.azure.resourcemanager.appcontainers.models.SkuName; +import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; +import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; +import java.util.Arrays; /** 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. @@ -1132,13 +2175,40 @@ public final class ManagedEnvironmentsCreateOrUpdateSamples { .define("testcontainerenv") .withRegion("East US") .withExistingResourceGroup("examplerg") + .withSku(new EnvironmentSkuProperties().withName(SkuName.PREMIUM)) .withDaprAIConnectionString( "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") + .withVnetConfiguration( + new VnetConfiguration() + .withOutboundSettings( + new ManagedEnvironmentOutboundSettings() + .withOutBoundType(ManagedEnvironmentOutBoundType.USER_DEFINED_ROUTING) + .withVirtualNetworkApplianceIp("192.168.1.20"))) .withAppLogsConfiguration( new AppLogsConfiguration() .withLogAnalyticsConfiguration( new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("string"))) .withZoneRedundant(true) + .withCustomDomainConfiguration( + new CustomDomainConfiguration() + .withDnsSuffix("www.my-name.com") + .withCertificateValue("PFX-or-PEM-blob".getBytes()) + .withCertificatePassword("private key password".getBytes())) + .withWorkloadProfiles( + Arrays + .asList( + new WorkloadProfile() + .withWorkloadProfileType("GeneralPurpose") + .withMinimumCount(3) + .withMaximumCount(12), + new WorkloadProfile() + .withWorkloadProfileType("MemoryOptimized") + .withMinimumCount(3) + .withMaximumCount(6), + new WorkloadProfile() + .withWorkloadProfileType("ComputeOptimized") + .withMinimumCount(3) + .withMaximumCount(6))) .create(); } } @@ -1152,7 +2222,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. @@ -1166,6 +2236,28 @@ public final class ManagedEnvironmentsDeleteSamples { } ``` +### ManagedEnvironments_GetAuthToken + +```java +import com.azure.core.util.Context; + +/** Samples for ManagedEnvironments GetAuthToken. */ +public final class ManagedEnvironmentsGetAuthTokenSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_GetAuthToken.json + */ + /** + * Sample code: Get Managed Environment Auth Token. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getManagedEnvironmentAuthToken( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironments().getAuthTokenWithResponse("rg", "testenv", Context.NONE); + } +} +``` + ### ManagedEnvironments_GetByResourceGroup ```java @@ -1174,7 +2266,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 +2287,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 +2309,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. @@ -1231,6 +2323,28 @@ public final class ManagedEnvironmentsListByResourceGroupSamples { } ``` +### ManagedEnvironments_ListWorkloadProfileStates + +```java +import com.azure.core.util.Context; + +/** Samples for ManagedEnvironments ListWorkloadProfileStates. */ +public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json + */ + /** + * Sample code: List environments by subscription. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listEnvironmentsBySubscription( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironments().listWorkloadProfileStates("examplerg", "jlaw-demo1", Context.NONE); + } +} +``` + ### ManagedEnvironments_Update ```java @@ -1242,7 +2356,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 +2389,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 +2420,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 +2454,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 +2476,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 +2498,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 +2521,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 +2542,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 +2570,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 e4c85058ec22..0da5a8e97343 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..702efa58f7df 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/ContainerAppsApiManager.java @@ -24,26 +24,44 @@ import com.azure.core.util.Configuration; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsApiClient; +import com.azure.resourcemanager.appcontainers.implementation.AvailableWorkloadProfilesImpl; +import com.azure.resourcemanager.appcontainers.implementation.BillingMetersImpl; 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.AvailableWorkloadProfiles; +import com.azure.resourcemanager.appcontainers.models.BillingMeters; 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 +84,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 +102,18 @@ public final class ContainerAppsApiManager { private ContainerAppsSourceControls containerAppsSourceControls; + private ConnectedEnvironments connectedEnvironments; + + private ConnectedEnvironmentsCertificates connectedEnvironmentsCertificates; + + private ConnectedEnvironmentsDaprComponents connectedEnvironmentsDaprComponents; + + private ConnectedEnvironmentsStorages connectedEnvironmentsStorages; + + private AvailableWorkloadProfiles availableWorkloadProfiles; + + private BillingMeters billingMeters; + private final ContainerAppsApiClient clientObject; private ContainerAppsApiManager(HttpPipeline httpPipeline, AzureProfile profile, Duration defaultPollInterval) { @@ -243,7 +279,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 +399,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 +512,83 @@ public ContainerAppsSourceControls containerAppsSourceControls() { return containerAppsSourceControls; } + /** + * Gets the resource collection API of ConnectedEnvironments. It manages ConnectedEnvironment. + * + * @return Resource collection API of ConnectedEnvironments. + */ + public ConnectedEnvironments connectedEnvironments() { + if (this.connectedEnvironments == null) { + this.connectedEnvironments = new ConnectedEnvironmentsImpl(clientObject.getConnectedEnvironments(), this); + } + return connectedEnvironments; + } + + /** + * Gets the resource collection API of ConnectedEnvironmentsCertificates. + * + * @return Resource collection API of ConnectedEnvironmentsCertificates. + */ + public ConnectedEnvironmentsCertificates connectedEnvironmentsCertificates() { + if (this.connectedEnvironmentsCertificates == null) { + this.connectedEnvironmentsCertificates = + new ConnectedEnvironmentsCertificatesImpl(clientObject.getConnectedEnvironmentsCertificates(), this); + } + return connectedEnvironmentsCertificates; + } + + /** + * Gets the resource collection API of ConnectedEnvironmentsDaprComponents. + * + * @return Resource collection API of ConnectedEnvironmentsDaprComponents. + */ + public ConnectedEnvironmentsDaprComponents connectedEnvironmentsDaprComponents() { + if (this.connectedEnvironmentsDaprComponents == null) { + this.connectedEnvironmentsDaprComponents = + new ConnectedEnvironmentsDaprComponentsImpl( + clientObject.getConnectedEnvironmentsDaprComponents(), this); + } + return connectedEnvironmentsDaprComponents; + } + + /** + * Gets the resource collection API of ConnectedEnvironmentsStorages. It manages ConnectedEnvironmentStorage. + * + * @return Resource collection API of ConnectedEnvironmentsStorages. + */ + public ConnectedEnvironmentsStorages connectedEnvironmentsStorages() { + if (this.connectedEnvironmentsStorages == null) { + this.connectedEnvironmentsStorages = + new ConnectedEnvironmentsStoragesImpl(clientObject.getConnectedEnvironmentsStorages(), this); + } + return connectedEnvironmentsStorages; + } + + /** + * Gets the resource collection API of AvailableWorkloadProfiles. + * + * @return Resource collection API of AvailableWorkloadProfiles. + */ + public AvailableWorkloadProfiles availableWorkloadProfiles() { + if (this.availableWorkloadProfiles == null) { + this.availableWorkloadProfiles = + new AvailableWorkloadProfilesImpl(clientObject.getAvailableWorkloadProfiles(), this); + } + return availableWorkloadProfiles; + } + + /** + * Gets the resource collection API of BillingMeters. + * + * @return Resource collection API of BillingMeters. + */ + public BillingMeters billingMeters() { + if (this.billingMeters == null) { + this.billingMeters = new BillingMetersImpl(clientObject.getBillingMeters(), this); + } + return billingMeters; + } + /** * @return Wrapped service client ContainerAppsApiClient providing direct access to the underlying auto-generated * API implementation, based on Azure REST API. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/AvailableWorkloadProfilesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/AvailableWorkloadProfilesClient.java new file mode 100644 index 000000000000..1c4ae5157f86 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/AvailableWorkloadProfilesClient.java @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; + +/** An instance of this class provides access to all the operations defined in AvailableWorkloadProfilesClient. */ +public interface AvailableWorkloadProfilesClient { + /** + * Get available workload profiles by location. + * + *

Get all available workload profiles for a location. + * + * @param location The name of Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all available workload profiles for a location as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable get(String location); + + /** + * Get available workload profiles by location. + * + *

Get all available workload profiles for a location. + * + * @param location The name of Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 all available workload profiles for a location as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable get(String location, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BillingMetersClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BillingMetersClient.java new file mode 100644 index 000000000000..b6877f2b5e11 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/BillingMetersClient.java @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent; + +import com.azure.core.annotation.ReturnType; +import com.azure.core.annotation.ServiceMethod; +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; +import com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner; + +/** An instance of this class provides access to all the operations defined in BillingMetersClient. */ +public interface BillingMetersClient { + /** + * Get billing meters by location. + * + *

Get all billingMeters for a location. + * + * @param location The name of Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all billingMeters for a location along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response getWithResponse(String location, Context context); + + /** + * Get billing meters by location. + * + *

Get all billingMeters for a location. + * + * @param location The name of Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all billingMeters for a location. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + BillingMeterCollectionInner get(String location); +} 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..1e66f7dd0665 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 @@ -43,21 +43,6 @@ public interface CertificatesClient { @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable list(String resourceGroupName, String environmentName, Context context); - /** - * Get the specified Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. - * @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 environmentName, String certificateName); - /** * Get the specified Certificate. * @@ -76,7 +61,7 @@ Response getWithResponse( String resourceGroupName, String environmentName, String certificateName, Context context); /** - * Create or Update a Certificate. + * Get the specified Certificate. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. @@ -85,10 +70,10 @@ Response getWithResponse( * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. + * @return the specified Certificate. */ @ServiceMethod(returns = ReturnType.SINGLE) - CertificateInner createOrUpdate(String resourceGroupName, String environmentName, String certificateName); + CertificateInner get(String resourceGroupName, String environmentName, String certificateName); /** * Create or Update a Certificate. @@ -114,7 +99,7 @@ Response createOrUpdateWithResponse( Context context); /** - * Deletes the specified Certificate. + * Create or Update a Certificate. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. @@ -123,9 +108,10 @@ Response createOrUpdateWithResponse( * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String environmentName, String certificateName); + CertificateInner createOrUpdate(String resourceGroupName, String environmentName, String certificateName); /** * Deletes the specified Certificate. @@ -145,24 +131,23 @@ Response deleteWithResponse( String resourceGroupName, String environmentName, String certificateName, Context context); /** - * Patches a certificate. Currently only patching of tags is supported. + * Deletes the specified Certificate. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param certificateName Name of the Certificate. - * @param certificateEnvelope Properties of a certificate that need to be updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. */ @ServiceMethod(returns = ReturnType.SINGLE) - CertificateInner update( - String resourceGroupName, String environmentName, String certificateName, CertificatePatch certificateEnvelope); + void delete(String resourceGroupName, String environmentName, String certificateName); /** - * 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. @@ -183,4 +168,23 @@ Response updateWithResponse( String certificateName, CertificatePatch certificateEnvelope, 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 environmentName Name of the Managed Environment. + * @param certificateName Name of the Certificate. + * @param certificateEnvelope Properties of a certificate that need to be updated. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + CertificateInner update( + String resourceGroupName, String environmentName, String certificateName, CertificatePatch certificateEnvelope); } 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..3924eac328c3 --- /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. + * @param context The context to associate with this 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); +} 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..efa280c81bfa --- /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. + * @param context The context to associate with this 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); + + /** + * 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); + + /** + * 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. + * @param context The context to associate with this 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); +} 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..f137979cc9f8 --- /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. + * @param context The context to associate with this 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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 for ListSecrets Action along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listSecretsWithResponse( + String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); + + /** + * List secrets for a dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr component Secrets Collection for ListSecrets Action. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + DaprSecretsCollectionInner listSecrets( + String resourceGroupName, String connectedEnvironmentName, String componentName); +} 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..2718921f835d --- /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. + * @param context The context to associate with this 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 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 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); +} 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..b7f2855529f3 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,46 @@ public interface ContainerAppsApiClient { * @return the ContainerAppsSourceControlsClient object. */ ContainerAppsSourceControlsClient getContainerAppsSourceControls(); + + /** + * Gets the ConnectedEnvironmentsClient object to access its operations. + * + * @return the ConnectedEnvironmentsClient object. + */ + ConnectedEnvironmentsClient getConnectedEnvironments(); + + /** + * Gets the ConnectedEnvironmentsCertificatesClient object to access its operations. + * + * @return the ConnectedEnvironmentsCertificatesClient object. + */ + ConnectedEnvironmentsCertificatesClient getConnectedEnvironmentsCertificates(); + + /** + * Gets the ConnectedEnvironmentsDaprComponentsClient object to access its operations. + * + * @return the ConnectedEnvironmentsDaprComponentsClient object. + */ + ConnectedEnvironmentsDaprComponentsClient getConnectedEnvironmentsDaprComponents(); + + /** + * Gets the ConnectedEnvironmentsStoragesClient object to access its operations. + * + * @return the ConnectedEnvironmentsStoragesClient object. + */ + ConnectedEnvironmentsStoragesClient getConnectedEnvironmentsStorages(); + + /** + * Gets the AvailableWorkloadProfilesClient object to access its operations. + * + * @return the AvailableWorkloadProfilesClient object. + */ + AvailableWorkloadProfilesClient getAvailableWorkloadProfiles(); + + /** + * Gets the BillingMetersClient object to access its operations. + * + * @return the BillingMetersClient object. + */ + BillingMetersClient getBillingMeters(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsAuthConfigsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsAuthConfigsClient.java index 678a87d3ac7c..9b742d9945c5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsAuthConfigsClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsAuthConfigsClient.java @@ -43,21 +43,6 @@ public interface ContainerAppsAuthConfigsClient { PagedIterable listByContainerApp( String resourceGroupName, String containerAppName, Context context); - /** - * Get a AuthConfig of a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param authConfigName Name of the Container App AuthConfig. - * @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 AuthConfig of a Container App. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - AuthConfigInner get(String resourceGroupName, String containerAppName, String authConfigName); - /** * Get a AuthConfig of a Container App. * @@ -76,21 +61,19 @@ Response getWithResponse( String resourceGroupName, String containerAppName, String authConfigName, Context context); /** - * Create or update the AuthConfig for a Container App. + * Get a AuthConfig of a Container App. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. - * @param authConfigEnvelope Properties used to create a Container App AuthConfig. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration settings for the Azure ContainerApp Service Authentication / Authorization feature. + * @return a AuthConfig of a Container App. */ @ServiceMethod(returns = ReturnType.SINGLE) - AuthConfigInner createOrUpdate( - String resourceGroupName, String containerAppName, String authConfigName, AuthConfigInner authConfigEnvelope); + AuthConfigInner get(String resourceGroupName, String containerAppName, String authConfigName); /** * Create or update the AuthConfig for a Container App. @@ -116,18 +99,21 @@ Response createOrUpdateWithResponse( Context context); /** - * Delete a Container App AuthConfig. + * Create or update the AuthConfig for a Container App. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. + * @param authConfigEnvelope Properties used to create a Container App AuthConfig. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return configuration settings for the Azure ContainerApp Service Authentication / Authorization feature. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String containerAppName, String authConfigName); + AuthConfigInner createOrUpdate( + String resourceGroupName, String containerAppName, String authConfigName, AuthConfigInner authConfigEnvelope); /** * Delete a Container App AuthConfig. @@ -145,4 +131,18 @@ Response createOrUpdateWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response deleteWithResponse( String resourceGroupName, String containerAppName, String authConfigName, Context context); + + /** + * Delete a Container App AuthConfig. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param authConfigName Name of the Container App AuthConfig. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void delete(String resourceGroupName, String containerAppName, String authConfigName); } 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..bf77072df0af 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 @@ -11,6 +11,7 @@ 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.ContainerAppAuthTokenInner; import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; import com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner; import com.azure.resourcemanager.appcontainers.fluent.models.SecretsCollectionInner; @@ -73,28 +74,28 @@ public interface ContainerAppsClient { * * @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. + * @return the properties of a Container App along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ContainerAppInner getByResourceGroup(String resourceGroupName, String containerAppName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String containerAppName, Context context); /** * Get the properties of a Container App. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. - * @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}. + * @return the properties of a Container App. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String containerAppName, Context context); + ContainerAppInner getByResourceGroup(String resourceGroupName, String containerAppName); /** * Create or update a Container App. @@ -219,7 +220,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 +238,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 +257,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 +273,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. @@ -281,6 +290,23 @@ SyncPoller, Void> beginUpdate( void update( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context); + /** + * Analyzes a custom hostname for a Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param customHostname Custom hostname. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return custom domain analysis along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + Response listCustomHostnameAnalysisWithResponse( + String resourceGroupName, String containerAppName, String customHostname, Context context); + /** * Analyzes a custom hostname for a Container App. * @@ -296,21 +322,20 @@ void update( CustomHostnameAnalysisResultInner listCustomHostnameAnalysis(String resourceGroupName, String containerAppName); /** - * Analyzes a custom hostname for a Container App. + * List secrets for a container app. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. - * @param customHostname Custom hostname. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return custom domain analysis along with {@link Response}. + * @return container App Secrets Collection ARM resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listCustomHostnameAnalysisWithResponse( - String resourceGroupName, String containerAppName, String customHostname, Context context); + Response listSecretsWithResponse( + String resourceGroupName, String containerAppName, Context context); /** * List secrets for a container app. @@ -327,18 +352,30 @@ Response listCustomHostnameAnalysisWithRespon SecretsCollectionInner listSecrets(String resourceGroupName, String containerAppName); /** - * List secrets for a container app. + * Get auth token for a container app. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Secrets Collection ARM resource along with {@link Response}. + * @return auth token for a container app along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listSecretsWithResponse( + Response getAuthTokenWithResponse( String resourceGroupName, String containerAppName, Context context); + + /** + * Get auth token for a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.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 auth token for a container app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + ContainerAppAuthTokenInner getAuthToken(String resourceGroupName, String containerAppName); } 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..661c67a8b56e --- /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. + * @param context The context to associate with this 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 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 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. + * @param context The context to associate with this 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 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 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); + + /** + * 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); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionReplicasClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionReplicasClient.java index 33cedc706bc7..79ad30876622 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionReplicasClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionReplicasClient.java @@ -20,14 +20,16 @@ public interface ContainerAppsRevisionReplicasClient { * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @param replicaName Name of the Container App Revision Replica. + * @param context The context to associate with this 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 replica for a Container App Revision. + * @return a replica for a Container App Revision along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ReplicaInner getReplica(String resourceGroupName, String containerAppName, String revisionName, String replicaName); + Response getReplicaWithResponse( + String resourceGroupName, String containerAppName, String revisionName, String replicaName, Context context); /** * Get a replica for a Container App Revision. @@ -36,16 +38,14 @@ public interface ContainerAppsRevisionReplicasClient { * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @param replicaName Name of the Container App Revision Replica. - * @param context The context to associate with this 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 replica for a Container App Revision along with {@link Response}. + * @return a replica for a Container App Revision. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getReplicaWithResponse( - String resourceGroupName, String containerAppName, String revisionName, String replicaName, Context context); + ReplicaInner getReplica(String resourceGroupName, String containerAppName, String revisionName, String replicaName); /** * List replicas for a Container App Revision. @@ -53,14 +53,16 @@ Response getReplicaWithResponse( * @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 container App Revision Replicas collection ARM resource. + * @return container App Revision Replicas collection ARM resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ReplicaCollectionInner listReplicas(String resourceGroupName, String containerAppName, String revisionName); + Response listReplicasWithResponse( + String resourceGroupName, String containerAppName, String revisionName, Context context); /** * List replicas for a Container App Revision. @@ -68,14 +70,12 @@ Response getReplicaWithResponse( * @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 container App Revision Replicas collection ARM resource along with {@link Response}. + * @return container App Revision Replicas collection ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listReplicasWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); + ReplicaCollectionInner listReplicas(String resourceGroupName, String containerAppName, String revisionName); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionsClient.java index c5255955c77a..fc706efbed30 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionsClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsRevisionsClient.java @@ -44,21 +44,6 @@ public interface ContainerAppsRevisionsClient { 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. * @@ -77,7 +62,7 @@ Response getRevisionWithResponse( String resourceGroupName, String containerAppName, String revisionName, Context context); /** - * Activates a revision for a Container App. + * 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. @@ -86,9 +71,10 @@ Response getRevisionWithResponse( * @throws com.azure.resourcemanager.appcontainers.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) - void activateRevision(String resourceGroupName, String containerAppName, String revisionName); + RevisionInner getRevision(String resourceGroupName, String containerAppName, String revisionName); /** * Activates a revision for a Container App. @@ -108,7 +94,7 @@ Response activateRevisionWithResponse( String resourceGroupName, String containerAppName, String revisionName, Context context); /** - * Deactivates a revision for a Container App. + * Activates a revision for a Container App. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. @@ -119,7 +105,7 @@ Response activateRevisionWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void deactivateRevision(String resourceGroupName, String containerAppName, String revisionName); + void activateRevision(String resourceGroupName, String containerAppName, String revisionName); /** * Deactivates a revision for a Container App. @@ -139,7 +125,7 @@ Response deactivateRevisionWithResponse( String resourceGroupName, String containerAppName, String revisionName, Context context); /** - * Restarts a revision for a Container App. + * Deactivates a revision for a Container App. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. @@ -150,7 +136,7 @@ Response deactivateRevisionWithResponse( * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ @ServiceMethod(returns = ReturnType.SINGLE) - void restartRevision(String resourceGroupName, String containerAppName, String revisionName); + void deactivateRevision(String resourceGroupName, String containerAppName, String revisionName); /** * Restarts a revision for a Container App. @@ -168,4 +154,18 @@ Response deactivateRevisionWithResponse( @ServiceMethod(returns = ReturnType.SINGLE) Response restartRevisionWithResponse( String resourceGroupName, String containerAppName, String revisionName, Context context); + + /** + * Restarts a revision for a Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + void restartRevision(String resourceGroupName, String containerAppName, String revisionName); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSourceControlsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSourceControlsClient.java index 80fac7537516..52444e4f6782 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSourceControlsClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ContainerAppsSourceControlsClient.java @@ -53,14 +53,16 @@ PagedIterable listByContainerApp( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SourceControl of a Container App. + * @return a SourceControl of a Container App along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - SourceControlInner get(String resourceGroupName, String containerAppName, String sourceControlName); + Response getWithResponse( + String resourceGroupName, String containerAppName, String sourceControlName, Context context); /** * Get a SourceControl of a Container App. @@ -68,16 +70,14 @@ PagedIterable listByContainerApp( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SourceControl of a Container App along with {@link Response}. + * @return a SourceControl of a Container App. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String containerAppName, String sourceControlName, Context context); + SourceControlInner get(String resourceGroupName, String containerAppName, String sourceControlName); /** * Create or update the SourceControl for a Container App. 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..62358a5fc62a 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 @@ -49,14 +49,16 @@ public interface DaprComponentsClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component. + * @return a dapr component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DaprComponentInner get(String resourceGroupName, String environmentName, String componentName); + Response getWithResponse( + String resourceGroupName, String environmentName, String componentName, Context context); /** * Get a dapr component. @@ -64,89 +66,95 @@ public interface DaprComponentsClient { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response}. + * @return a dapr component. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context); + DaprComponentInner get(String resourceGroupName, String environmentName, String componentName); /** - * 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. * @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. + * @return dapr Component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DaprComponentInner createOrUpdate( + Response createOrUpdateWithResponse( String resourceGroupName, String environmentName, String componentName, - DaprComponentInner daprComponentEnvelope); + DaprComponentInner daprComponentEnvelope, + 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. * @param componentName Name of the Dapr Component. * @param daprComponentEnvelope Configuration details of the Dapr Component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr Component along with {@link Response}. + * @return dapr Component. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + DaprComponentInner createOrUpdate( String resourceGroupName, String environmentName, String componentName, - DaprComponentInner daprComponentEnvelope, - Context context); + DaprComponentInner daprComponentEnvelope); /** - * 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. * @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) - void delete(String resourceGroupName, String environmentName, String componentName); + Response deleteWithResponse( + 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. * @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 environmentName, String componentName, Context context); + void delete(String resourceGroupName, String environmentName, String componentName); /** * List secrets for a dapr component. @@ -154,14 +162,16 @@ Response deleteWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection ARM resource. + * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - DaprSecretsCollectionInner listSecrets(String resourceGroupName, String environmentName, String componentName); + Response listSecretsWithResponse( + String resourceGroupName, String environmentName, String componentName, Context context); /** * List secrets for a dapr component. @@ -169,14 +179,12 @@ Response deleteWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection ARM resource along with {@link Response}. + * @return dapr component Secrets Collection for ListSecrets Action. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listSecretsWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context); + DaprSecretsCollectionInner listSecrets(String resourceGroupName, String environmentName, String componentName); } 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..e42f15fa36a0 --- /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. + * @param context The context to associate with this 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 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 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); + + /** + * 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); +} 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..12bb72b96036 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 @@ -11,12 +11,16 @@ 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.EnvironmentAuthTokenInner; import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; +import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; /** An instance of this class provides access to all the operations defined in ManagedEnvironmentsClient. */ 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 +31,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 +46,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 +61,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,37 +77,43 @@ 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. + * @param context The context to associate with this 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. + * @return the properties of a Managed Environment used to host container apps along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedEnvironmentInner getByResourceGroup(String resourceGroupName, String environmentName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String environmentName, 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. - * @param context The context to associate with this 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}. + * @return the properties of a Managed Environment used to host container apps. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getByResourceGroupWithResponse( - String resourceGroupName, String environmentName, Context context); + ManagedEnvironmentInner getByResourceGroup(String resourceGroupName, String environmentName); /** - * 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 +129,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 +148,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 +166,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 +185,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 +201,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 +218,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 +233,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 +249,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 +267,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 +286,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 +302,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. @@ -280,4 +318,75 @@ SyncPoller, Void> beginUpdate( @ServiceMethod(returns = ReturnType.SINGLE) void update( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); + + /** + * Get auth token for a managed environment + * + *

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

Checks if resource name is available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return environment Auth Token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + EnvironmentAuthTokenInner getAuthToken(String resourceGroupName, String environmentName); + + /** + * Get all workload Profile States for a Premium Managed Environment.. + * + *

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

Get all workload Profile States for a Premium Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all workload Profile States for a Premium Managed Environment as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + PagedIterable listWorkloadProfileStates( + String resourceGroupName, String environmentName, Context context); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsDiagnosticsClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsDiagnosticsClient.java new file mode 100644 index 000000000000..c6580d78fdf5 --- /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. + * @param context The context to associate with this 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); + + /** + * 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); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsStoragesClient.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsStoragesClient.java index 02cea5645fd7..f4a809933d52 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsStoragesClient.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/ManagedEnvironmentsStoragesClient.java @@ -18,30 +18,30 @@ public interface ManagedEnvironmentsStoragesClient { * * @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 all storages for a managedEnvironment. + * @return all storages for a managedEnvironment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedEnvironmentStoragesCollectionInner list(String resourceGroupName, String environmentName); + Response listWithResponse( + String resourceGroupName, String environmentName, Context context); /** * Get all storages for a managedEnvironment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. - * @param context The context to associate with this 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 managedEnvironment along with {@link Response}. + * @return all storages for a managedEnvironment. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response listWithResponse( - String resourceGroupName, String environmentName, Context context); + ManagedEnvironmentStoragesCollectionInner list(String resourceGroupName, String environmentName); /** * Get storage for a managedEnvironment. @@ -49,14 +49,16 @@ Response listWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a managedEnvironment. + * @return storage for a managedEnvironment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedEnvironmentStorageInner get(String resourceGroupName, String environmentName, String storageName); + Response getWithResponse( + String resourceGroupName, String environmentName, String storageName, Context context); /** * Get storage for a managedEnvironment. @@ -64,16 +66,14 @@ Response listWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a managedEnvironment along with {@link Response}. + * @return storage for a managedEnvironment. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response getWithResponse( - String resourceGroupName, String environmentName, String storageName, Context context); + ManagedEnvironmentStorageInner get(String resourceGroupName, String environmentName, String storageName); /** * Create or update storage for a managedEnvironment. @@ -82,18 +82,20 @@ Response getWithResponse( * @param environmentName 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 managedEnvironment. + * @return storage resource for managedEnvironment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - ManagedEnvironmentStorageInner createOrUpdate( + Response createOrUpdateWithResponse( String resourceGroupName, String environmentName, String storageName, - ManagedEnvironmentStorageInner storageEnvelope); + ManagedEnvironmentStorageInner storageEnvelope, + Context context); /** * Create or update storage for a managedEnvironment. @@ -102,20 +104,18 @@ ManagedEnvironmentStorageInner createOrUpdate( * @param environmentName 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 managedEnvironment along with {@link Response}. + * @return storage resource for managedEnvironment. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response createOrUpdateWithResponse( + ManagedEnvironmentStorageInner createOrUpdate( String resourceGroupName, String environmentName, String storageName, - ManagedEnvironmentStorageInner storageEnvelope, - Context context); + ManagedEnvironmentStorageInner storageEnvelope); /** * Delete storage for a managedEnvironment. @@ -123,13 +123,16 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - void delete(String resourceGroupName, String environmentName, String storageName); + Response deleteWithResponse( + String resourceGroupName, String environmentName, String storageName, Context context); /** * Delete storage for a managedEnvironment. @@ -137,14 +140,11 @@ Response createOrUpdateWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response deleteWithResponse( - String resourceGroupName, String environmentName, String storageName, Context context); + void delete(String resourceGroupName, String environmentName, String storageName); } 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..27878d6ce998 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,38 +14,42 @@ /** 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. * @param checkNameAvailabilityRequest The check name availability request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result. + * @return the check availability result along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - CheckNameAvailabilityResponseInner checkNameAvailability( - String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest); + Response checkNameAvailabilityWithResponse( + String resourceGroupName, + String environmentName, + CheckNameAvailabilityRequest checkNameAvailabilityRequest, + Context context); /** - * 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. * @param checkNameAvailabilityRequest The check name availability request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result along with {@link Response}. + * @return the check availability result. */ @ServiceMethod(returns = ReturnType.SINGLE) - Response checkNameAvailabilityWithResponse( - String resourceGroupName, - String environmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest, - Context context); + CheckNameAvailabilityResponseInner checkNameAvailability( + String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigInner.java index a4d911e32d68..7a3c141ee7e5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AuthConfigInner.java @@ -6,6 +6,7 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.AuthPlatform; import com.azure.resourcemanager.appcontainers.models.GlobalValidation; import com.azure.resourcemanager.appcontainers.models.HttpSettings; @@ -22,6 +23,16 @@ public final class AuthConfigInner extends ProxyResource { @JsonProperty(value = "properties") private AuthConfigProperties innerProperties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of AuthConfigInner class. */ + public AuthConfigInner() { + } + /** * Get the innerProperties property: AuthConfig resource specific properties. * @@ -31,6 +42,15 @@ private AuthConfigProperties innerProperties() { return this.innerProperties; } + /** + * Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + public SystemData systemData() { + return this.systemData; + } + /** * Get the platform property: The configuration settings of the platform of ContainerApp Service * Authentication/Authorization. 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..9562abcf1c1d 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,41 +16,42 @@ @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; + /** Creates an instance of AuthConfigProperties class. */ + public AuthConfigProperties() { + } + /** * Get the platform property: The configuration settings of the platform of ContainerApp Service * Authentication/Authorization. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AvailableWorkloadProfileInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AvailableWorkloadProfileInner.java new file mode 100644 index 000000000000..1982f7c7dde0 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/AvailableWorkloadProfileInner.java @@ -0,0 +1,97 @@ +// Copyright (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.AvailableWorkloadProfileProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A premium workload profile. */ +@Fluent +public final class AvailableWorkloadProfileInner extends ProxyResource { + /* + * Region of the workload profile. + */ + @JsonProperty(value = "location") + private String location; + + /* + * Revision resource specific properties + */ + @JsonProperty(value = "properties") + private AvailableWorkloadProfileProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of AvailableWorkloadProfileInner class. */ + public AvailableWorkloadProfileInner() { + } + + /** + * Get the location property: Region of the workload profile. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Region of the workload profile. + * + * @param location the location value to set. + * @return the AvailableWorkloadProfileInner object itself. + */ + public AvailableWorkloadProfileInner withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the properties property: Revision resource specific properties. + * + * @return the properties value. + */ + public AvailableWorkloadProfileProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Revision resource specific properties. + * + * @param properties the properties value to set. + * @return the AvailableWorkloadProfileInner object itself. + */ + public AvailableWorkloadProfileInner withProperties(AvailableWorkloadProfileProperties 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/BillingMeterCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BillingMeterCollectionInner.java new file mode 100644 index 000000000000..236f663470d6 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/BillingMeterCollectionInner.java @@ -0,0 +1,63 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.models.BillingMeter; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of premium workload billing meters. */ +@Fluent +public final class BillingMeterCollectionInner { + /* + * Collection of billing meters. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /** Creates an instance of BillingMeterCollectionInner class. */ + public BillingMeterCollectionInner() { + } + + /** + * Get the value property: Collection of billing meters. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Collection of billing meters. + * + * @param value the value value to set. + * @return the BillingMeterCollectionInner object itself. + */ + public BillingMeterCollectionInner 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 BillingMeterCollectionInner")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(BillingMeterCollectionInner.class); +} 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..49d78985bdcb 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,12 +21,15 @@ 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; + /** Creates an instance of CertificateInner class. */ + public CertificateInner() { + } + /** * Get the properties property: Certificate resource specific properties. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CheckNameAvailabilityResponseInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CheckNameAvailabilityResponseInner.java index 5189f1a6cfb3..1d13506867f2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CheckNameAvailabilityResponseInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/CheckNameAvailabilityResponseInner.java @@ -29,6 +29,10 @@ public final class CheckNameAvailabilityResponseInner { @JsonProperty(value = "message") private String message; + /** Creates an instance of CheckNameAvailabilityResponseInner class. */ + public CheckNameAvailabilityResponseInner() { + } + /** * Get the nameAvailable property: Indicates if the resource name is available. * 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..e4892a69f389 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentInner.java @@ -0,0 +1,205 @@ +// Copyright (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.CustomDomainConfiguration; +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; + + /** Creates an instance of ConnectedEnvironmentInner class. */ + public ConnectedEnvironmentInner() { + } + + /** + * Get the extendedLocation property: The complex type of the extended location. + * + * @return the extendedLocation value. + */ + public ExtendedLocation extendedLocation() { + 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; + } + + /** + * Get the customDomainConfiguration property: Custom domain configuration for the environment. + * + * @return the customDomainConfiguration value. + */ + public CustomDomainConfiguration customDomainConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().customDomainConfiguration(); + } + + /** + * Set the customDomainConfiguration property: Custom domain configuration for the environment. + * + * @param customDomainConfiguration the customDomainConfiguration value to set. + * @return the ConnectedEnvironmentInner object itself. + */ + public ConnectedEnvironmentInner withCustomDomainConfiguration( + CustomDomainConfiguration customDomainConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new ConnectedEnvironmentProperties(); + } + this.innerProperties().withCustomDomainConfiguration(customDomainConfiguration); + 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..28adb95807b1 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentProperties.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.fluent.models; + +import com.azure.core.annotation.Fluent; +import com.azure.resourcemanager.appcontainers.models.ConnectedEnvironmentProvisioningState; +import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; +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; + + /* + * Custom domain configuration for the environment + */ + @JsonProperty(value = "customDomainConfiguration") + private CustomDomainConfiguration customDomainConfiguration; + + /** Creates an instance of ConnectedEnvironmentProperties class. */ + public ConnectedEnvironmentProperties() { + } + + /** + * Get the provisioningState property: Provisioning state of the Kubernetes Environment. + * + * @return the provisioningState value. + */ + public ConnectedEnvironmentProvisioningState provisioningState() { + 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; + } + + /** + * Get the customDomainConfiguration property: Custom domain configuration for the environment. + * + * @return the customDomainConfiguration value. + */ + public CustomDomainConfiguration customDomainConfiguration() { + return this.customDomainConfiguration; + } + + /** + * Set the customDomainConfiguration property: Custom domain configuration for the environment. + * + * @param customDomainConfiguration the customDomainConfiguration value to set. + * @return the ConnectedEnvironmentProperties object itself. + */ + public ConnectedEnvironmentProperties withCustomDomainConfiguration( + CustomDomainConfiguration customDomainConfiguration) { + this.customDomainConfiguration = customDomainConfiguration; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (customDomainConfiguration() != null) { + customDomainConfiguration().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..bbbf23cc740d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStorageInner.java @@ -0,0 +1,71 @@ +// Copyright (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; + + /** Creates an instance of ConnectedEnvironmentStorageInner class. */ + public ConnectedEnvironmentStorageInner() { + } + + /** + * 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..f3fd1e14bfd0 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ConnectedEnvironmentStoragesCollectionInner.java @@ -0,0 +1,62 @@ +// Copyright (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; + + /** Creates an instance of ConnectedEnvironmentStoragesCollectionInner class. */ + public ConnectedEnvironmentStoragesCollectionInner() { + } + + /** + * 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/ContainerAppAuthTokenInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenInner.java new file mode 100644 index 000000000000..494939f8f2e6 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenInner.java @@ -0,0 +1,93 @@ +// Copyright (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.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** Container App Auth Token. */ +@Fluent +public final class ContainerAppAuthTokenInner extends Resource { + /* + * Container App auth token resource specific properties + */ + @JsonProperty(value = "properties") + private ContainerAppAuthTokenProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of ContainerAppAuthTokenInner class. */ + public ContainerAppAuthTokenInner() { + } + + /** + * Get the innerProperties property: Container App auth token resource specific properties. + * + * @return the innerProperties value. + */ + private ContainerAppAuthTokenProperties 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 ContainerAppAuthTokenInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public ContainerAppAuthTokenInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the token property: Auth token value. + * + * @return the token value. + */ + public String token() { + return this.innerProperties() == null ? null : this.innerProperties().token(); + } + + /** + * Get the expires property: Token expiration date. + * + * @return the expires value. + */ + public OffsetDateTime expires() { + return this.innerProperties() == null ? null : this.innerProperties().expires(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenProperties.java new file mode 100644 index 000000000000..18d85126be08 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppAuthTokenProperties.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Container App auth token resource specific properties. */ +@Immutable +public final class ContainerAppAuthTokenProperties { + /* + * Auth token value. + */ + @JsonProperty(value = "token", access = JsonProperty.Access.WRITE_ONLY) + private String token; + + /* + * Token expiration date. + */ + @JsonProperty(value = "expires", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime expires; + + /** Creates an instance of ContainerAppAuthTokenProperties class. */ + public ContainerAppAuthTokenProperties() { + } + + /** + * Get the token property: Auth token value. + * + * @return the token value. + */ + public String token() { + return this.token; + } + + /** + * Get the expires property: Token expiration date. + * + * @return the expires value. + */ + public OffsetDateTime expires() { + return this.expires; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppInner.java index 89661084471e..0f37c337d055 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 @@ -6,8 +6,10 @@ import com.azure.core.annotation.Fluent; import com.azure.core.management.Resource; +import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.Configuration; import com.azure.resourcemanager.appcontainers.models.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 +20,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 +38,36 @@ public final class ContainerAppInner extends Resource { @JsonProperty(value = "properties") private ContainerAppProperties innerProperties; + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of ContainerAppInner class. */ + public ContainerAppInner() { + } + + /** + * 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. @@ -61,6 +99,15 @@ private ContainerAppProperties 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 ContainerAppInner withLocation(String location) { @@ -85,7 +132,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 +141,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 +154,52 @@ 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 workloadProfileType property: Workload profile type to pin for container app execution. + * + * @return the workloadProfileType value. + */ + public String workloadProfileType() { + return this.innerProperties() == null ? null : this.innerProperties().workloadProfileType(); + } + + /** + * Set the workloadProfileType property: Workload profile type to pin for container app execution. + * + * @param workloadProfileType the workloadProfileType value to set. + * @return the ContainerAppInner object itself. + */ + public ContainerAppInner withWorkloadProfileType(String workloadProfileType) { + if (this.innerProperties() == null) { + this.innerProperties = new ContainerAppProperties(); + } + this.innerProperties().withWorkloadProfileType(workloadProfileType); + return this; + } + /** * Get the latestRevisionName property: Name of the latest revision of the Container App. * @@ -189,12 +282,24 @@ public List outboundIpAddresses() { return this.innerProperties() == null ? null : this.innerProperties().outboundIpAddresses(); } + /** + * Get the eventStreamEndpoint property: The endpoint of the eventstream of the container app. + * + * @return the eventStreamEndpoint value. + */ + public String eventStreamEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().eventStreamEndpoint(); + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (extendedLocation() != null) { + extendedLocation().validate(); + } if (identity() != null) { identity().validate(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ContainerAppProperties.java index e3a5b1736b4f..b4f8ae444a42 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,23 @@ 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; + + /* + * Workload profile type to pin for container app execution. + */ + @JsonProperty(value = "workloadProfileType") + private String workloadProfileType; + /* * Name of the latest revision of the Container App. */ @@ -59,9 +71,19 @@ public final class ContainerAppProperties { /* * Outbound IP Addresses for container app. */ - @JsonProperty(value = "outboundIPAddresses", access = JsonProperty.Access.WRITE_ONLY) + @JsonProperty(value = "outboundIpAddresses", access = JsonProperty.Access.WRITE_ONLY) private List outboundIpAddresses; + /* + * The endpoint of the eventstream of the container app. + */ + @JsonProperty(value = "eventStreamEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String eventStreamEndpoint; + + /** Creates an instance of ContainerAppProperties class. */ + public ContainerAppProperties() { + } + /** * Get the provisioningState property: Provisioning state of the Container App. * @@ -72,7 +94,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 +103,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 +113,46 @@ 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 workloadProfileType property: Workload profile type to pin for container app execution. + * + * @return the workloadProfileType value. + */ + public String workloadProfileType() { + return this.workloadProfileType; + } + + /** + * Set the workloadProfileType property: Workload profile type to pin for container app execution. + * + * @param workloadProfileType the workloadProfileType value to set. + * @return the ContainerAppProperties object itself. + */ + public ContainerAppProperties withWorkloadProfileType(String workloadProfileType) { + this.workloadProfileType = workloadProfileType; + return this; + } + /** * Get the latestRevisionName property: Name of the latest revision of the Container App. * @@ -167,6 +229,15 @@ public List outboundIpAddresses() { return this.outboundIpAddresses; } + /** + * Get the eventStreamEndpoint property: The endpoint of the eventstream of the container app. + * + * @return the eventStreamEndpoint value. + */ + public String eventStreamEndpoint() { + return this.eventStreamEndpoint; + } + /** * Validates the instance. * 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..58e0b8275ae2 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,45 +5,90 @@ 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. + */ + @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; + + /* + * true if there is a conflict on the Container App's managed environment level custom domain; + * otherwise, false. + */ + @JsonProperty(value = "conflictWithEnvironmentCustomDomain", access = JsonProperty.Access.WRITE_ONLY) + private Boolean conflictWithEnvironmentCustomDomain; + + /* + * 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. */ - public SystemData systemData() { - return this.systemData; + @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; + + /** Creates an instance of CustomHostnameAnalysisResultInner class. */ + public CustomHostnameAnalysisResultInner() { } /** @@ -52,7 +97,7 @@ public SystemData systemData() { * @return the hostname value. */ public String hostname() { - return this.innerProperties() == null ? null : this.innerProperties().hostname(); + return this.hostname; } /** @@ -62,7 +107,7 @@ public String hostname() { * @return the isHostnameAlreadyVerified value. */ public Boolean isHostnameAlreadyVerified() { - return this.innerProperties() == null ? null : this.innerProperties().isHostnameAlreadyVerified(); + return this.isHostnameAlreadyVerified; } /** @@ -71,7 +116,7 @@ public Boolean isHostnameAlreadyVerified() { * @return the customDomainVerificationTest value. */ public DnsVerificationTestResult customDomainVerificationTest() { - return this.innerProperties() == null ? null : this.innerProperties().customDomainVerificationTest(); + return this.customDomainVerificationTest; } /** @@ -79,8 +124,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 +135,17 @@ public DefaultErrorResponseError customDomainVerificationFailureInfo() { * @return the hasConflictOnManagedEnvironment value. */ public Boolean hasConflictOnManagedEnvironment() { - return this.innerProperties() == null ? null : this.innerProperties().hasConflictOnManagedEnvironment(); + return this.hasConflictOnManagedEnvironment; + } + + /** + * Get the conflictWithEnvironmentCustomDomain property: <code>true</code> if there is a conflict on the + * Container App's managed environment level custom domain; otherwise, <code>false</code>. + * + * @return the conflictWithEnvironmentCustomDomain value. + */ + public Boolean conflictWithEnvironmentCustomDomain() { + return this.conflictWithEnvironmentCustomDomain; } /** @@ -100,7 +155,7 @@ public Boolean hasConflictOnManagedEnvironment() { * @return the conflictingContainerAppResourceId value. */ public String conflictingContainerAppResourceId() { - return this.innerProperties() == null ? null : this.innerProperties().conflictingContainerAppResourceId(); + return this.conflictingContainerAppResourceId; } /** @@ -109,7 +164,7 @@ public String conflictingContainerAppResourceId() { * @return the cNameRecords value. */ public List cNameRecords() { - return this.innerProperties() == null ? null : this.innerProperties().cNameRecords(); + return this.cNameRecords; } /** @@ -119,10 +174,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 +184,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 +194,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 +204,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 +214,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 +224,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 +234,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 +244,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 +254,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 +264,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..a35ad873e46c 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,12 +22,15 @@ 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; + /** Creates an instance of DaprComponentInner class. */ + public DaprComponentInner() { + } + /** * Get the innerProperties property: Dapr Component resource specific properties. * @@ -161,6 +164,29 @@ public DaprComponentInner withSecrets(List secrets) { return this; } + /** + * Get the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. + * + * @return the secretStoreComponent value. + */ + public String secretStoreComponent() { + return this.innerProperties() == null ? null : this.innerProperties().secretStoreComponent(); + } + + /** + * Set the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. + * + * @param secretStoreComponent the secretStoreComponent value to set. + * @return the DaprComponentInner object itself. + */ + public DaprComponentInner withSecretStoreComponent(String secretStoreComponent) { + if (this.innerProperties() == null) { + this.innerProperties = new DaprComponentProperties(); + } + this.innerProperties().withSecretStoreComponent(secretStoreComponent); + return this; + } + /** * Get the metadata property: Component metadata. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java index 9341c9fa3aed..5ea576bbf740 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprComponentProperties.java @@ -43,6 +43,12 @@ public final class DaprComponentProperties { @JsonProperty(value = "secrets") private List secrets; + /* + * Name of a Dapr component to retrieve component secrets from + */ + @JsonProperty(value = "secretStoreComponent") + private String secretStoreComponent; + /* * Component metadata */ @@ -55,6 +61,10 @@ public final class DaprComponentProperties { @JsonProperty(value = "scopes") private List scopes; + /** Creates an instance of DaprComponentProperties class. */ + public DaprComponentProperties() { + } + /** * Get the componentType property: Component type. * @@ -155,6 +165,26 @@ public DaprComponentProperties withSecrets(List secrets) { return this; } + /** + * Get the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. + * + * @return the secretStoreComponent value. + */ + public String secretStoreComponent() { + return this.secretStoreComponent; + } + + /** + * Set the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. + * + * @param secretStoreComponent the secretStoreComponent value to set. + * @return the DaprComponentProperties object itself. + */ + public DaprComponentProperties withSecretStoreComponent(String secretStoreComponent) { + this.secretStoreComponent = secretStoreComponent; + return this; + } + /** * Get the metadata property: Component metadata. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSecretsCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSecretsCollectionInner.java index 3c69e6c4b6c7..340ba9e1b5ac 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSecretsCollectionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DaprSecretsCollectionInner.java @@ -10,7 +10,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; -/** Dapr component Secrets Collection ARM resource. */ +/** Dapr component Secrets Collection for ListSecrets Action. */ @Fluent public final class DaprSecretsCollectionInner { /* @@ -19,6 +19,10 @@ public final class DaprSecretsCollectionInner { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of DaprSecretsCollectionInner class. */ + public DaprSecretsCollectionInner() { + } + /** * Get the value property: Collection of secrets used by a Dapr component. * 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..88c3ba58530a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsCollectionInner.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.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; + + /** Creates an instance of DiagnosticsCollectionInner class. */ + public DiagnosticsCollectionInner() { + } + + /** + * 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..1c590f86793d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/DiagnosticsInner.java @@ -0,0 +1,71 @@ +// Copyright (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; + + /** Creates an instance of DiagnosticsInner class. */ + public DiagnosticsInner() { + } + + /** + * 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/EnvironmentAuthTokenInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenInner.java new file mode 100644 index 000000000000..d756ff5d716b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenInner.java @@ -0,0 +1,93 @@ +// Copyright (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.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; +import java.util.Map; + +/** Environment Auth Token. */ +@Fluent +public final class EnvironmentAuthTokenInner extends Resource { + /* + * Environment auth token resource specific properties + */ + @JsonProperty(value = "properties") + private EnvironmentAuthTokenProperties innerProperties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of EnvironmentAuthTokenInner class. */ + public EnvironmentAuthTokenInner() { + } + + /** + * Get the innerProperties property: Environment auth token resource specific properties. + * + * @return the innerProperties value. + */ + private EnvironmentAuthTokenProperties 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 EnvironmentAuthTokenInner withLocation(String location) { + super.withLocation(location); + return this; + } + + /** {@inheritDoc} */ + @Override + public EnvironmentAuthTokenInner withTags(Map tags) { + super.withTags(tags); + return this; + } + + /** + * Get the token property: Auth token value. + * + * @return the token value. + */ + public String token() { + return this.innerProperties() == null ? null : this.innerProperties().token(); + } + + /** + * Get the expires property: Token expiration date. + * + * @return the expires value. + */ + public OffsetDateTime expires() { + return this.innerProperties() == null ? null : this.innerProperties().expires(); + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (innerProperties() != null) { + innerProperties().validate(); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenProperties.java new file mode 100644 index 000000000000..775e90da2e84 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/EnvironmentAuthTokenProperties.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.fluent.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Environment auth token resource specific properties. */ +@Immutable +public final class EnvironmentAuthTokenProperties { + /* + * Auth token value. + */ + @JsonProperty(value = "token", access = JsonProperty.Access.WRITE_ONLY) + private String token; + + /* + * Token expiration date. + */ + @JsonProperty(value = "expires", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime expires; + + /** Creates an instance of EnvironmentAuthTokenProperties class. */ + public EnvironmentAuthTokenProperties() { + } + + /** + * Get the token property: Auth token value. + * + * @return the token value. + */ + public String token() { + return this.token; + } + + /** + * Get the expires property: Token expiration date. + * + * @return the expires value. + */ + public OffsetDateTime expires() { + return this.expires; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentInner.java index 6eb3f4a165a4..a75d12a08e15 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 @@ -8,14 +8,24 @@ import com.azure.core.management.Resource; import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; +import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; import com.azure.resourcemanager.appcontainers.models.EnvironmentProvisioningState; +import com.azure.resourcemanager.appcontainers.models.EnvironmentSkuProperties; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; +import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; import java.util.Map; /** An environment for hosting container apps. */ @Fluent public final class ManagedEnvironmentInner extends Resource { + /* + * SKU properties of the Environment. + */ + @JsonProperty(value = "sku") + private EnvironmentSkuProperties sku; + /* * Managed environment resource specific properties */ @@ -23,12 +33,35 @@ 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; + /** Creates an instance of ManagedEnvironmentInner class. */ + public ManagedEnvironmentInner() { + } + + /** + * Get the sku property: SKU properties of the Environment. + * + * @return the sku value. + */ + public EnvironmentSkuProperties sku() { + return this.sku; + } + + /** + * Set the sku property: SKU properties of the Environment. + * + * @param sku the sku value to set. + * @return the ManagedEnvironmentInner object itself. + */ + public ManagedEnvironmentInner withSku(EnvironmentSkuProperties sku) { + this.sku = sku; + return this; + } + /** * Get the innerProperties property: Managed environment resource specific properties. * @@ -218,12 +251,70 @@ public ManagedEnvironmentInner withZoneRedundant(Boolean zoneRedundant) { return this; } + /** + * Get the customDomainConfiguration property: Custom domain configuration for the environment. + * + * @return the customDomainConfiguration value. + */ + public CustomDomainConfiguration customDomainConfiguration() { + return this.innerProperties() == null ? null : this.innerProperties().customDomainConfiguration(); + } + + /** + * Set the customDomainConfiguration property: Custom domain configuration for the environment. + * + * @param customDomainConfiguration the customDomainConfiguration value to set. + * @return the ManagedEnvironmentInner object itself. + */ + public ManagedEnvironmentInner withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedEnvironmentProperties(); + } + this.innerProperties().withCustomDomainConfiguration(customDomainConfiguration); + return this; + } + + /** + * Get the eventStreamEndpoint property: The endpoint of the eventstream of the Environment. + * + * @return the eventStreamEndpoint value. + */ + public String eventStreamEndpoint() { + return this.innerProperties() == null ? null : this.innerProperties().eventStreamEndpoint(); + } + + /** + * Get the workloadProfiles property: Workload profiles configured for the Managed Environment. + * + * @return the workloadProfiles value. + */ + public List workloadProfiles() { + return this.innerProperties() == null ? null : this.innerProperties().workloadProfiles(); + } + + /** + * Set the workloadProfiles property: Workload profiles configured for the Managed Environment. + * + * @param workloadProfiles the workloadProfiles value to set. + * @return the ManagedEnvironmentInner object itself. + */ + public ManagedEnvironmentInner withWorkloadProfiles(List workloadProfiles) { + if (this.innerProperties() == null) { + this.innerProperties = new ManagedEnvironmentProperties(); + } + this.innerProperties().withWorkloadProfiles(workloadProfiles); + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (sku() != null) { + sku().validate(); + } if (innerProperties() != null) { innerProperties().validate(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentProperties.java index 3a58e75fc37d..78ef578717a0 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 @@ -6,9 +6,12 @@ import com.azure.core.annotation.Fluent; import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; +import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; import com.azure.resourcemanager.appcontainers.models.EnvironmentProvisioningState; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; +import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; /** Managed environment resource specific properties. */ @Fluent @@ -20,15 +23,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; @@ -71,6 +72,28 @@ public final class ManagedEnvironmentProperties { @JsonProperty(value = "zoneRedundant") private Boolean zoneRedundant; + /* + * Custom domain configuration for the environment + */ + @JsonProperty(value = "customDomainConfiguration") + private CustomDomainConfiguration customDomainConfiguration; + + /* + * The endpoint of the eventstream of the Environment. + */ + @JsonProperty(value = "eventStreamEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String eventStreamEndpoint; + + /* + * Workload profiles configured for the Managed Environment. + */ + @JsonProperty(value = "workloadProfiles") + private List workloadProfiles; + + /** Creates an instance of ManagedEnvironmentProperties class. */ + public ManagedEnvironmentProperties() { + } + /** * Get the provisioningState property: Provisioning state of the Environment. * @@ -213,6 +236,56 @@ public ManagedEnvironmentProperties withZoneRedundant(Boolean zoneRedundant) { return this; } + /** + * Get the customDomainConfiguration property: Custom domain configuration for the environment. + * + * @return the customDomainConfiguration value. + */ + public CustomDomainConfiguration customDomainConfiguration() { + return this.customDomainConfiguration; + } + + /** + * Set the customDomainConfiguration property: Custom domain configuration for the environment. + * + * @param customDomainConfiguration the customDomainConfiguration value to set. + * @return the ManagedEnvironmentProperties object itself. + */ + public ManagedEnvironmentProperties withCustomDomainConfiguration( + CustomDomainConfiguration customDomainConfiguration) { + this.customDomainConfiguration = customDomainConfiguration; + return this; + } + + /** + * Get the eventStreamEndpoint property: The endpoint of the eventstream of the Environment. + * + * @return the eventStreamEndpoint value. + */ + public String eventStreamEndpoint() { + return this.eventStreamEndpoint; + } + + /** + * Get the workloadProfiles property: Workload profiles configured for the Managed Environment. + * + * @return the workloadProfiles value. + */ + public List workloadProfiles() { + return this.workloadProfiles; + } + + /** + * Set the workloadProfiles property: Workload profiles configured for the Managed Environment. + * + * @param workloadProfiles the workloadProfiles value to set. + * @return the ManagedEnvironmentProperties object itself. + */ + public ManagedEnvironmentProperties withWorkloadProfiles(List workloadProfiles) { + this.workloadProfiles = workloadProfiles; + return this; + } + /** * Validates the instance. * @@ -225,5 +298,11 @@ public void validate() { if (appLogsConfiguration() != null) { appLogsConfiguration().validate(); } + if (customDomainConfiguration() != null) { + customDomainConfiguration().validate(); + } + if (workloadProfiles() != null) { + workloadProfiles().forEach(e -> e.validate()); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStorageInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStorageInner.java index 887f1f9bd6aa..cf04d189ef98 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,12 +20,15 @@ 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; + /** Creates an instance of ManagedEnvironmentStorageInner class. */ + public ManagedEnvironmentStorageInner() { + } + /** * Get the properties property: Storage properties. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStoragesCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStoragesCollectionInner.java index f626146951a8..620546ce1064 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStoragesCollectionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ManagedEnvironmentStoragesCollectionInner.java @@ -18,6 +18,10 @@ public final class ManagedEnvironmentStoragesCollectionInner { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of ManagedEnvironmentStoragesCollectionInner class. */ + public ManagedEnvironmentStoragesCollectionInner() { + } + /** * Get the value property: Collection of storage resources. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/OperationDetailInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/OperationDetailInner.java index bfd8b608e397..f4a5897a8ff9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/OperationDetailInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/OperationDetailInner.java @@ -35,6 +35,10 @@ public final class OperationDetailInner { @JsonProperty(value = "origin") private String origin; + /** Creates an instance of OperationDetailInner class. */ + public OperationDetailInner() { + } + /** * Get the name property: Name of the operation. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaCollectionInner.java index 03131bce5a53..89aa52cf18ff 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaCollectionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaCollectionInner.java @@ -18,6 +18,10 @@ public final class ReplicaCollectionInner { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of ReplicaCollectionInner class. */ + public ReplicaCollectionInner() { + } + /** * Get the value property: Collection of resources. * 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..5dfd65482343 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,12 +22,15 @@ 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; + /** Creates an instance of ReplicaInner class. */ + public ReplicaInner() { + } + /** * Get the innerProperties property: Replica resource specific properties. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaProperties.java index 9238ef5ba530..1ddc5027cdc9 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/ReplicaProperties.java @@ -25,6 +25,10 @@ public final class ReplicaProperties { @JsonProperty(value = "containers") private List containers; + /** Creates an instance of ReplicaProperties class. */ + public ReplicaProperties() { + } + /** * Get the createdTime property: Timestamp describing when the pod was created by controller. * 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..b69a3c85c633 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 @@ -4,7 +4,7 @@ package com.azure.resourcemanager.appcontainers.fluent.models; -import com.azure.core.annotation.Fluent; +import com.azure.core.annotation.Immutable; import com.azure.core.management.ProxyResource; import com.azure.core.management.SystemData; import com.azure.resourcemanager.appcontainers.models.RevisionHealthState; @@ -14,7 +14,7 @@ import java.time.OffsetDateTime; /** Container App Revision. */ -@Fluent +@Immutable public final class RevisionInner extends ProxyResource { /* * Revision resource specific properties @@ -23,12 +23,15 @@ 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; + /** Creates an instance of RevisionInner class. */ + public RevisionInner() { + } + /** * Get the innerProperties property: Revision resource specific properties. * @@ -56,6 +59,16 @@ public OffsetDateTime createdTime() { return this.innerProperties() == null ? null : this.innerProperties().createdTime(); } + /** + * Get the lastActiveTime property: Timestamp describing when the revision was last active. Only meaningful when + * revision is inactive. + * + * @return the lastActiveTime value. + */ + public OffsetDateTime lastActiveTime() { + return this.innerProperties() == null ? null : this.innerProperties().lastActiveTime(); + } + /** * Get the fqdn property: Fully qualified domain name of the revision. * 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..a11ef7a98b97 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 @@ -21,6 +21,12 @@ public final class RevisionProperties { @JsonProperty(value = "createdTime", access = JsonProperty.Access.WRITE_ONLY) private OffsetDateTime createdTime; + /* + * Timestamp describing when the revision was last active. Only meaningful when revision is inactive + */ + @JsonProperty(value = "lastActiveTime", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime lastActiveTime; + /* * Fully qualified domain name of the revision */ @@ -71,6 +77,10 @@ public final class RevisionProperties { @JsonProperty(value = "provisioningState", access = JsonProperty.Access.WRITE_ONLY) private RevisionProvisioningState provisioningState; + /** Creates an instance of RevisionProperties class. */ + public RevisionProperties() { + } + /** * Get the createdTime property: Timestamp describing when the revision was created by controller. * @@ -80,6 +90,16 @@ public OffsetDateTime createdTime() { return this.createdTime; } + /** + * Get the lastActiveTime property: Timestamp describing when the revision was last active. Only meaningful when + * revision is inactive. + * + * @return the lastActiveTime value. + */ + public OffsetDateTime lastActiveTime() { + return this.lastActiveTime; + } + /** * Get the fqdn property: Fully qualified domain name of the revision. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SecretsCollectionInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SecretsCollectionInner.java index 7f2fbf7fbb94..4d9eaacf9c0d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SecretsCollectionInner.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SecretsCollectionInner.java @@ -19,6 +19,10 @@ public final class SecretsCollectionInner { @JsonProperty(value = "value", required = true) private List value; + /** Creates an instance of SecretsCollectionInner class. */ + public SecretsCollectionInner() { + } + /** * Get the value property: Collection of resources. * 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..401141b646ef 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,12 +21,15 @@ 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; + /** Creates an instance of SourceControlInner class. */ + public SourceControlInner() { + } + /** * Get the innerProperties property: SourceControl resource specific properties. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlProperties.java index c771117a5a7d..94c3efcb7970 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/SourceControlProperties.java @@ -38,6 +38,10 @@ public final class SourceControlProperties { @JsonProperty(value = "githubActionConfiguration") private GithubActionConfiguration githubActionConfiguration; + /** Creates an instance of SourceControlProperties class. */ + public SourceControlProperties() { + } + /** * Get the operationState property: Current provisioning State of the operation. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkloadProfileStatesInner.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkloadProfileStatesInner.java new file mode 100644 index 000000000000..94e932f257de --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/fluent/models/WorkloadProfileStatesInner.java @@ -0,0 +1,71 @@ +// Copyright (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.WorkloadProfileStatesProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Collection of all the workload Profile States for a Premium Managed Environment.. */ +@Fluent +public final class WorkloadProfileStatesInner extends ProxyResource { + /* + * Workload Profile resource specific properties. + */ + @JsonProperty(value = "properties") + private WorkloadProfileStatesProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of WorkloadProfileStatesInner class. */ + public WorkloadProfileStatesInner() { + } + + /** + * Get the properties property: Workload Profile resource specific properties. + * + * @return the properties value. + */ + public WorkloadProfileStatesProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Workload Profile resource specific properties. + * + * @param properties the properties value to set. + * @return the WorkloadProfileStatesInner object itself. + */ + public WorkloadProfileStatesInner withProperties(WorkloadProfileStatesProperties 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/implementation/AuthConfigImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AuthConfigImpl.java index c0449ab74286..9db849c965eb 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AuthConfigImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AuthConfigImpl.java @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.implementation; +import com.azure.core.management.SystemData; import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.AuthConfigInner; import com.azure.resourcemanager.appcontainers.models.AuthConfig; @@ -30,6 +31,10 @@ public String type() { return this.innerModel().type(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public AuthPlatform platform() { return this.innerModel().platform(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfileImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfileImpl.java new file mode 100644 index 000000000000..6426657e43c3 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfileImpl.java @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; +import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfile; +import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfileProperties; + +public final class AvailableWorkloadProfileImpl implements AvailableWorkloadProfile { + private AvailableWorkloadProfileInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + AvailableWorkloadProfileImpl( + AvailableWorkloadProfileInner 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 String location() { + return this.innerModel().location(); + } + + public AvailableWorkloadProfileProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public AvailableWorkloadProfileInner 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/AvailableWorkloadProfilesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesClientImpl.java new file mode 100644 index 000000000000..8a3a3e3b2b10 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesClientImpl.java @@ -0,0 +1,332 @@ +// Copyright (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.AvailableWorkloadProfilesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; +import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfilesCollection; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in AvailableWorkloadProfilesClient. */ +public final class AvailableWorkloadProfilesClientImpl implements AvailableWorkloadProfilesClient { + /** The proxy service used to perform REST calls. */ + private final AvailableWorkloadProfilesService service; + + /** The service client containing this operation class. */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of AvailableWorkloadProfilesClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + AvailableWorkloadProfilesClientImpl(ContainerAppsApiClientImpl client) { + this.service = + RestProxy + .create( + AvailableWorkloadProfilesService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientAvailableWorkloadProfiles to be used by the + * proxy service to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + private interface AvailableWorkloadProfilesService { + @Headers({"Content-Type: application/json"}) + @Get( + "/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}" + + "/availableManagedEnvironmentsWorkloadProfileTypes") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get available workload profiles by location. + * + *

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

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

Get all available workload profiles for a location. + * + * @param location The name of Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all available workload profiles for a location as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getAsync(String location) { + return new PagedFlux<>(() -> getSinglePageAsync(location), nextLink -> getNextSinglePageAsync(nextLink)); + } + + /** + * Get available workload profiles by location. + * + *

Get all available workload profiles for a location. + * + * @param location The name of Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all available workload profiles for a location as paginated response with {@link PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux getAsync(String location, Context context) { + return new PagedFlux<>( + () -> getSinglePageAsync(location, context), nextLink -> getNextSinglePageAsync(nextLink, context)); + } + + /** + * Get available workload profiles by location. + * + *

Get all available workload profiles for a location. + * + * @param location The name of Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all available workload profiles for a location as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable get(String location) { + return new PagedIterable<>(getAsync(location)); + } + + /** + * Get available workload profiles by location. + * + *

Get all available workload profiles for a location. + * + * @param location The name of Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all available workload profiles for a location as paginated response with {@link PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable get(String location, Context context) { + return new PagedIterable<>(getAsync(location, context)); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

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

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of available workload profiles in the location along with {@link PagedResponse} on successful + * completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .getNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesImpl.java new file mode 100644 index 000000000000..51a0cb9f72df --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/AvailableWorkloadProfilesImpl.java @@ -0,0 +1,46 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; +import com.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.AvailableWorkloadProfilesClient; +import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; +import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfile; +import com.azure.resourcemanager.appcontainers.models.AvailableWorkloadProfiles; + +public final class AvailableWorkloadProfilesImpl implements AvailableWorkloadProfiles { + private static final ClientLogger LOGGER = new ClientLogger(AvailableWorkloadProfilesImpl.class); + + private final AvailableWorkloadProfilesClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public AvailableWorkloadProfilesImpl( + AvailableWorkloadProfilesClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public PagedIterable get(String location) { + PagedIterable inner = this.serviceClient().get(location); + return Utils.mapPage(inner, inner1 -> new AvailableWorkloadProfileImpl(inner1, this.manager())); + } + + public PagedIterable get(String location, Context context) { + PagedIterable inner = this.serviceClient().get(location, context); + return Utils.mapPage(inner, inner1 -> new AvailableWorkloadProfileImpl(inner1, this.manager())); + } + + private AvailableWorkloadProfilesClient 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/BillingMeterCollectionImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMeterCollectionImpl.java new file mode 100644 index 000000000000..309f306eadbb --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMeterCollectionImpl.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner; +import com.azure.resourcemanager.appcontainers.models.BillingMeter; +import com.azure.resourcemanager.appcontainers.models.BillingMeterCollection; +import java.util.Collections; +import java.util.List; + +public final class BillingMeterCollectionImpl implements BillingMeterCollection { + private BillingMeterCollectionInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + BillingMeterCollectionImpl( + BillingMeterCollectionInner 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); + } else { + return Collections.emptyList(); + } + } + + public BillingMeterCollectionInner 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/BillingMetersClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersClientImpl.java new file mode 100644 index 000000000000..98f328927105 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersClientImpl.java @@ -0,0 +1,199 @@ +// Copyright (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.BillingMetersClient; +import com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner; +import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; +import reactor.core.publisher.Mono; + +/** An instance of this class provides access to all the operations defined in BillingMetersClient. */ +public final class BillingMetersClientImpl implements BillingMetersClient { + /** The proxy service used to perform REST calls. */ + private final BillingMetersService service; + + /** The service client containing this operation class. */ + private final ContainerAppsApiClientImpl client; + + /** + * Initializes an instance of BillingMetersClientImpl. + * + * @param client the instance of the service client containing this operation class. + */ + BillingMetersClientImpl(ContainerAppsApiClientImpl client) { + this.service = + RestProxy.create(BillingMetersService.class, client.getHttpPipeline(), client.getSerializerAdapter()); + this.client = client; + } + + /** + * The interface defining all the services for ContainerAppsApiClientBillingMeters to be used by the proxy service + * to perform REST calls. + */ + @Host("{$host}") + @ServiceInterface(name = "ContainerAppsApiClie") + private interface BillingMetersService { + @Headers({"Content-Type: application/json"}) + @Get("/subscriptions/{subscriptionId}/providers/Microsoft.App/locations/{location}/billingMeters") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> get( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("location") String location, + @QueryParam("api-version") String apiVersion, + @HeaderParam("Accept") String accept, + Context context); + } + + /** + * Get billing meters by location. + * + *

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

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

Get all billingMeters for a location. + * + * @param location The name of Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all billingMeters for a location on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAsync(String location) { + return getWithResponseAsync(location).flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get billing meters by location. + * + *

Get all billingMeters for a location. + * + * @param location The name of Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 billingMeters for a location along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getWithResponse(String location, Context context) { + return getWithResponseAsync(location, context).block(); + } + + /** + * Get billing meters by location. + * + *

Get all billingMeters for a location. + * + * @param location The name of Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all billingMeters for a location. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public BillingMeterCollectionInner get(String location) { + return getWithResponse(location, Context.NONE).getValue(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersImpl.java new file mode 100644 index 000000000000..5032c704cca8 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/BillingMetersImpl.java @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.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.BillingMetersClient; +import com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner; +import com.azure.resourcemanager.appcontainers.models.BillingMeterCollection; +import com.azure.resourcemanager.appcontainers.models.BillingMeters; + +public final class BillingMetersImpl implements BillingMeters { + private static final ClientLogger LOGGER = new ClientLogger(BillingMetersImpl.class); + + private final BillingMetersClient innerClient; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + public BillingMetersImpl( + BillingMetersClient innerClient, + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager) { + this.innerClient = innerClient; + this.serviceManager = serviceManager; + } + + public Response getWithResponse(String location, Context context) { + Response inner = this.serviceClient().getWithResponse(location, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new BillingMeterCollectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public BillingMeterCollection get(String location) { + BillingMeterCollectionInner inner = this.serviceClient().get(location); + if (inner != null) { + return new BillingMeterCollectionImpl(inner, this.manager()); + } else { + return null; + } + } + + private BillingMetersClient 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/CertificatesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesClientImpl.java index 419aa65a6c9f..b3ab88433a8d 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 @@ -466,14 +466,16 @@ private Mono getAsync(String resourceGroupName, String environ * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param certificateName Name of the Certificate. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException 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. + * @return the specified Certificate along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CertificateInner get(String resourceGroupName, String environmentName, String certificateName) { - return getAsync(resourceGroupName, environmentName, certificateName).block(); + public Response getWithResponse( + String resourceGroupName, String environmentName, String certificateName, Context context) { + return getWithResponseAsync(resourceGroupName, environmentName, certificateName, context).block(); } /** @@ -482,16 +484,14 @@ public CertificateInner get(String resourceGroupName, String environmentName, St * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param certificateName Name of the Certificate. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate along with {@link Response}. + * @return the specified Certificate. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String environmentName, String certificateName, Context context) { - return getWithResponseAsync(resourceGroupName, environmentName, certificateName, context).block(); + public CertificateInner get(String resourceGroupName, String environmentName, String certificateName) { + return getWithResponse(resourceGroupName, environmentName, certificateName, Context.NONE).getValue(); } /** @@ -627,7 +627,6 @@ private Mono> createOrUpdateWithResponseAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param certificateName Name of the Certificate. - * @param certificateEnvelope Certificate to be created or updated. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -636,10 +635,8 @@ private Mono> createOrUpdateWithResponseAsync( */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono createOrUpdateAsync( - String resourceGroupName, - String environmentName, - String certificateName, - CertificateInner certificateEnvelope) { + String resourceGroupName, String environmentName, String certificateName) { + final CertificateInner certificateEnvelope = null; return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, certificateName, certificateEnvelope) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -650,18 +647,24 @@ private Mono createOrUpdateAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param certificateName Name of the Certificate. + * @param certificateEnvelope Certificate to be created or updated. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono createOrUpdateAsync( - String resourceGroupName, String environmentName, String certificateName) { - final CertificateInner certificateEnvelope = null; - return createOrUpdateWithResponseAsync(resourceGroupName, environmentName, certificateName, certificateEnvelope) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String environmentName, + String certificateName, + CertificateInner certificateEnvelope, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, environmentName, certificateName, certificateEnvelope, context) + .block(); } /** @@ -678,33 +681,9 @@ private Mono createOrUpdateAsync( @ServiceMethod(returns = ReturnType.SINGLE) public CertificateInner createOrUpdate(String resourceGroupName, String environmentName, String certificateName) { final CertificateInner certificateEnvelope = null; - return createOrUpdateAsync(resourceGroupName, environmentName, certificateName, certificateEnvelope).block(); - } - - /** - * Create or Update a Certificate. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param environmentName Name of the Managed Environment. - * @param certificateName Name of the Certificate. - * @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 environmentName, - String certificateName, - CertificateInner certificateEnvelope, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, environmentName, certificateName, certificateEnvelope, context) - .block(); + return createOrUpdateWithResponse( + resourceGroupName, environmentName, certificateName, certificateEnvelope, Context.NONE) + .getValue(); } /** @@ -838,13 +817,16 @@ private Mono deleteAsync(String resourceGroupName, String environmentName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param certificateName Name of the Certificate. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException 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 void delete(String resourceGroupName, String environmentName, String certificateName) { - deleteAsync(resourceGroupName, environmentName, certificateName).block(); + public Response deleteWithResponse( + String resourceGroupName, String environmentName, String certificateName, Context context) { + return deleteWithResponseAsync(resourceGroupName, environmentName, certificateName, context).block(); } /** @@ -853,20 +835,19 @@ public void delete(String resourceGroupName, String environmentName, String cert * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param certificateName Name of the Certificate. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String environmentName, String certificateName, Context context) { - return deleteWithResponseAsync(resourceGroupName, environmentName, certificateName, context).block(); + public void delete(String resourceGroupName, String environmentName, String certificateName) { + deleteWithResponse(resourceGroupName, environmentName, certificateName, Context.NONE); } /** - * 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 +914,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 +982,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,56 +1007,63 @@ 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. * @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. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment along with {@link + * Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CertificateInner update( + public Response updateWithResponse( String resourceGroupName, String environmentName, String certificateName, - CertificatePatch certificateEnvelope) { - return updateAsync(resourceGroupName, environmentName, certificateName, certificateEnvelope).block(); + CertificatePatch certificateEnvelope, + Context context) { + return updateWithResponseAsync( + resourceGroupName, environmentName, certificateName, certificateEnvelope, context) + .block(); } /** - * 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. * @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}. + * @return certificate used for Custom Domain bindings of Container Apps in a Managed Environment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response updateWithResponse( + public CertificateInner update( String resourceGroupName, String environmentName, String certificateName, - CertificatePatch certificateEnvelope, - Context context) { - return updateWithResponseAsync( - resourceGroupName, environmentName, certificateName, certificateEnvelope, context) - .block(); + CertificatePatch certificateEnvelope) { + return updateWithResponse( + resourceGroupName, environmentName, certificateName, certificateEnvelope, Context.NONE) + .getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1106,7 +1098,8 @@ private Mono> listNextSinglePageAsync(String nex /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesImpl.java index a90933faa056..86498b92b8ee 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/CertificatesImpl.java @@ -38,15 +38,6 @@ public PagedIterable list(String resourceGroupName, String environm return Utils.mapPage(inner, inner1 -> new CertificateImpl(inner1, this.manager())); } - public Certificate get(String resourceGroupName, String environmentName, String certificateName) { - CertificateInner inner = this.serviceClient().get(resourceGroupName, environmentName, certificateName); - if (inner != null) { - return new CertificateImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String environmentName, String certificateName, Context context) { Response inner = @@ -62,8 +53,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String environmentName, String certificateName) { - this.serviceClient().delete(resourceGroupName, environmentName, certificateName); + public Certificate get(String resourceGroupName, String environmentName, String certificateName) { + CertificateInner inner = this.serviceClient().get(resourceGroupName, environmentName, certificateName); + if (inner != null) { + return new CertificateImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -71,6 +67,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, certificateName, context); } + public void delete(String resourceGroupName, String environmentName, String certificateName) { + this.serviceClient().delete(resourceGroupName, environmentName, certificateName); + } + public Certificate getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentImpl.java new file mode 100644 index 000000000000..1542491103f8 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentImpl.java @@ -0,0 +1,220 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.implementation; + +import com.azure.core.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.CustomDomainConfiguration; +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 CustomDomainConfiguration customDomainConfiguration() { + return this.innerModel().customDomainConfiguration(); + } + + 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; + } + + public ConnectedEnvironmentImpl withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration) { + this.innerModel().withCustomDomainConfiguration(customDomainConfiguration); + 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..4b0c4f9f133e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsCertificatesClientImpl.java @@ -0,0 +1,1156 @@ +// Copyright (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. + * @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(); + } + + /** + * 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 getWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, Context.NONE).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. + * @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. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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. + * @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(); + } + + /** + * 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 createOrUpdateWithResponse( + resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, Context.NONE) + .getValue(); + } + + /** + * Deletes the specified Certificate. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Connected Environment. + * @param certificateName Name of the Certificate. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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. + * @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(); + } + + /** + * 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) { + deleteWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, Context.NONE); + } + + /** + * 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. + * @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(); + } + + /** + * 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 updateWithResponse( + resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, Context.NONE) + .getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of 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..851e48480365 --- /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 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 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 createOrUpdateWithResponse( + String resourceGroupName, + String connectedEnvironmentName, + String certificateName, + CertificateInner certificateEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateWithResponse( + resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CertificateImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Certificate createOrUpdate( + String resourceGroupName, String connectedEnvironmentName, String certificateName) { + CertificateInner inner = + this.serviceClient().createOrUpdate(resourceGroupName, connectedEnvironmentName, certificateName); + if (inner != null) { + return new CertificateImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse( + String resourceGroupName, String connectedEnvironmentName, String certificateName, Context context) { + return this + .serviceClient() + .deleteWithResponse(resourceGroupName, connectedEnvironmentName, certificateName, context); + } + + public void delete(String resourceGroupName, String connectedEnvironmentName, String certificateName) { + this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, certificateName); + } + + public Response updateWithResponse( + String resourceGroupName, + String connectedEnvironmentName, + String certificateName, + CertificatePatch certificateEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .updateWithResponse( + resourceGroupName, connectedEnvironmentName, certificateName, certificateEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CertificateImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public Certificate 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; + } + } + + 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..c19ba549ecf2 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsClientImpl.java @@ -0,0 +1,1702 @@ +// Copyright (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. + * @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(); + } + + /** + * 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 getByResourceGroupWithResponse(resourceGroupName, connectedEnvironmentName, Context.NONE).getValue(); + } + + /** + * 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. + * @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(); + } + + /** + * 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 updateWithResponse(resourceGroupName, connectedEnvironmentName, Context.NONE).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 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. + * @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(); + } + + /** + * 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 checkNameAvailabilityWithResponse( + resourceGroupName, connectedEnvironmentName, checkNameAvailabilityRequest, Context.NONE) + .getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of 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 URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of 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 URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of 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..bb0656b535b8 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsDaprComponentsClientImpl.java @@ -0,0 +1,1124 @@ +// Copyright (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. + * @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(); + } + + /** + * 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 getWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE).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 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. + * @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(); + } + + /** + * 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 createOrUpdateWithResponse( + resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope, Context.NONE) + .getValue(); + } + + /** + * 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. + * @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(); + } + + /** + * 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) { + deleteWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE); + } + + /** + * 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 for ListSecrets Action 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 for ListSecrets Action 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 for ListSecrets Action 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. + * @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 for ListSecrets Action 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(); + } + + /** + * 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 for ListSecrets Action. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public DaprSecretsCollectionInner listSecrets( + String resourceGroupName, String connectedEnvironmentName, String componentName) { + return listSecretsWithResponse(resourceGroupName, connectedEnvironmentName, componentName, Context.NONE) + .getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr 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..14b9d452dbc3 --- /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 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 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 createOrUpdateWithResponse( + String resourceGroupName, + String connectedEnvironmentName, + String componentName, + DaprComponentInner daprComponentEnvelope, + Context context) { + Response inner = + this + .serviceClient() + .createOrUpdateWithResponse( + resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DaprComponentImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DaprComponent createOrUpdate( + String resourceGroupName, + String connectedEnvironmentName, + String componentName, + DaprComponentInner daprComponentEnvelope) { + DaprComponentInner inner = + this + .serviceClient() + .createOrUpdate(resourceGroupName, connectedEnvironmentName, componentName, daprComponentEnvelope); + if (inner != null) { + return new DaprComponentImpl(inner, this.manager()); + } else { + return null; + } + } + + public Response deleteWithResponse( + String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { + return this + .serviceClient() + .deleteWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); + } + + public void delete(String resourceGroupName, String connectedEnvironmentName, String componentName) { + this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, componentName); + } + + public Response listSecretsWithResponse( + String resourceGroupName, String connectedEnvironmentName, String componentName, Context context) { + Response inner = + this + .serviceClient() + .listSecretsWithResponse(resourceGroupName, connectedEnvironmentName, componentName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new DaprSecretsCollectionImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public DaprSecretsCollection listSecrets( + String resourceGroupName, String connectedEnvironmentName, String componentName) { + DaprSecretsCollectionInner inner = + this.serviceClient().listSecrets(resourceGroupName, connectedEnvironmentName, componentName); + if (inner != null) { + return new DaprSecretsCollectionImpl(inner, 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..2f185c945d12 --- /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 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 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 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 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 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 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 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 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..b74dc46476d2 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ConnectedEnvironmentsStoragesClientImpl.java @@ -0,0 +1,798 @@ +// Copyright (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. + * @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 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 listWithResponse(resourceGroupName, connectedEnvironmentName, Context.NONE).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 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. + * @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(); + } + + /** + * 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 getWithResponse(resourceGroupName, connectedEnvironmentName, storageName, Context.NONE).getValue(); + } + + /** + * Create or update storage for a connectedEnvironment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @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. + * @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(); + } + + /** + * 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 createOrUpdateWithResponse( + resourceGroupName, connectedEnvironmentName, storageName, storageEnvelope, Context.NONE) + .getValue(); + } + + /** + * Delete storage for a connectedEnvironment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the Environment. + * @param storageName Name of the storage. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException 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. + * @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(); + } + + /** + * 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) { + deleteWithResponse(resourceGroupName, connectedEnvironmentName, storageName, Context.NONE); + } +} 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..a6bcb614f45f --- /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 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 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 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 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 deleteWithResponse( + String resourceGroupName, String connectedEnvironmentName, String storageName, Context context) { + return this + .serviceClient() + .deleteWithResponse(resourceGroupName, connectedEnvironmentName, storageName, context); + } + + public void delete(String resourceGroupName, String connectedEnvironmentName, String storageName) { + this.serviceClient().delete(resourceGroupName, connectedEnvironmentName, storageName); + } + + 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/ContainerAppAuthTokenImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppAuthTokenImpl.java new file mode 100644 index 000000000000..186b92d42676 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppAuthTokenImpl.java @@ -0,0 +1,70 @@ +// Copyright (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.ContainerAppAuthTokenInner; +import com.azure.resourcemanager.appcontainers.models.ContainerAppAuthToken; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.Map; + +public final class ContainerAppAuthTokenImpl implements ContainerAppAuthToken { + private ContainerAppAuthTokenInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + ContainerAppAuthTokenImpl( + ContainerAppAuthTokenInner 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 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 SystemData systemData() { + return this.innerModel().systemData(); + } + + public String token() { + return this.innerModel().token(); + } + + public OffsetDateTime expires() { + return this.innerModel().expires(); + } + + public ContainerAppAuthTokenInner 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/ContainerAppImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppImpl.java index 3a5ee744f975..26f5c8d21376 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 @@ -6,12 +6,15 @@ import com.azure.core.http.rest.Response; 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.ContainerAppInner; import com.azure.resourcemanager.appcontainers.models.Configuration; import com.azure.resourcemanager.appcontainers.models.ContainerApp; +import com.azure.resourcemanager.appcontainers.models.ContainerAppAuthToken; import com.azure.resourcemanager.appcontainers.models.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,10 +52,18 @@ public Map tags() { } } + public ExtendedLocation extendedLocation() { + return this.innerModel().extendedLocation(); + } + public ManagedServiceIdentity identity() { return this.innerModel().identity(); } + public SystemData systemData() { + return this.innerModel().systemData(); + } + public ContainerAppProvisioningState provisioningState() { return this.innerModel().provisioningState(); } @@ -61,6 +72,14 @@ public String managedEnvironmentId() { return this.innerModel().managedEnvironmentId(); } + public String environmentId() { + return this.innerModel().environmentId(); + } + + public String workloadProfileType() { + return this.innerModel().workloadProfileType(); + } + public String latestRevisionName() { return this.innerModel().latestRevisionName(); } @@ -90,6 +109,10 @@ public List outboundIpAddresses() { } } + public String eventStreamEndpoint() { + return this.innerModel().eventStreamEndpoint(); + } + public Region region() { return Region.fromName(this.regionName()); } @@ -193,10 +216,6 @@ public ContainerApp refresh(Context context) { return this; } - public CustomHostnameAnalysisResult listCustomHostnameAnalysis() { - return serviceManager.containerApps().listCustomHostnameAnalysis(resourceGroupName, containerAppName); - } - public Response listCustomHostnameAnalysisWithResponse( String customHostname, Context context) { return serviceManager @@ -204,14 +223,26 @@ public Response listCustomHostnameAnalysisWithResp .listCustomHostnameAnalysisWithResponse(resourceGroupName, containerAppName, customHostname, context); } - public SecretsCollection listSecrets() { - return serviceManager.containerApps().listSecrets(resourceGroupName, containerAppName); + public CustomHostnameAnalysisResult listCustomHostnameAnalysis() { + return serviceManager.containerApps().listCustomHostnameAnalysis(resourceGroupName, containerAppName); } public Response listSecretsWithResponse(Context context) { return serviceManager.containerApps().listSecretsWithResponse(resourceGroupName, containerAppName, context); } + public SecretsCollection listSecrets() { + return serviceManager.containerApps().listSecrets(resourceGroupName, containerAppName); + } + + public Response getAuthTokenWithResponse(Context context) { + return serviceManager.containerApps().getAuthTokenWithResponse(resourceGroupName, containerAppName, context); + } + + public ContainerAppAuthToken getAuthToken() { + return serviceManager.containerApps().getAuthToken(resourceGroupName, containerAppName); + } + public ContainerAppImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -227,6 +258,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 +273,16 @@ public ContainerAppImpl withManagedEnvironmentId(String managedEnvironmentId) { return this; } + public ContainerAppImpl withEnvironmentId(String environmentId) { + this.innerModel().withEnvironmentId(environmentId); + return this; + } + + public ContainerAppImpl withWorkloadProfileType(String workloadProfileType) { + this.innerModel().withWorkloadProfileType(workloadProfileType); + 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..ae4e2dfa8dc6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsApiClientImpl.java @@ -22,15 +22,24 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.serializer.SerializerAdapter; import com.azure.core.util.serializer.SerializerEncoding; +import com.azure.resourcemanager.appcontainers.fluent.AvailableWorkloadProfilesClient; +import com.azure.resourcemanager.appcontainers.fluent.BillingMetersClient; 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 +187,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 +295,78 @@ public ContainerAppsSourceControlsClient getContainerAppsSourceControls() { return this.containerAppsSourceControls; } + /** The ConnectedEnvironmentsClient object to access its operations. */ + private final ConnectedEnvironmentsClient connectedEnvironments; + + /** + * Gets the ConnectedEnvironmentsClient object to access its operations. + * + * @return the ConnectedEnvironmentsClient object. + */ + public ConnectedEnvironmentsClient getConnectedEnvironments() { + return this.connectedEnvironments; + } + + /** The ConnectedEnvironmentsCertificatesClient object to access its operations. */ + private final ConnectedEnvironmentsCertificatesClient connectedEnvironmentsCertificates; + + /** + * Gets the ConnectedEnvironmentsCertificatesClient object to access its operations. + * + * @return the ConnectedEnvironmentsCertificatesClient object. + */ + public ConnectedEnvironmentsCertificatesClient getConnectedEnvironmentsCertificates() { + return this.connectedEnvironmentsCertificates; + } + + /** The ConnectedEnvironmentsDaprComponentsClient object to access its operations. */ + private final ConnectedEnvironmentsDaprComponentsClient connectedEnvironmentsDaprComponents; + + /** + * Gets the ConnectedEnvironmentsDaprComponentsClient object to access its operations. + * + * @return the ConnectedEnvironmentsDaprComponentsClient object. + */ + public ConnectedEnvironmentsDaprComponentsClient getConnectedEnvironmentsDaprComponents() { + return this.connectedEnvironmentsDaprComponents; + } + + /** The ConnectedEnvironmentsStoragesClient object to access its operations. */ + private final ConnectedEnvironmentsStoragesClient connectedEnvironmentsStorages; + + /** + * Gets the ConnectedEnvironmentsStoragesClient object to access its operations. + * + * @return the ConnectedEnvironmentsStoragesClient object. + */ + public ConnectedEnvironmentsStoragesClient getConnectedEnvironmentsStorages() { + return this.connectedEnvironmentsStorages; + } + + /** The AvailableWorkloadProfilesClient object to access its operations. */ + private final AvailableWorkloadProfilesClient availableWorkloadProfiles; + + /** + * Gets the AvailableWorkloadProfilesClient object to access its operations. + * + * @return the AvailableWorkloadProfilesClient object. + */ + public AvailableWorkloadProfilesClient getAvailableWorkloadProfiles() { + return this.availableWorkloadProfiles; + } + + /** The BillingMetersClient object to access its operations. */ + private final BillingMetersClient billingMeters; + + /** + * Gets the BillingMetersClient object to access its operations. + * + * @return the BillingMetersClient object. + */ + public BillingMetersClient getBillingMeters() { + return this.billingMeters; + } + /** * Initializes an instance of ContainerAppsApiClient client. * @@ -272,18 +389,27 @@ 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); + this.availableWorkloadProfiles = new AvailableWorkloadProfilesClientImpl(this); + this.billingMeters = new BillingMetersClientImpl(this); } /** diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsClientImpl.java index 3a7906db0ca5..7af8a2bde9c4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsClientImpl.java @@ -448,14 +448,16 @@ private Mono getAsync(String resourceGroupName, String containe * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 AuthConfig of a Container App. + * @return a AuthConfig of a Container App along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AuthConfigInner get(String resourceGroupName, String containerAppName, String authConfigName) { - return getAsync(resourceGroupName, containerAppName, authConfigName).block(); + public Response getWithResponse( + String resourceGroupName, String containerAppName, String authConfigName, Context context) { + return getWithResponseAsync(resourceGroupName, containerAppName, authConfigName, context).block(); } /** @@ -464,16 +466,14 @@ public AuthConfigInner get(String resourceGroupName, String containerAppName, St * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 AuthConfig of a Container App along with {@link Response}. + * @return a AuthConfig of a Container App. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String containerAppName, String authConfigName, Context context) { - return getWithResponseAsync(resourceGroupName, containerAppName, authConfigName, context).block(); + public AuthConfigInner get(String resourceGroupName, String containerAppName, String authConfigName) { + return getWithResponse(resourceGroupName, containerAppName, authConfigName, Context.NONE).getValue(); } /** @@ -631,15 +631,23 @@ private Mono createOrUpdateAsync( * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. * @param authConfigEnvelope Properties used to create a Container App AuthConfig. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration settings for the Azure ContainerApp Service Authentication / Authorization feature. + * @return configuration settings for the Azure ContainerApp Service Authentication / Authorization feature along + * with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public AuthConfigInner createOrUpdate( - String resourceGroupName, String containerAppName, String authConfigName, AuthConfigInner authConfigEnvelope) { - return createOrUpdateAsync(resourceGroupName, containerAppName, authConfigName, authConfigEnvelope).block(); + public Response createOrUpdateWithResponse( + String resourceGroupName, + String containerAppName, + String authConfigName, + AuthConfigInner authConfigEnvelope, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, containerAppName, authConfigName, authConfigEnvelope, context) + .block(); } /** @@ -649,23 +657,17 @@ public AuthConfigInner createOrUpdate( * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. * @param authConfigEnvelope Properties used to create a Container App AuthConfig. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return configuration settings for the Azure ContainerApp Service Authentication / Authorization feature along - * with {@link Response}. + * @return configuration settings for the Azure ContainerApp Service Authentication / Authorization feature. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( - String resourceGroupName, - String containerAppName, - String authConfigName, - AuthConfigInner authConfigEnvelope, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, containerAppName, authConfigName, authConfigEnvelope, context) - .block(); + public AuthConfigInner createOrUpdate( + String resourceGroupName, String containerAppName, String authConfigName, AuthConfigInner authConfigEnvelope) { + return createOrUpdateWithResponse( + resourceGroupName, containerAppName, authConfigName, authConfigEnvelope, Context.NONE) + .getValue(); } /** @@ -797,13 +799,16 @@ private Mono deleteAsync(String resourceGroupName, String containerAppName * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException 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 void delete(String resourceGroupName, String containerAppName, String authConfigName) { - deleteAsync(resourceGroupName, containerAppName, authConfigName).block(); + public Response deleteWithResponse( + String resourceGroupName, String containerAppName, String authConfigName, Context context) { + return deleteWithResponseAsync(resourceGroupName, containerAppName, authConfigName, context).block(); } /** @@ -812,22 +817,20 @@ public void delete(String resourceGroupName, String containerAppName, String aut * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException 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 containerAppName, String authConfigName, Context context) { - return deleteWithResponseAsync(resourceGroupName, containerAppName, authConfigName, context).block(); + public void delete(String resourceGroupName, String containerAppName, String authConfigName) { + deleteWithResponse(resourceGroupName, containerAppName, authConfigName, Context.NONE); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -864,7 +867,8 @@ private Mono> listByContainerAppNextSinglePageAsy /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsImpl.java index 251484d02d15..b9c6591e44ca 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsAuthConfigsImpl.java @@ -41,15 +41,6 @@ public PagedIterable listByContainerApp( return Utils.mapPage(inner, inner1 -> new AuthConfigImpl(inner1, this.manager())); } - public AuthConfig get(String resourceGroupName, String containerAppName, String authConfigName) { - AuthConfigInner inner = this.serviceClient().get(resourceGroupName, containerAppName, authConfigName); - if (inner != null) { - return new AuthConfigImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String containerAppName, String authConfigName, Context context) { Response inner = @@ -65,8 +56,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String containerAppName, String authConfigName) { - this.serviceClient().delete(resourceGroupName, containerAppName, authConfigName); + public AuthConfig get(String resourceGroupName, String containerAppName, String authConfigName) { + AuthConfigInner inner = this.serviceClient().get(resourceGroupName, containerAppName, authConfigName); + if (inner != null) { + return new AuthConfigImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -74,6 +70,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, containerAppName, authConfigName, context); } + public void delete(String resourceGroupName, String containerAppName, String authConfigName) { + this.serviceClient().delete(resourceGroupName, containerAppName, authConfigName); + } + public AuthConfig getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsClientImpl.java index e458a6c8c21f..0aafa672aee8 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 @@ -34,6 +34,7 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppAuthTokenInner; import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; import com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner; import com.azure.resourcemanager.appcontainers.fluent.models.SecretsCollectionInner; @@ -185,6 +186,21 @@ Mono> listSecrets( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" + + "/{containerAppName}/getAuthtoken") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(ManagementException.class) + Mono> getAuthToken( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("containerAppName") String containerAppName, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -631,14 +647,16 @@ private Mono getByResourceGroupAsync(String resourceGroupName * * @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. + * @return the properties of a Container App along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ContainerAppInner getByResourceGroup(String resourceGroupName, String containerAppName) { - return getByResourceGroupAsync(resourceGroupName, containerAppName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String containerAppName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, containerAppName, context).block(); } /** @@ -646,16 +664,14 @@ public ContainerAppInner getByResourceGroup(String resourceGroupName, String con * * @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}. + * @return the properties of a Container App. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String containerAppName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, containerAppName, context).block(); + public ContainerAppInner getByResourceGroup(String resourceGroupName, String containerAppName) { + return getByResourceGroupWithResponse(resourceGroupName, containerAppName, Context.NONE).getValue(); } /** @@ -1163,7 +1179,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 +1238,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 +1295,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 +1319,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 +1344,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 +1363,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 +1383,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 +1404,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 +1426,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 +1443,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. @@ -1530,7 +1566,6 @@ private Mono> listCustomHostnameAnal * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. - * @param customHostname Custom hostname. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1538,7 +1573,8 @@ private Mono> listCustomHostnameAnal */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listCustomHostnameAnalysisAsync( - String resourceGroupName, String containerAppName, String customHostname) { + String resourceGroupName, String containerAppName) { + final String customHostname = null; return listCustomHostnameAnalysisWithResponseAsync(resourceGroupName, containerAppName, customHostname) .flatMap(res -> Mono.justOrEmpty(res.getValue())); } @@ -1548,17 +1584,18 @@ private Mono listCustomHostnameAnalysisAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. + * @param customHostname Custom hostname. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return custom domain analysis on successful completion of {@link Mono}. + * @return custom domain analysis along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - private Mono listCustomHostnameAnalysisAsync( - String resourceGroupName, String containerAppName) { - final String customHostname = null; - return listCustomHostnameAnalysisWithResponseAsync(resourceGroupName, containerAppName, customHostname) - .flatMap(res -> Mono.justOrEmpty(res.getValue())); + public Response listCustomHostnameAnalysisWithResponse( + String resourceGroupName, String containerAppName, String customHostname, Context context) { + return listCustomHostnameAnalysisWithResponseAsync(resourceGroupName, containerAppName, customHostname, context) + .block(); } /** @@ -1575,26 +1612,8 @@ private Mono listCustomHostnameAnalysisAsync( public CustomHostnameAnalysisResultInner listCustomHostnameAnalysis( String resourceGroupName, String containerAppName) { final String customHostname = null; - return listCustomHostnameAnalysisAsync(resourceGroupName, containerAppName, customHostname).block(); - } - - /** - * Analyzes a custom hostname for a Container App. - * - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param containerAppName Name of the Container App. - * @param customHostname Custom hostname. - * @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 custom domain analysis along with {@link Response}. - */ - @ServiceMethod(returns = ReturnType.SINGLE) - public Response listCustomHostnameAnalysisWithResponse( - String resourceGroupName, String containerAppName, String customHostname, Context context) { - return listCustomHostnameAnalysisWithResponseAsync(resourceGroupName, containerAppName, customHostname, context) - .block(); + return listCustomHostnameAnalysisWithResponse(resourceGroupName, containerAppName, customHostname, Context.NONE) + .getValue(); } /** @@ -1711,6 +1730,23 @@ private Mono listSecretsAsync(String resourceGroupName, .flatMap(res -> Mono.justOrEmpty(res.getValue())); } + /** + * List secrets for a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return container App Secrets Collection ARM resource along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response listSecretsWithResponse( + String resourceGroupName, String containerAppName, Context context) { + return listSecretsWithResponseAsync(resourceGroupName, containerAppName, context).block(); + } + /** * List secrets for a container app. * @@ -1723,30 +1759,158 @@ private Mono listSecretsAsync(String resourceGroupName, */ @ServiceMethod(returns = ReturnType.SINGLE) public SecretsCollectionInner listSecrets(String resourceGroupName, String containerAppName) { - return listSecretsAsync(resourceGroupName, containerAppName).block(); + return listSecretsWithResponse(resourceGroupName, containerAppName, Context.NONE).getValue(); } /** - * List secrets for a container app. + * Get auth token for a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return auth token for a container app along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAuthTokenWithResponseAsync( + String resourceGroupName, String containerAppName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 + .getAuthToken( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + containerAppName, + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get auth token for a container app. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Secrets Collection ARM resource along with {@link Response}. + * @return auth token for a container app along with {@link Response} on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listSecretsWithResponse( + private Mono> getAuthTokenWithResponseAsync( String resourceGroupName, String containerAppName, Context context) { - return listSecretsWithResponseAsync(resourceGroupName, containerAppName, context).block(); + 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 + .getAuthToken( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + containerAppName, + accept, + context); + } + + /** + * Get auth token for a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 auth token for a container app on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAuthTokenAsync(String resourceGroupName, String containerAppName) { + return getAuthTokenWithResponseAsync(resourceGroupName, containerAppName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get auth token for a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return auth token for a container app along with {@link Response}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public Response getAuthTokenWithResponse( + String resourceGroupName, String containerAppName, Context context) { + return getAuthTokenWithResponseAsync(resourceGroupName, containerAppName, context).block(); + } + + /** + * Get auth token for a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @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 auth token for a container app. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public ContainerAppAuthTokenInner getAuthToken(String resourceGroupName, String containerAppName) { + return getAuthTokenWithResponse(resourceGroupName, containerAppName, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1783,7 +1947,8 @@ private Mono> listBySubscriptionNextSinglePageA /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1821,7 +1986,8 @@ private Mono> listBySubscriptionNextSinglePageA /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1858,7 +2024,8 @@ private Mono> listByResourceGroupNextSinglePage /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. 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..fa0c2d32eb4a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsDiagnosticsClientImpl.java @@ -0,0 +1,1169 @@ +// Copyright (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. + * @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 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 getDetectorWithResponse(resourceGroupName, containerAppName, detectorName, Context.NONE).getValue(); + } + + /** + * 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. + * @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 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 getRevisionWithResponse(resourceGroupName, containerAppName, revisionName, Context.NONE).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 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. + * @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 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 getRootWithResponse(resourceGroupName, containerAppName, Context.NONE).getValue(); + } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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 URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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 URL to get the next list of items + *

The nextLink parameter. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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 URL to get the next list of items + *

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return 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..e640a600068b --- /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 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 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 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 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 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 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; + } + } + + 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; + } + } + + 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/ContainerAppsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsImpl.java index d996b14b32e7..10d93f3c80fc 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsImpl.java @@ -10,10 +10,12 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.appcontainers.fluent.ContainerAppsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppAuthTokenInner; import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; import com.azure.resourcemanager.appcontainers.fluent.models.CustomHostnameAnalysisResultInner; import com.azure.resourcemanager.appcontainers.fluent.models.SecretsCollectionInner; import com.azure.resourcemanager.appcontainers.models.ContainerApp; +import com.azure.resourcemanager.appcontainers.models.ContainerAppAuthToken; import com.azure.resourcemanager.appcontainers.models.ContainerApps; import com.azure.resourcemanager.appcontainers.models.CustomHostnameAnalysisResult; import com.azure.resourcemanager.appcontainers.models.SecretsCollection; @@ -52,15 +54,6 @@ public PagedIterable listByResourceGroup(String resourceGroupName, return Utils.mapPage(inner, inner1 -> new ContainerAppImpl(inner1, this.manager())); } - public ContainerApp getByResourceGroup(String resourceGroupName, String containerAppName) { - ContainerAppInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, containerAppName); - if (inner != null) { - return new ContainerAppImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String containerAppName, Context context) { Response inner = @@ -76,6 +69,15 @@ public Response getByResourceGroupWithResponse( } } + public ContainerApp getByResourceGroup(String resourceGroupName, String containerAppName) { + ContainerAppInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, containerAppName); + if (inner != null) { + return new ContainerAppImpl(inner, this.manager()); + } else { + return null; + } + } + public void deleteByResourceGroup(String resourceGroupName, String containerAppName) { this.serviceClient().delete(resourceGroupName, containerAppName); } @@ -93,6 +95,23 @@ public void update( this.serviceClient().update(resourceGroupName, containerAppName, containerAppEnvelope, context); } + public Response listCustomHostnameAnalysisWithResponse( + String resourceGroupName, String containerAppName, String customHostname, Context context) { + Response inner = + this + .serviceClient() + .listCustomHostnameAnalysisWithResponse(resourceGroupName, containerAppName, customHostname, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new CustomHostnameAnalysisResultImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + public CustomHostnameAnalysisResult listCustomHostnameAnalysis(String resourceGroupName, String containerAppName) { CustomHostnameAnalysisResultInner inner = this.serviceClient().listCustomHostnameAnalysis(resourceGroupName, containerAppName); @@ -103,18 +122,16 @@ public CustomHostnameAnalysisResult listCustomHostnameAnalysis(String resourceGr } } - public Response listCustomHostnameAnalysisWithResponse( - String resourceGroupName, String containerAppName, String customHostname, Context context) { - Response inner = - this - .serviceClient() - .listCustomHostnameAnalysisWithResponse(resourceGroupName, containerAppName, customHostname, context); + public Response listSecretsWithResponse( + String resourceGroupName, String containerAppName, Context context) { + Response inner = + this.serviceClient().listSecretsWithResponse(resourceGroupName, containerAppName, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new CustomHostnameAnalysisResultImpl(inner.getValue(), this.manager())); + new SecretsCollectionImpl(inner.getValue(), this.manager())); } else { return null; } @@ -129,16 +146,25 @@ public SecretsCollection listSecrets(String resourceGroupName, String containerA } } - public Response listSecretsWithResponse( + public Response getAuthTokenWithResponse( String resourceGroupName, String containerAppName, Context context) { - Response inner = - this.serviceClient().listSecretsWithResponse(resourceGroupName, containerAppName, context); + Response inner = + this.serviceClient().getAuthTokenWithResponse(resourceGroupName, containerAppName, context); if (inner != null) { return new SimpleResponse<>( inner.getRequest(), inner.getStatusCode(), inner.getHeaders(), - new SecretsCollectionImpl(inner.getValue(), this.manager())); + new ContainerAppAuthTokenImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public ContainerAppAuthToken getAuthToken(String resourceGroupName, String containerAppName) { + ContainerAppAuthTokenInner inner = this.serviceClient().getAuthToken(resourceGroupName, containerAppName); + if (inner != null) { + return new ContainerAppAuthTokenImpl(inner, this.manager()); } else { return null; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasClientImpl.java index 8a64d9269b4d..6b7ce6545dd6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasClientImpl.java @@ -234,15 +234,17 @@ private Mono getReplicaAsync( * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @param replicaName Name of the Container App Revision Replica. + * @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 replica for a Container App Revision. + * @return a replica for a Container App Revision along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicaInner getReplica( - String resourceGroupName, String containerAppName, String revisionName, String replicaName) { - return getReplicaAsync(resourceGroupName, containerAppName, revisionName, replicaName).block(); + public Response getReplicaWithResponse( + String resourceGroupName, String containerAppName, String revisionName, String replicaName, Context context) { + return getReplicaWithResponseAsync(resourceGroupName, containerAppName, revisionName, replicaName, context) + .block(); } /** @@ -252,17 +254,16 @@ public ReplicaInner getReplica( * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @param replicaName Name of the Container App Revision Replica. - * @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 replica for a Container App Revision along with {@link Response}. + * @return a replica for a Container App Revision. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getReplicaWithResponse( - String resourceGroupName, String containerAppName, String revisionName, String replicaName, Context context) { - return getReplicaWithResponseAsync(resourceGroupName, containerAppName, revisionName, replicaName, context) - .block(); + public ReplicaInner getReplica( + String resourceGroupName, String containerAppName, String revisionName, String replicaName) { + return getReplicaWithResponse(resourceGroupName, containerAppName, revisionName, replicaName, Context.NONE) + .getValue(); } /** @@ -397,14 +398,16 @@ private Mono listReplicasAsync( * @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 container App Revision Replicas collection ARM resource. + * @return container App Revision Replicas collection ARM resource along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ReplicaCollectionInner listReplicas(String resourceGroupName, String containerAppName, String revisionName) { - return listReplicasAsync(resourceGroupName, containerAppName, revisionName).block(); + public Response listReplicasWithResponse( + String resourceGroupName, String containerAppName, String revisionName, Context context) { + return listReplicasWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); } /** @@ -413,15 +416,13 @@ public ReplicaCollectionInner listReplicas(String resourceGroupName, String cont * @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 container App Revision Replicas collection ARM resource along with {@link Response}. + * @return container App Revision Replicas collection ARM resource. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listReplicasWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { - return listReplicasWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); + public ReplicaCollectionInner listReplicas(String resourceGroupName, String containerAppName, String revisionName) { + return listReplicasWithResponse(resourceGroupName, containerAppName, revisionName, Context.NONE).getValue(); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasImpl.java index 567bd0b4d88e..37db2d255db5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionReplicasImpl.java @@ -29,17 +29,6 @@ public ContainerAppsRevisionReplicasImpl( this.serviceManager = serviceManager; } - public Replica getReplica( - String resourceGroupName, String containerAppName, String revisionName, String replicaName) { - ReplicaInner inner = - this.serviceClient().getReplica(resourceGroupName, containerAppName, revisionName, replicaName); - if (inner != null) { - return new ReplicaImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getReplicaWithResponse( String resourceGroupName, String containerAppName, String revisionName, String replicaName, Context context) { Response inner = @@ -57,11 +46,12 @@ public Response getReplicaWithResponse( } } - public ReplicaCollection listReplicas(String resourceGroupName, String containerAppName, String revisionName) { - ReplicaCollectionInner inner = - this.serviceClient().listReplicas(resourceGroupName, containerAppName, revisionName); + public Replica getReplica( + String resourceGroupName, String containerAppName, String revisionName, String replicaName) { + ReplicaInner inner = + this.serviceClient().getReplica(resourceGroupName, containerAppName, revisionName, replicaName); if (inner != null) { - return new ReplicaCollectionImpl(inner, this.manager()); + return new ReplicaImpl(inner, this.manager()); } else { return null; } @@ -82,6 +72,16 @@ public Response listReplicasWithResponse( } } + public ReplicaCollection listReplicas(String resourceGroupName, String containerAppName, String revisionName) { + ReplicaCollectionInner inner = + this.serviceClient().listReplicas(resourceGroupName, containerAppName, revisionName); + if (inner != null) { + return new ReplicaCollectionImpl(inner, this.manager()); + } else { + return null; + } + } + private ContainerAppsRevisionReplicasClient serviceClient() { return this.innerClient; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsClientImpl.java index a480adfb7c7e..eb37e3d57d3a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsClientImpl.java @@ -490,14 +490,16 @@ private Mono getRevisionAsync( * @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. + * @return a revision of a Container App along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public RevisionInner getRevision(String resourceGroupName, String containerAppName, String revisionName) { - return getRevisionAsync(resourceGroupName, containerAppName, revisionName).block(); + public Response getRevisionWithResponse( + String resourceGroupName, String containerAppName, String revisionName, Context context) { + return getRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); } /** @@ -506,16 +508,14 @@ public RevisionInner getRevision(String resourceGroupName, String containerAppNa * @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}. + * @return a revision of a Container App. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { - return getRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); + public RevisionInner getRevision(String resourceGroupName, String containerAppName, String revisionName) { + return getRevisionWithResponse(resourceGroupName, containerAppName, revisionName, Context.NONE).getValue(); } /** @@ -647,13 +647,16 @@ private Mono activateRevisionAsync(String resourceGroupName, String contai * @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 the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void activateRevision(String resourceGroupName, String containerAppName, String revisionName) { - activateRevisionAsync(resourceGroupName, containerAppName, revisionName).block(); + public Response activateRevisionWithResponse( + String resourceGroupName, String containerAppName, String revisionName, Context context) { + return activateRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); } /** @@ -662,16 +665,13 @@ public void activateRevision(String resourceGroupName, String containerAppName, * @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 the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response activateRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { - return activateRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); + public void activateRevision(String resourceGroupName, String containerAppName, String revisionName) { + activateRevisionWithResponse(resourceGroupName, containerAppName, revisionName, Context.NONE); } /** @@ -803,13 +803,16 @@ private Mono deactivateRevisionAsync(String resourceGroupName, String cont * @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 the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void deactivateRevision(String resourceGroupName, String containerAppName, String revisionName) { - deactivateRevisionAsync(resourceGroupName, containerAppName, revisionName).block(); + public Response deactivateRevisionWithResponse( + String resourceGroupName, String containerAppName, String revisionName, Context context) { + return deactivateRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); } /** @@ -818,16 +821,13 @@ public void deactivateRevision(String resourceGroupName, String containerAppName * @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 the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deactivateRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { - return deactivateRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); + public void deactivateRevision(String resourceGroupName, String containerAppName, String revisionName) { + deactivateRevisionWithResponse(resourceGroupName, containerAppName, revisionName, Context.NONE); } /** @@ -959,13 +959,16 @@ private Mono restartRevisionAsync(String resourceGroupName, String contain * @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 the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public void restartRevision(String resourceGroupName, String containerAppName, String revisionName) { - restartRevisionAsync(resourceGroupName, containerAppName, revisionName).block(); + public Response restartRevisionWithResponse( + String resourceGroupName, String containerAppName, String revisionName, Context context) { + return restartRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); } /** @@ -974,22 +977,20 @@ public void restartRevision(String resourceGroupName, String containerAppName, S * @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 the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response restartRevisionWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context) { - return restartRevisionWithResponseAsync(resourceGroupName, containerAppName, revisionName, context).block(); + public void restartRevision(String resourceGroupName, String containerAppName, String revisionName) { + restartRevisionWithResponse(resourceGroupName, containerAppName, revisionName, Context.NONE); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1025,7 +1026,8 @@ private Mono> listRevisionsNextSinglePageAsync(Stri /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsImpl.java index f840af74979e..8c4c17319b32 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsRevisionsImpl.java @@ -40,15 +40,6 @@ public PagedIterable listRevisions( 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 = @@ -64,8 +55,13 @@ public Response getRevisionWithResponse( } } - public void activateRevision(String resourceGroupName, String containerAppName, String revisionName) { - this.serviceClient().activateRevision(resourceGroupName, containerAppName, revisionName); + 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 activateRevisionWithResponse( @@ -75,8 +71,8 @@ public Response activateRevisionWithResponse( .activateRevisionWithResponse(resourceGroupName, containerAppName, revisionName, context); } - public void deactivateRevision(String resourceGroupName, String containerAppName, String revisionName) { - this.serviceClient().deactivateRevision(resourceGroupName, containerAppName, revisionName); + public void activateRevision(String resourceGroupName, String containerAppName, String revisionName) { + this.serviceClient().activateRevision(resourceGroupName, containerAppName, revisionName); } public Response deactivateRevisionWithResponse( @@ -86,8 +82,8 @@ public Response deactivateRevisionWithResponse( .deactivateRevisionWithResponse(resourceGroupName, containerAppName, revisionName, context); } - public void restartRevision(String resourceGroupName, String containerAppName, String revisionName) { - this.serviceClient().restartRevision(resourceGroupName, containerAppName, revisionName); + public void deactivateRevision(String resourceGroupName, String containerAppName, String revisionName) { + this.serviceClient().deactivateRevision(resourceGroupName, containerAppName, revisionName); } public Response restartRevisionWithResponse( @@ -97,6 +93,10 @@ public Response restartRevisionWithResponse( .restartRevisionWithResponse(resourceGroupName, containerAppName, revisionName, context); } + public void restartRevision(String resourceGroupName, String containerAppName, String revisionName) { + this.serviceClient().restartRevision(resourceGroupName, containerAppName, revisionName); + } + private ContainerAppsRevisionsClient serviceClient() { return this.innerClient; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java index 1b7ddaef4a88..2d24f2d839e3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsClientImpl.java @@ -101,7 +101,7 @@ Mono> get( @Put( "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/containerApps" + "/{containerAppName}/sourcecontrols/{sourceControlName}") - @ExpectedResponses({200, 202}) + @ExpectedResponses({200, 201}) @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) Mono>> createOrUpdate( @HostParam("$host") String endpoint, @@ -459,14 +459,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 SourceControl of a Container App. + * @return a SourceControl of a Container App along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public SourceControlInner get(String resourceGroupName, String containerAppName, String sourceControlName) { - return getAsync(resourceGroupName, containerAppName, sourceControlName).block(); + public Response getWithResponse( + String resourceGroupName, String containerAppName, String sourceControlName, Context context) { + return getWithResponseAsync(resourceGroupName, containerAppName, sourceControlName, context).block(); } /** @@ -475,16 +477,14 @@ public SourceControlInner get(String resourceGroupName, String containerAppName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 SourceControl of a Container App along with {@link Response}. + * @return a SourceControl of a Container App. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String containerAppName, String sourceControlName, Context context) { - return getWithResponseAsync(resourceGroupName, containerAppName, sourceControlName, context).block(); + public SourceControlInner get(String resourceGroupName, String containerAppName, String sourceControlName) { + return getWithResponse(resourceGroupName, containerAppName, sourceControlName, Context.NONE).getValue(); } /** @@ -1082,7 +1082,8 @@ public void delete(String resourceGroupName, String containerAppName, String sou /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1119,7 +1120,8 @@ private Mono> listByContainerAppNextSinglePage /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsImpl.java index 188665e5bc46..c4b25c702c74 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ContainerAppsSourceControlsImpl.java @@ -41,15 +41,6 @@ public PagedIterable listByContainerApp( return Utils.mapPage(inner, inner1 -> new SourceControlImpl(inner1, this.manager())); } - public SourceControl get(String resourceGroupName, String containerAppName, String sourceControlName) { - SourceControlInner inner = this.serviceClient().get(resourceGroupName, containerAppName, sourceControlName); - if (inner != null) { - return new SourceControlImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String containerAppName, String sourceControlName, Context context) { Response inner = @@ -65,6 +56,15 @@ public Response getWithResponse( } } + public SourceControl get(String resourceGroupName, String containerAppName, String sourceControlName) { + SourceControlInner inner = this.serviceClient().get(resourceGroupName, containerAppName, sourceControlName); + if (inner != null) { + return new SourceControlImpl(inner, this.manager()); + } else { + return null; + } + } + public void delete(String resourceGroupName, String containerAppName, String sourceControlName) { this.serviceClient().delete(resourceGroupName, containerAppName, sourceControlName); } 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..294b901837f9 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(); } @@ -60,6 +43,10 @@ public Boolean hasConflictOnManagedEnvironment() { return this.innerModel().hasConflictOnManagedEnvironment(); } + public Boolean conflictWithEnvironmentCustomDomain() { + return this.innerModel().conflictWithEnvironmentCustomDomain(); + } + public String conflictingContainerAppResourceId() { return this.innerModel().conflictingContainerAppResourceId(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java index 6c90afbc1afc..0585f315609e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentImpl.java @@ -61,6 +61,10 @@ public List secrets() { } } + public String secretStoreComponent() { + return this.innerModel().secretStoreComponent(); + } + public List metadata() { List inner = this.innerModel().metadata(); if (inner != null) { @@ -187,16 +191,16 @@ public DaprComponent refresh(Context context) { return this; } - public DaprSecretsCollection listSecrets() { - return serviceManager.daprComponents().listSecrets(resourceGroupName, environmentName, componentName); - } - public Response listSecretsWithResponse(Context context) { return serviceManager .daprComponents() .listSecretsWithResponse(resourceGroupName, environmentName, componentName, context); } + public DaprSecretsCollection listSecrets() { + return serviceManager.daprComponents().listSecrets(resourceGroupName, environmentName, componentName); + } + public DaprComponentImpl withComponentType(String componentType) { this.innerModel().withComponentType(componentType); return this; @@ -222,6 +226,11 @@ public DaprComponentImpl withSecrets(List secrets) { return this; } + public DaprComponentImpl withSecretStoreComponent(String secretStoreComponent) { + this.innerModel().withSecretStoreComponent(secretStoreComponent); + return this; + } + public DaprComponentImpl withMetadata(List metadata) { this.innerModel().withMetadata(metadata); return this; diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsClientImpl.java index b1b7edd5495d..17ea587bad67 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 @@ -463,14 +463,16 @@ private Mono getAsync(String resourceGroupName, String envir * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component. + * @return a dapr component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DaprComponentInner get(String resourceGroupName, String environmentName, String componentName) { - return getAsync(resourceGroupName, environmentName, componentName).block(); + public Response getWithResponse( + String resourceGroupName, String environmentName, String componentName, Context context) { + return getWithResponseAsync(resourceGroupName, environmentName, componentName, context).block(); } /** @@ -479,20 +481,20 @@ public DaprComponentInner get(String resourceGroupName, String environmentName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response}. + * @return a dapr component. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context) { - return getWithResponseAsync(resourceGroupName, environmentName, componentName, context).block(); + public DaprComponentInner get(String resourceGroupName, String environmentName, String componentName) { + return getWithResponse(resourceGroupName, environmentName, componentName, Context.NONE).getValue(); } /** - * 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,53 +649,61 @@ 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. * @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. + * @return dapr Component along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DaprComponentInner createOrUpdate( + public Response createOrUpdateWithResponse( String resourceGroupName, String environmentName, String componentName, - DaprComponentInner daprComponentEnvelope) { - return createOrUpdateAsync(resourceGroupName, environmentName, componentName, daprComponentEnvelope).block(); + DaprComponentInner daprComponentEnvelope, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, environmentName, componentName, daprComponentEnvelope, context) + .block(); } /** - * 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. * @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}. + * @return dapr Component. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public DaprComponentInner createOrUpdate( String resourceGroupName, String environmentName, String componentName, - DaprComponentInner daprComponentEnvelope, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, environmentName, componentName, daprComponentEnvelope, context) - .block(); + DaprComponentInner daprComponentEnvelope) { + return createOrUpdateWithResponse( + resourceGroupName, environmentName, componentName, daprComponentEnvelope, Context.NONE) + .getValue(); } /** - * 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 +757,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 +811,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,36 +830,40 @@ 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. * @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 void delete(String resourceGroupName, String environmentName, String componentName) { - deleteAsync(resourceGroupName, environmentName, componentName).block(); + public Response deleteWithResponse( + String resourceGroupName, String environmentName, String componentName, Context context) { + return deleteWithResponseAsync(resourceGroupName, environmentName, componentName, context).block(); } /** - * 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. * @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 environmentName, String componentName, Context context) { - return deleteWithResponseAsync(resourceGroupName, environmentName, componentName, context).block(); + public void delete(String resourceGroupName, String environmentName, String componentName) { + deleteWithResponse(resourceGroupName, environmentName, componentName, Context.NONE); } /** @@ -853,8 +875,8 @@ public Response deleteWithResponse( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSecretsWithResponseAsync( @@ -909,8 +931,8 @@ private Mono> listSecretsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response} on successful + * completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono> listSecretsWithResponseAsync( @@ -961,7 +983,7 @@ private Mono> listSecretsWithResponseAsync( * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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}. + * @return dapr component Secrets Collection for ListSecrets Action on successful completion of {@link Mono}. */ @ServiceMethod(returns = ReturnType.SINGLE) private Mono listSecretsAsync( @@ -976,15 +998,16 @@ private Mono listSecretsAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection ARM resource. + * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public DaprSecretsCollectionInner listSecrets( - String resourceGroupName, String environmentName, String componentName) { - return listSecretsAsync(resourceGroupName, environmentName, componentName).block(); + public Response listSecretsWithResponse( + String resourceGroupName, String environmentName, String componentName, Context context) { + return listSecretsWithResponseAsync(resourceGroupName, environmentName, componentName, context).block(); } /** @@ -993,22 +1016,22 @@ public DaprSecretsCollectionInner listSecrets( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection ARM resource along with {@link Response}. + * @return dapr component Secrets Collection for ListSecrets Action. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listSecretsWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context) { - return listSecretsWithResponseAsync(resourceGroupName, environmentName, componentName, context).block(); + public DaprSecretsCollectionInner listSecrets( + String resourceGroupName, String environmentName, String componentName) { + return listSecretsWithResponse(resourceGroupName, environmentName, componentName, Context.NONE).getValue(); } /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1043,7 +1066,8 @@ private Mono> listNextSinglePageAsync(String n /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsImpl.java index 84cbb60acc24..0be16fce3137 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/DaprComponentsImpl.java @@ -41,15 +41,6 @@ public PagedIterable list(String resourceGroupName, String enviro return Utils.mapPage(inner, inner1 -> new DaprComponentImpl(inner1, this.manager())); } - public DaprComponent get(String resourceGroupName, String environmentName, String componentName) { - DaprComponentInner inner = this.serviceClient().get(resourceGroupName, environmentName, componentName); - if (inner != null) { - return new DaprComponentImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getWithResponse( String resourceGroupName, String environmentName, String componentName, Context context) { Response inner = @@ -65,8 +56,13 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String environmentName, String componentName) { - this.serviceClient().delete(resourceGroupName, environmentName, componentName); + public DaprComponent get(String resourceGroupName, String environmentName, String componentName) { + DaprComponentInner inner = this.serviceClient().get(resourceGroupName, environmentName, componentName); + if (inner != null) { + return new DaprComponentImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -74,14 +70,8 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, componentName, context); } - public DaprSecretsCollection listSecrets(String resourceGroupName, String environmentName, String componentName) { - DaprSecretsCollectionInner inner = - this.serviceClient().listSecrets(resourceGroupName, environmentName, componentName); - if (inner != null) { - return new DaprSecretsCollectionImpl(inner, this.manager()); - } else { - return null; - } + public void delete(String resourceGroupName, String environmentName, String componentName) { + this.serviceClient().delete(resourceGroupName, environmentName, componentName); } public Response listSecretsWithResponse( @@ -99,6 +89,16 @@ public Response listSecretsWithResponse( } } + public DaprSecretsCollection listSecrets(String resourceGroupName, String environmentName, String componentName) { + DaprSecretsCollectionInner inner = + this.serviceClient().listSecrets(resourceGroupName, environmentName, componentName); + if (inner != null) { + return new DaprSecretsCollectionImpl(inner, this.manager()); + } else { + return null; + } + } + public DaprComponent getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/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/EnvironmentAuthTokenImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/EnvironmentAuthTokenImpl.java new file mode 100644 index 000000000000..c2a56e6d8305 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/EnvironmentAuthTokenImpl.java @@ -0,0 +1,70 @@ +// Copyright (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.EnvironmentAuthTokenInner; +import com.azure.resourcemanager.appcontainers.models.EnvironmentAuthToken; +import java.time.OffsetDateTime; +import java.util.Collections; +import java.util.Map; + +public final class EnvironmentAuthTokenImpl implements EnvironmentAuthToken { + private EnvironmentAuthTokenInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + EnvironmentAuthTokenImpl( + EnvironmentAuthTokenInner 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 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 SystemData systemData() { + return this.innerModel().systemData(); + } + + public String token() { + return this.innerModel().token(); + } + + public OffsetDateTime expires() { + return this.innerModel().expires(); + } + + public EnvironmentAuthTokenInner 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..0ece0ae0eada --- /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. + * @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 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 listDetectorsWithResponse(resourceGroupName, environmentName, Context.NONE).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 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. + * @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(); + } + + /** + * 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 getDetectorWithResponse(resourceGroupName, environmentName, detectorName, Context.NONE).getValue(); + } +} 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..6ab273c40556 --- /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 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 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 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; + } + } + + 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; + } + } + + 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/ManagedEnvironmentImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java index 75dba1b16bcb..9304a629fcf5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentImpl.java @@ -4,15 +4,21 @@ package com.azure.resourcemanager.appcontainers.implementation; +import com.azure.core.http.rest.Response; 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.ManagedEnvironmentInner; import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; +import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; +import com.azure.resourcemanager.appcontainers.models.EnvironmentAuthToken; import com.azure.resourcemanager.appcontainers.models.EnvironmentProvisioningState; +import com.azure.resourcemanager.appcontainers.models.EnvironmentSkuProperties; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironment; import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; +import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; import java.util.Collections; +import java.util.List; import java.util.Map; public final class ManagedEnvironmentImpl @@ -46,6 +52,10 @@ public Map tags() { } } + public EnvironmentSkuProperties sku() { + return this.innerModel().sku(); + } + public SystemData systemData() { return this.innerModel().systemData(); } @@ -86,6 +96,23 @@ public Boolean zoneRedundant() { return this.innerModel().zoneRedundant(); } + public CustomDomainConfiguration customDomainConfiguration() { + return this.innerModel().customDomainConfiguration(); + } + + public String eventStreamEndpoint() { + return this.innerModel().eventStreamEndpoint(); + } + + public List workloadProfiles() { + List inner = this.innerModel().workloadProfiles(); + if (inner != null) { + return Collections.unmodifiableList(inner); + } else { + return Collections.emptyList(); + } + } + public Region region() { return Region.fromName(this.regionName()); } @@ -191,6 +218,16 @@ public ManagedEnvironment refresh(Context context) { return this; } + public Response getAuthTokenWithResponse(Context context) { + return serviceManager + .managedEnvironments() + .getAuthTokenWithResponse(resourceGroupName, environmentName, context); + } + + public EnvironmentAuthToken getAuthToken() { + return serviceManager.managedEnvironments().getAuthToken(resourceGroupName, environmentName); + } + public ManagedEnvironmentImpl withRegion(Region location) { this.innerModel().withLocation(location.toString()); return this; @@ -206,6 +243,11 @@ public ManagedEnvironmentImpl withTags(Map tags) { return this; } + public ManagedEnvironmentImpl withSku(EnvironmentSkuProperties sku) { + this.innerModel().withSku(sku); + return this; + } + public ManagedEnvironmentImpl withDaprAIInstrumentationKey(String daprAIInstrumentationKey) { this.innerModel().withDaprAIInstrumentationKey(daprAIInstrumentationKey); return this; @@ -230,4 +272,14 @@ public ManagedEnvironmentImpl withZoneRedundant(Boolean zoneRedundant) { this.innerModel().withZoneRedundant(zoneRedundant); return this; } + + public ManagedEnvironmentImpl withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration) { + this.innerModel().withCustomDomainConfiguration(customDomainConfiguration); + return this; + } + + public ManagedEnvironmentImpl withWorkloadProfiles(List workloadProfiles) { + this.innerModel().withWorkloadProfiles(workloadProfiles); + return this; + } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsClientImpl.java index f49b7b00fa51..2eeb567c9132 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 @@ -14,6 +14,7 @@ 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; @@ -32,9 +33,12 @@ import com.azure.core.util.polling.PollerFlux; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.EnvironmentAuthTokenInner; import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; +import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; import com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentsCollection; +import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesCollection; import java.nio.ByteBuffer; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -152,6 +156,36 @@ Mono>> update( @HeaderParam("Accept") String accept, Context context); + @Headers({"Content-Type: application/json"}) + @Post( + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App" + + "/managedEnvironments/{environmentName}/getAuthtoken") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> getAuthToken( + @HostParam("$host") String endpoint, + @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}/workloadProfileStates") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listWorkloadProfileStates( + @HostParam("$host") String endpoint, + @PathParam("subscriptionId") String subscriptionId, + @PathParam("resourceGroupName") String resourceGroupName, + @QueryParam("api-version") String apiVersion, + @PathParam("environmentName") String environmentName, + @HeaderParam("Accept") String accept, + Context context); + @Headers({"Content-Type: application/json"}) @Get("{nextLink}") @ExpectedResponses({200}) @@ -171,10 +205,22 @@ Mono> listByResourceGroupNext( @HostParam("$host") String endpoint, @HeaderParam("Accept") String accept, Context context); + + @Headers({"Content-Type: application/json"}) + @Get("{nextLink}") + @ExpectedResponses({200}) + @UnexpectedResponseExceptionType(DefaultErrorResponseErrorException.class) + Mono> listWorkloadProfileStatesNext( + @PathParam(value = "nextLink", encoded = true) String nextLink, + @HostParam("$host") String endpoint, + @HeaderParam("Accept") String accept, + 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. @@ -219,7 +265,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 +311,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 +326,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 +343,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 +357,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 +373,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 +427,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 +480,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 +498,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 +517,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 +533,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 +550,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 +602,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 +652,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,39 +671,45 @@ 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. + * @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. + * @return the properties of a Managed Environment used to host container apps along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentInner getByResourceGroup(String resourceGroupName, String environmentName) { - return getByResourceGroupAsync(resourceGroupName, environmentName).block(); + public Response getByResourceGroupWithResponse( + String resourceGroupName, String environmentName, Context context) { + return getByResourceGroupWithResponseAsync(resourceGroupName, environmentName, context).block(); } /** - * 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. - * @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}. + * @return the properties of a Managed Environment used to host container apps. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getByResourceGroupWithResponse( - String resourceGroupName, String environmentName, Context context) { - return getByResourceGroupWithResponseAsync(resourceGroupName, environmentName, context).block(); + public ManagedEnvironmentInner getByResourceGroup(String resourceGroupName, String environmentName) { + return getByResourceGroupWithResponse(resourceGroupName, environmentName, Context.NONE).getValue(); } /** - * 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 +767,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 +828,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 +856,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 +889,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 +908,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 +932,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 +953,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 +978,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 +997,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 +1020,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 +1070,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 +1119,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 +1140,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 +1163,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 +1180,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 +1199,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 +1218,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 +1238,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 +1254,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 +1271,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 +1330,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 +1390,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 +1414,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 +1442,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 +1461,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 +1484,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 +1505,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 +1530,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 +1547,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. @@ -1430,10 +1568,367 @@ public void update( updateAsync(resourceGroupName, environmentName, environmentEnvelope, context).block(); } + /** + * Get auth token for a managed environment + * + *

Checks if resource name is available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return environment Auth Token along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAuthTokenWithResponseAsync( + String resourceGroupName, String environmentName) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 + .getAuthToken( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + environmentName, + this.client.getApiVersion(), + accept, + context)) + .contextWrite(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext()).readOnly())); + } + + /** + * Get auth token for a managed environment + * + *

Checks if resource name is available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return environment Auth Token along with {@link Response} on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> getAuthTokenWithResponseAsync( + String resourceGroupName, String environmentName, Context context) { + 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 + .getAuthToken( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + environmentName, + this.client.getApiVersion(), + accept, + context); + } + + /** + * Get auth token for a managed environment + * + *

Checks if resource name is available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return environment Auth Token on successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono getAuthTokenAsync(String resourceGroupName, String environmentName) { + return getAuthTokenWithResponseAsync(resourceGroupName, environmentName) + .flatMap(res -> Mono.justOrEmpty(res.getValue())); + } + + /** + * Get auth token for a managed environment + * + *

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

Checks if resource name is available. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return environment Auth Token. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + public EnvironmentAuthTokenInner getAuthToken(String resourceGroupName, String environmentName) { + return getAuthTokenWithResponse(resourceGroupName, environmentName, Context.NONE).getValue(); + } + + /** + * Get all workload Profile States for a Premium Managed Environment.. + * + *

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

Get all workload Profile States for a Premium Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all workload Profile States for a Premium Managed Environment along with {@link PagedResponse} on + * successful completion of {@link Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWorkloadProfileStatesSinglePageAsync( + String resourceGroupName, String environmentName, Context context) { + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + 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 + .listWorkloadProfileStates( + this.client.getEndpoint(), + this.client.getSubscriptionId(), + resourceGroupName, + this.client.getApiVersion(), + environmentName, + accept, + context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } + + /** + * Get all workload Profile States for a Premium Managed Environment.. + * + *

Get all workload Profile States for a Premium Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all workload Profile States for a Premium Managed Environment as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listWorkloadProfileStatesAsync( + String resourceGroupName, String environmentName) { + return new PagedFlux<>( + () -> listWorkloadProfileStatesSinglePageAsync(resourceGroupName, environmentName), + nextLink -> listWorkloadProfileStatesNextSinglePageAsync(nextLink)); + } + + /** + * Get all workload Profile States for a Premium Managed Environment.. + * + *

Get all workload Profile States for a Premium Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all workload Profile States for a Premium Managed Environment as paginated response with {@link + * PagedFlux}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + private PagedFlux listWorkloadProfileStatesAsync( + String resourceGroupName, String environmentName, Context context) { + return new PagedFlux<>( + () -> listWorkloadProfileStatesSinglePageAsync(resourceGroupName, environmentName, context), + nextLink -> listWorkloadProfileStatesNextSinglePageAsync(nextLink, context)); + } + + /** + * Get all workload Profile States for a Premium Managed Environment.. + * + *

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

Get all workload Profile States for a Premium Managed Environment. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param environmentName Name of the Managed Environment. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all workload Profile States for a Premium Managed Environment as paginated response with {@link + * PagedIterable}. + */ + @ServiceMethod(returns = ReturnType.COLLECTION) + public PagedIterable listWorkloadProfileStates( + String resourceGroupName, String environmentName, Context context) { + return new PagedIterable<>(listWorkloadProfileStatesAsync(resourceGroupName, environmentName, context)); + } + /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1469,7 +1964,8 @@ private Mono> listBySubscriptionNextSingl /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1506,7 +2002,8 @@ private Mono> listBySubscriptionNextSingl /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -1542,7 +2039,8 @@ private Mono> listByResourceGroupNextSing /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. @@ -1575,4 +2073,82 @@ private Mono> listByResourceGroupNextSing res.getValue().nextLink(), null)); } + + /** + * Get the next page of items. + * + * @param nextLink The URL to get the next list of items + *

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

The nextLink parameter. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return collection of workloadProfileStates along with {@link PagedResponse} on successful completion of {@link + * Mono}. + */ + @ServiceMethod(returns = ReturnType.SINGLE) + private Mono> listWorkloadProfileStatesNextSinglePageAsync( + String nextLink, Context context) { + if (nextLink == null) { + return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null.")); + } + if (this.client.getEndpoint() == null) { + return Mono + .error( + new IllegalArgumentException( + "Parameter this.client.getEndpoint() is required and cannot be null.")); + } + final String accept = "application/json"; + context = this.client.mergeContext(context); + return service + .listWorkloadProfileStatesNext(nextLink, this.client.getEndpoint(), accept, context) + .map( + res -> + new PagedResponseBase<>( + res.getRequest(), + res.getStatusCode(), + res.getHeaders(), + res.getValue().value(), + res.getValue().nextLink(), + null)); + } } 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..208603d33220 --- /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. + * @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(); + } + + /** + * 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 getRootWithResponse(resourceGroupName, environmentName, Context.NONE).getValue(); + } +} 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..7a4187d4cd52 --- /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 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; + } + } + + 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; + } + } + + 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/ManagedEnvironmentsImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsImpl.java index 143dc935e872..19aa83d705b5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsImpl.java @@ -10,9 +10,13 @@ import com.azure.core.util.Context; import com.azure.core.util.logging.ClientLogger; import com.azure.resourcemanager.appcontainers.fluent.ManagedEnvironmentsClient; +import com.azure.resourcemanager.appcontainers.fluent.models.EnvironmentAuthTokenInner; import com.azure.resourcemanager.appcontainers.fluent.models.ManagedEnvironmentInner; +import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; +import com.azure.resourcemanager.appcontainers.models.EnvironmentAuthToken; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironment; import com.azure.resourcemanager.appcontainers.models.ManagedEnvironments; +import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStates; public final class ManagedEnvironmentsImpl implements ManagedEnvironments { private static final ClientLogger LOGGER = new ClientLogger(ManagedEnvironmentsImpl.class); @@ -49,15 +53,6 @@ public PagedIterable listByResourceGroup(String resourceGrou return Utils.mapPage(inner, inner1 -> new ManagedEnvironmentImpl(inner1, this.manager())); } - public ManagedEnvironment getByResourceGroup(String resourceGroupName, String environmentName) { - ManagedEnvironmentInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, environmentName); - if (inner != null) { - return new ManagedEnvironmentImpl(inner, this.manager()); - } else { - return null; - } - } - public Response getByResourceGroupWithResponse( String resourceGroupName, String environmentName, Context context) { Response inner = @@ -73,6 +68,15 @@ public Response getByResourceGroupWithResponse( } } + public ManagedEnvironment getByResourceGroup(String resourceGroupName, String environmentName) { + ManagedEnvironmentInner inner = this.serviceClient().getByResourceGroup(resourceGroupName, environmentName); + if (inner != null) { + return new ManagedEnvironmentImpl(inner, this.manager()); + } else { + return null; + } + } + public void deleteByResourceGroup(String resourceGroupName, String environmentName) { this.serviceClient().delete(resourceGroupName, environmentName); } @@ -93,6 +97,44 @@ public void update( this.serviceClient().update(resourceGroupName, environmentName, environmentEnvelope, context); } + public Response getAuthTokenWithResponse( + String resourceGroupName, String environmentName, Context context) { + Response inner = + this.serviceClient().getAuthTokenWithResponse(resourceGroupName, environmentName, context); + if (inner != null) { + return new SimpleResponse<>( + inner.getRequest(), + inner.getStatusCode(), + inner.getHeaders(), + new EnvironmentAuthTokenImpl(inner.getValue(), this.manager())); + } else { + return null; + } + } + + public EnvironmentAuthToken getAuthToken(String resourceGroupName, String environmentName) { + EnvironmentAuthTokenInner inner = this.serviceClient().getAuthToken(resourceGroupName, environmentName); + if (inner != null) { + return new EnvironmentAuthTokenImpl(inner, this.manager()); + } else { + return null; + } + } + + public PagedIterable listWorkloadProfileStates( + String resourceGroupName, String environmentName) { + PagedIterable inner = + this.serviceClient().listWorkloadProfileStates(resourceGroupName, environmentName); + return Utils.mapPage(inner, inner1 -> new WorkloadProfileStatesImpl(inner1, this.manager())); + } + + public PagedIterable listWorkloadProfileStates( + String resourceGroupName, String environmentName, Context context) { + PagedIterable inner = + this.serviceClient().listWorkloadProfileStates(resourceGroupName, environmentName, context); + return Utils.mapPage(inner, inner1 -> new WorkloadProfileStatesImpl(inner1, this.manager())); + } + public ManagedEnvironment getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesClientImpl.java index 5460228c78fa..ee07f227ead3 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesClientImpl.java @@ -242,14 +242,16 @@ private Mono listAsync( * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a managedEnvironment. + * @return all storages for a managedEnvironment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentStoragesCollectionInner list(String resourceGroupName, String environmentName) { - return listAsync(resourceGroupName, environmentName).block(); + public Response listWithResponse( + String resourceGroupName, String environmentName, Context context) { + return listWithResponseAsync(resourceGroupName, environmentName, context).block(); } /** @@ -257,16 +259,14 @@ public ManagedEnvironmentStoragesCollectionInner list(String resourceGroupName, * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return all storages for a managedEnvironment along with {@link Response}. + * @return all storages for a managedEnvironment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response listWithResponse( - String resourceGroupName, String environmentName, Context context) { - return listWithResponseAsync(resourceGroupName, environmentName, context).block(); + public ManagedEnvironmentStoragesCollectionInner list(String resourceGroupName, String environmentName) { + return listWithResponse(resourceGroupName, environmentName, Context.NONE).getValue(); } /** @@ -399,14 +399,16 @@ private Mono getAsync( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 managedEnvironment. + * @return storage for a managedEnvironment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentStorageInner get(String resourceGroupName, String environmentName, String storageName) { - return getAsync(resourceGroupName, environmentName, storageName).block(); + public Response getWithResponse( + String resourceGroupName, String environmentName, String storageName, Context context) { + return getWithResponseAsync(resourceGroupName, environmentName, storageName, context).block(); } /** @@ -415,16 +417,14 @@ public ManagedEnvironmentStorageInner get(String resourceGroupName, String envir * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws 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 managedEnvironment along with {@link Response}. + * @return storage for a managedEnvironment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response getWithResponse( - String resourceGroupName, String environmentName, String storageName, Context context) { - return getWithResponseAsync(resourceGroupName, environmentName, storageName, context).block(); + public ManagedEnvironmentStorageInner get(String resourceGroupName, String environmentName, String storageName) { + return getWithResponse(resourceGroupName, environmentName, storageName, Context.NONE).getValue(); } /** @@ -587,18 +587,22 @@ private Mono createOrUpdateAsync( * @param environmentName 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 managedEnvironment. + * @return storage resource for managedEnvironment along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public ManagedEnvironmentStorageInner createOrUpdate( + public Response createOrUpdateWithResponse( String resourceGroupName, String environmentName, String storageName, - ManagedEnvironmentStorageInner storageEnvelope) { - return createOrUpdateAsync(resourceGroupName, environmentName, storageName, storageEnvelope).block(); + ManagedEnvironmentStorageInner storageEnvelope, + Context context) { + return createOrUpdateWithResponseAsync( + resourceGroupName, environmentName, storageName, storageEnvelope, context) + .block(); } /** @@ -608,22 +612,20 @@ public ManagedEnvironmentStorageInner createOrUpdate( * @param environmentName 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 managedEnvironment along with {@link Response}. + * @return storage resource for managedEnvironment. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response createOrUpdateWithResponse( + public ManagedEnvironmentStorageInner createOrUpdate( String resourceGroupName, String environmentName, String storageName, - ManagedEnvironmentStorageInner storageEnvelope, - Context context) { - return createOrUpdateWithResponseAsync( - resourceGroupName, environmentName, storageName, storageEnvelope, context) - .block(); + ManagedEnvironmentStorageInner storageEnvelope) { + return createOrUpdateWithResponse( + resourceGroupName, environmentName, storageName, storageEnvelope, Context.NONE) + .getValue(); } /** @@ -755,13 +757,16 @@ private Mono deleteAsync(String resourceGroupName, String environmentName, * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException 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 void delete(String resourceGroupName, String environmentName, String storageName) { - deleteAsync(resourceGroupName, environmentName, storageName).block(); + public Response deleteWithResponse( + String resourceGroupName, String environmentName, String storageName, Context context) { + return deleteWithResponseAsync(resourceGroupName, environmentName, storageName, context).block(); } /** @@ -770,15 +775,12 @@ public void delete(String resourceGroupName, String environmentName, String stor * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response deleteWithResponse( - String resourceGroupName, String environmentName, String storageName, Context context) { - return deleteWithResponseAsync(resourceGroupName, environmentName, storageName, context).block(); + public void delete(String resourceGroupName, String environmentName, String storageName) { + deleteWithResponse(resourceGroupName, environmentName, storageName, Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesImpl.java index e76c2b9ba57d..dfcc84bf5607 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/ManagedEnvironmentsStoragesImpl.java @@ -29,15 +29,6 @@ public ManagedEnvironmentsStoragesImpl( this.serviceManager = serviceManager; } - public ManagedEnvironmentStoragesCollection list(String resourceGroupName, String environmentName) { - ManagedEnvironmentStoragesCollectionInner inner = this.serviceClient().list(resourceGroupName, environmentName); - if (inner != null) { - return new ManagedEnvironmentStoragesCollectionImpl(inner, this.manager()); - } else { - return null; - } - } - public Response listWithResponse( String resourceGroupName, String environmentName, Context context) { Response inner = @@ -53,11 +44,10 @@ public Response listWithResponse( } } - public ManagedEnvironmentStorage get(String resourceGroupName, String environmentName, String storageName) { - ManagedEnvironmentStorageInner inner = - this.serviceClient().get(resourceGroupName, environmentName, storageName); + public ManagedEnvironmentStoragesCollection list(String resourceGroupName, String environmentName) { + ManagedEnvironmentStoragesCollectionInner inner = this.serviceClient().list(resourceGroupName, environmentName); if (inner != null) { - return new ManagedEnvironmentStorageImpl(inner, this.manager()); + return new ManagedEnvironmentStoragesCollectionImpl(inner, this.manager()); } else { return null; } @@ -78,8 +68,14 @@ public Response getWithResponse( } } - public void delete(String resourceGroupName, String environmentName, String storageName) { - this.serviceClient().delete(resourceGroupName, environmentName, storageName); + public ManagedEnvironmentStorage get(String resourceGroupName, String environmentName, String storageName) { + ManagedEnvironmentStorageInner inner = + this.serviceClient().get(resourceGroupName, environmentName, storageName); + if (inner != null) { + return new ManagedEnvironmentStorageImpl(inner, this.manager()); + } else { + return null; + } } public Response deleteWithResponse( @@ -87,6 +83,10 @@ public Response deleteWithResponse( return this.serviceClient().deleteWithResponse(resourceGroupName, environmentName, storageName, context); } + public void delete(String resourceGroupName, String environmentName, String storageName) { + this.serviceClient().delete(resourceGroupName, environmentName, storageName); + } + public ManagedEnvironmentStorage getById(String id) { String resourceGroupName = Utils.getValueFromIdByName(id, "resourceGroups"); if (resourceGroupName == null) { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesClientImpl.java index 8dc0a74267be..88bc0b2704a9 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,42 +214,48 @@ 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. * @param checkNameAvailabilityRequest The check name availability request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException 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. + * @return the check availability result along with {@link Response}. */ @ServiceMethod(returns = ReturnType.SINGLE) - public CheckNameAvailabilityResponseInner checkNameAvailability( - String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - return checkNameAvailabilityAsync(resourceGroupName, environmentName, checkNameAvailabilityRequest).block(); + public Response checkNameAvailabilityWithResponse( + String resourceGroupName, + String environmentName, + CheckNameAvailabilityRequest checkNameAvailabilityRequest, + Context context) { + return checkNameAvailabilityWithResponseAsync( + resourceGroupName, environmentName, checkNameAvailabilityRequest, context) + .block(); } /** - * 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. * @param checkNameAvailabilityRequest The check name availability request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException 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}. + * @return the check availability result. */ @ServiceMethod(returns = ReturnType.SINGLE) - public Response checkNameAvailabilityWithResponse( - String resourceGroupName, - String environmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest, - Context context) { - return checkNameAvailabilityWithResponseAsync( - resourceGroupName, environmentName, checkNameAvailabilityRequest, context) - .block(); + public CheckNameAvailabilityResponseInner checkNameAvailability( + String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest) { + return checkNameAvailabilityWithResponse( + resourceGroupName, environmentName, checkNameAvailabilityRequest, Context.NONE) + .getValue(); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesImpl.java index 967fab661689..167621f13759 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/NamespacesImpl.java @@ -27,19 +27,6 @@ public NamespacesImpl( this.serviceManager = serviceManager; } - public CheckNameAvailabilityResponse checkNameAvailability( - String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest) { - CheckNameAvailabilityResponseInner inner = - this - .serviceClient() - .checkNameAvailability(resourceGroupName, environmentName, checkNameAvailabilityRequest); - if (inner != null) { - return new CheckNameAvailabilityResponseImpl(inner, this.manager()); - } else { - return null; - } - } - public Response checkNameAvailabilityWithResponse( String resourceGroupName, String environmentName, @@ -61,6 +48,19 @@ public Response checkNameAvailabilityWithResponse } } + public CheckNameAvailabilityResponse checkNameAvailability( + String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest) { + CheckNameAvailabilityResponseInner inner = + this + .serviceClient() + .checkNameAvailability(resourceGroupName, environmentName, checkNameAvailabilityRequest); + if (inner != null) { + return new CheckNameAvailabilityResponseImpl(inner, this.manager()); + } else { + return null; + } + } + private NamespacesClient serviceClient() { return this.innerClient; } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationsClientImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationsClientImpl.java index 0cab6ac197d2..951798c3d460 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationsClientImpl.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/OperationsClientImpl.java @@ -198,7 +198,8 @@ public PagedIterable list(Context context) { /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. @@ -234,7 +235,8 @@ private Mono> listNextSinglePageAsync(String /** * Get the next page of items. * - * @param nextLink The nextLink parameter. + * @param nextLink The URL to get the next list of items + *

The nextLink parameter. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws DefaultErrorResponseErrorException thrown if the request is rejected by server. 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..7b42cccf03ba 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 @@ -43,6 +43,10 @@ public OffsetDateTime createdTime() { return this.innerModel().createdTime(); } + public OffsetDateTime lastActiveTime() { + return this.innerModel().lastActiveTime(); + } + public String fqdn() { return this.innerModel().fqdn(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/WorkloadProfileStatesImpl.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/WorkloadProfileStatesImpl.java new file mode 100644 index 000000000000..d53fda0bcb69 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/implementation/WorkloadProfileStatesImpl.java @@ -0,0 +1,51 @@ +// Copyright (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.WorkloadProfileStatesInner; +import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStates; +import com.azure.resourcemanager.appcontainers.models.WorkloadProfileStatesProperties; + +public final class WorkloadProfileStatesImpl implements WorkloadProfileStates { + private WorkloadProfileStatesInner innerObject; + + private final com.azure.resourcemanager.appcontainers.ContainerAppsApiManager serviceManager; + + WorkloadProfileStatesImpl( + WorkloadProfileStatesInner 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 WorkloadProfileStatesProperties properties() { + return this.innerModel().properties(); + } + + public SystemData systemData() { + return this.innerModel().systemData(); + } + + public WorkloadProfileStatesInner 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/models/AccessMode.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AccessMode.java index 88fd0d585724..8f2d01d44bec 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AccessMode.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AccessMode.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AccessMode. */ +/** Access mode for storage. */ public final class AccessMode extends ExpandableStringEnum { /** Static value ReadOnly for AccessMode. */ public static final AccessMode READ_ONLY = fromString("ReadOnly"); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Action.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Action.java new file mode 100644 index 000000000000..08b42558079c --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Action.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL Allow or ALL Deny. */ +public final class Action extends ExpandableStringEnum { + /** Static value Allow for Action. */ + public static final Action ALLOW = fromString("Allow"); + + /** Static value Deny for Action. */ + public static final Action DENY = fromString("Deny"); + + /** + * Creates or finds a Action from its string representation. + * + * @param name a name to look for. + * @return the corresponding Action. + */ + @JsonCreator + public static Action fromString(String name) { + return fromString(name, Action.class); + } + + /** + * Gets known Action values. + * + * @return known Action values. + */ + public static Collection values() { + return values(Action.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ActiveRevisionsMode.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ActiveRevisionsMode.java index 490d92a66148..1ade7f9c0e39 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ActiveRevisionsMode.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ActiveRevisionsMode.java @@ -8,7 +8,12 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ActiveRevisionsMode. */ +/** + * ActiveRevisionsMode controls how active revisions are handled for the Container app: + * <list><item>Multiple: multiple revisions can be active.</item><item>Single: Only one revision + * can be active at a time. Revision weights can not be used in this mode. If no value if provided, this is the + * default.</item></list>. + */ public final class ActiveRevisionsMode extends ExpandableStringEnum { /** Static value Multiple for ActiveRevisionsMode. */ public static final ActiveRevisionsMode MULTIPLE = fromString("Multiple"); 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..3a63ecb42ca0 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,12 +12,15 @@ @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; + /** Creates an instance of AllowedAudiencesValidation class. */ + public AllowedAudiencesValidation() { + } + /** * Get the allowedAudiences property: The configuration settings of the allowed list of audiences from which to * validate the JWT token. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedPrincipals.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedPrincipals.java index 737d6e210594..836c4bcc7816 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedPrincipals.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AllowedPrincipals.java @@ -23,6 +23,10 @@ public final class AllowedPrincipals { @JsonProperty(value = "identities") private List identities; + /** Creates an instance of AllowedPrincipals class. */ + public AllowedPrincipals() { + } + /** * Get the groups property: The list of the allowed groups. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppLogsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppLogsConfiguration.java index e1a35c17a6a6..5d0520f20948 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppLogsConfiguration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppLogsConfiguration.java @@ -22,6 +22,10 @@ public final class AppLogsConfiguration { @JsonProperty(value = "logAnalyticsConfiguration") private LogAnalyticsConfiguration logAnalyticsConfiguration; + /** Creates an instance of AppLogsConfiguration class. */ + public AppLogsConfiguration() { + } + /** * Get the destination property: Logs destination. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppProtocol.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppProtocol.java index 33433e341adb..32c619fd3059 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppProtocol.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppProtocol.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for AppProtocol. */ +/** Tells Dapr which protocol your application is using. Valid options are http and grpc. Default is http. */ public final class AppProtocol extends ExpandableStringEnum { /** Static value http for AppProtocol. */ public static final AppProtocol HTTP = fromString("http"); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppRegistration.java index 8609d2697c51..d3114a04a7e5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppRegistration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppRegistration.java @@ -22,6 +22,10 @@ public final class AppRegistration { @JsonProperty(value = "appSecretSettingName") private String appSecretSettingName; + /** Creates an instance of AppRegistration class. */ + public AppRegistration() { + } + /** * Get the appId property: The App ID of the app used for login. * 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..34b83d23ca18 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; @@ -29,6 +29,10 @@ public final class Apple { @JsonProperty(value = "login") private LoginScopes login; + /** Creates an instance of Apple class. */ + public Apple() { + } + /** * Get the enabled property: <code>false</code> if the Apple provider should not be enabled despite the * set registration; otherwise, <code>true</code>. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppleRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppleRegistration.java index b45b8ab2315e..19013329ef25 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppleRegistration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AppleRegistration.java @@ -22,6 +22,10 @@ public final class AppleRegistration { @JsonProperty(value = "clientSecretSettingName") private String clientSecretSettingName; + /** Creates an instance of AppleRegistration class. */ + public AppleRegistration() { + } + /** * Get the clientId property: The Client ID of the app used for login. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Applicability.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Applicability.java new file mode 100644 index 000000000000..5da623ac844a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Applicability.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** indicates whether the profile is default for the location. */ +public final class Applicability extends ExpandableStringEnum { + /** Static value LocationDefault for Applicability. */ + public static final Applicability LOCATION_DEFAULT = fromString("LocationDefault"); + + /** Static value Custom for Applicability. */ + public static final Applicability CUSTOM = fromString("Custom"); + + /** + * Creates or finds a Applicability from its string representation. + * + * @param name a name to look for. + * @return the corresponding Applicability. + */ + @JsonCreator + public static Applicability fromString(String name) { + return fromString(name, Applicability.class); + } + + /** + * Gets known Applicability values. + * + * @return known Applicability values. + */ + public static Collection values() { + return values(Applicability.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfig.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfig.java index f1ae910fdcd3..cd2bd12f5dcc 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfig.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfig.java @@ -4,6 +4,7 @@ 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.AuthConfigInner; @@ -30,6 +31,13 @@ public interface AuthConfig { */ String type(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the platform property: The configuration settings of the platform of ContainerApp Service * Authentication/Authorization. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfigCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfigCollection.java index 70ee5c92f188..cca73947e6dc 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfigCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AuthConfigCollection.java @@ -25,6 +25,10 @@ public final class AuthConfigCollection { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of AuthConfigCollection class. */ + public AuthConfigCollection() { + } + /** * Get the value property: Collection of resources. * 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..94143f340220 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,21 +11,24 @@ @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; + /** Creates an instance of AuthPlatform class. */ + public AuthPlatform() { + } + /** * Get the enabled property: <code>true</code> if the Authentication / Authorization feature is enabled * for the current app; otherwise, <code>false</code>. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableOperations.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableOperations.java index 76e345bb4272..61b0f8789eda 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableOperations.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableOperations.java @@ -25,6 +25,10 @@ public final class AvailableOperations { @JsonProperty(value = "nextLink") private String nextLink; + /** Creates an instance of AvailableOperations class. */ + public AvailableOperations() { + } + /** * Get the value property: Collection of available operation details. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfile.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfile.java new file mode 100644 index 000000000000..f3a46738f9df --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfile.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.management.SystemData; +import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; + +/** An immutable client-side representation of AvailableWorkloadProfile. */ +public interface AvailableWorkloadProfile { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: Region of the workload profile. + * + * @return the location value. + */ + String location(); + + /** + * Gets the properties property: Revision resource specific properties. + * + * @return the properties value. + */ + AvailableWorkloadProfileProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner object. + * + * @return the inner object. + */ + AvailableWorkloadProfileInner innerModel(); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfileProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfileProperties.java new file mode 100644 index 000000000000..8b06a4146d59 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfileProperties.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.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Revision resource specific properties. */ +@Fluent +public final class AvailableWorkloadProfileProperties { + /* + * Used to map workload profile types to billing meter. + */ + @JsonProperty(value = "billingMeterCategory") + private Category billingMeterCategory; + + /* + * indicates whether the profile is default for the location. + */ + @JsonProperty(value = "applicability") + private Applicability applicability; + + /* + * Number of cores in CPU. + */ + @JsonProperty(value = "cores") + private Integer cores; + + /* + * Memory in GiB. + */ + @JsonProperty(value = "memoryGiB") + private Integer memoryGiB; + + /* + * The everyday name of the workload profile. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** Creates an instance of AvailableWorkloadProfileProperties class. */ + public AvailableWorkloadProfileProperties() { + } + + /** + * Get the billingMeterCategory property: Used to map workload profile types to billing meter. + * + * @return the billingMeterCategory value. + */ + public Category billingMeterCategory() { + return this.billingMeterCategory; + } + + /** + * Set the billingMeterCategory property: Used to map workload profile types to billing meter. + * + * @param billingMeterCategory the billingMeterCategory value to set. + * @return the AvailableWorkloadProfileProperties object itself. + */ + public AvailableWorkloadProfileProperties withBillingMeterCategory(Category billingMeterCategory) { + this.billingMeterCategory = billingMeterCategory; + return this; + } + + /** + * Get the applicability property: indicates whether the profile is default for the location. + * + * @return the applicability value. + */ + public Applicability applicability() { + return this.applicability; + } + + /** + * Set the applicability property: indicates whether the profile is default for the location. + * + * @param applicability the applicability value to set. + * @return the AvailableWorkloadProfileProperties object itself. + */ + public AvailableWorkloadProfileProperties withApplicability(Applicability applicability) { + this.applicability = applicability; + return this; + } + + /** + * Get the cores property: Number of cores in CPU. + * + * @return the cores value. + */ + public Integer cores() { + return this.cores; + } + + /** + * Set the cores property: Number of cores in CPU. + * + * @param cores the cores value to set. + * @return the AvailableWorkloadProfileProperties object itself. + */ + public AvailableWorkloadProfileProperties withCores(Integer cores) { + this.cores = cores; + return this; + } + + /** + * Get the memoryGiB property: Memory in GiB. + * + * @return the memoryGiB value. + */ + public Integer memoryGiB() { + return this.memoryGiB; + } + + /** + * Set the memoryGiB property: Memory in GiB. + * + * @param memoryGiB the memoryGiB value to set. + * @return the AvailableWorkloadProfileProperties object itself. + */ + public AvailableWorkloadProfileProperties withMemoryGiB(Integer memoryGiB) { + this.memoryGiB = memoryGiB; + return this; + } + + /** + * Get the displayName property: The everyday name of the workload profile. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: The everyday name of the workload profile. + * + * @param displayName the displayName value to set. + * @return the AvailableWorkloadProfileProperties object itself. + */ + public AvailableWorkloadProfileProperties withDisplayName(String displayName) { + this.displayName = displayName; + 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/AvailableWorkloadProfiles.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfiles.java new file mode 100644 index 000000000000..30eb8fd64ad8 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfiles.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.PagedIterable; +import com.azure.core.util.Context; + +/** Resource collection API of AvailableWorkloadProfiles. */ +public interface AvailableWorkloadProfiles { + /** + * Get available workload profiles by location. + * + *

Get all available workload profiles for a location. + * + * @param location The name of Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all available workload profiles for a location as paginated response with {@link PagedIterable}. + */ + PagedIterable get(String location); + + /** + * Get available workload profiles by location. + * + *

Get all available workload profiles for a location. + * + * @param location The name of Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws 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 all available workload profiles for a location as paginated response with {@link PagedIterable}. + */ + PagedIterable get(String location, Context context); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfilesCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfilesCollection.java new file mode 100644 index 000000000000..a21dfb315cd7 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AvailableWorkloadProfilesCollection.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.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.models.AvailableWorkloadProfileInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of available workload profiles in the location. */ +@Fluent +public final class AvailableWorkloadProfilesCollection { + /* + * Collection of workload profiles. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * Link to next page of resources. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of AvailableWorkloadProfilesCollection class. */ + public AvailableWorkloadProfilesCollection() { + } + + /** + * Get the value property: Collection of workload profiles. + * + * @return the value value. + */ + public List value() { + return this.value; + } + + /** + * Set the value property: Collection of workload profiles. + * + * @param value the value value to set. + * @return the AvailableWorkloadProfilesCollection object itself. + */ + public AvailableWorkloadProfilesCollection 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 AvailableWorkloadProfilesCollection")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(AvailableWorkloadProfilesCollection.class); +} 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..a75e724b450f 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,22 +30,23 @@ 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") private Boolean isAutoProvisioned; + /** Creates an instance of AzureActiveDirectory class. */ + public AzureActiveDirectory() { + } + /** * Get the enabled property: <code>false</code> if the Azure Active Directory provider should not be * enabled despite the set registration; otherwise, <code>true</code>. 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..8f56e461f975 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,20 +12,23 @@ @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; + /** Creates an instance of AzureActiveDirectoryLogin class. */ + public AzureActiveDirectoryLogin() { + } + /** * Get the loginParameters property: Login parameters to send to the OpenID Connect authorization endpoint when a * user logs in. Each parameter must be in the form "key=value". 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..4ce29639d257 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,63 +11,58 @@ @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; + /** Creates an instance of AzureActiveDirectoryRegistration class. */ + public AzureActiveDirectoryRegistration() { + } + /** * Get the openIdIssuer property: The OpenID Connect Issuer URI that represents the entity which issues access * tokens for this application. When using Azure Active Directory, this value is the URI of the directory tenant, 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..8b67f4fdf715 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; @@ -31,6 +29,10 @@ public final class AzureActiveDirectoryValidation { @JsonProperty(value = "defaultAuthorizationPolicy") private DefaultAuthorizationPolicy defaultAuthorizationPolicy; + /** Creates an instance of AzureActiveDirectoryValidation class. */ + public AzureActiveDirectoryValidation() { + } + /** * Get the jwtClaimChecks property: The configuration settings of the checks that should be made while validating * the JWT Claims. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureCredentials.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureCredentials.java index eb34d8a6e001..256228a58237 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureCredentials.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureCredentials.java @@ -34,6 +34,10 @@ public final class AzureCredentials { @JsonProperty(value = "subscriptionId") private String subscriptionId; + /** Creates an instance of AzureCredentials class. */ + public AzureCredentials() { + } + /** * Get the clientId property: Client Id. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureFileProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureFileProperties.java index 837e304feec7..a5aa32a2dc53 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureFileProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureFileProperties.java @@ -34,6 +34,10 @@ public final class AzureFileProperties { @JsonProperty(value = "shareName") private String shareName; + /** Creates an instance of AzureFileProperties class. */ + public AzureFileProperties() { + } + /** * Get the accountName property: Storage account name for azure file. * 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..8d4937e08dc4 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; @@ -23,6 +23,10 @@ public final class AzureStaticWebApps { @JsonProperty(value = "registration") private AzureStaticWebAppsRegistration registration; + /** Creates an instance of AzureStaticWebApps class. */ + public AzureStaticWebApps() { + } + /** * Get the enabled property: <code>false</code> if the Azure Static Web Apps provider should not be * enabled despite the set registration; otherwise, <code>true</code>. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebAppsRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebAppsRegistration.java index 7f9e5de0c2b9..cdb01ec16a07 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebAppsRegistration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/AzureStaticWebAppsRegistration.java @@ -16,6 +16,10 @@ public final class AzureStaticWebAppsRegistration { @JsonProperty(value = "clientId") private String clientId; + /** Creates an instance of AzureStaticWebAppsRegistration class. */ + public AzureStaticWebAppsRegistration() { + } + /** * Get the clientId property: The Client ID of the app used for login. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java new file mode 100644 index 000000000000..d82e18e74af1 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BaseContainer.java @@ -0,0 +1,216 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Container App base container definition. */ +@Fluent +public class BaseContainer { + /* + * Container image tag. + */ + @JsonProperty(value = "image") + private String image; + + /* + * Custom container name. + */ + @JsonProperty(value = "name") + private String name; + + /* + * Container start command. + */ + @JsonProperty(value = "command") + private List command; + + /* + * Container start command arguments. + */ + @JsonProperty(value = "args") + private List args; + + /* + * Container environment variables. + */ + @JsonProperty(value = "env") + private List env; + + /* + * Container resource requirements. + */ + @JsonProperty(value = "resources") + private ContainerResources resources; + + /* + * Container volume mounts. + */ + @JsonProperty(value = "volumeMounts") + private List volumeMounts; + + /** Creates an instance of BaseContainer class. */ + public BaseContainer() { + } + + /** + * Get the image property: Container image tag. + * + * @return the image value. + */ + public String image() { + return this.image; + } + + /** + * Set the image property: Container image tag. + * + * @param image the image value to set. + * @return the BaseContainer object itself. + */ + public BaseContainer withImage(String image) { + this.image = image; + return this; + } + + /** + * Get the name property: Custom container name. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Custom container name. + * + * @param name the name value to set. + * @return the BaseContainer object itself. + */ + public BaseContainer withName(String name) { + this.name = name; + return this; + } + + /** + * Get the command property: Container start command. + * + * @return the command value. + */ + public List command() { + return this.command; + } + + /** + * Set the command property: Container start command. + * + * @param command the command value to set. + * @return the BaseContainer object itself. + */ + public BaseContainer withCommand(List command) { + this.command = command; + return this; + } + + /** + * Get the args property: Container start command arguments. + * + * @return the args value. + */ + public List args() { + return this.args; + } + + /** + * Set the args property: Container start command arguments. + * + * @param args the args value to set. + * @return the BaseContainer object itself. + */ + public BaseContainer withArgs(List args) { + this.args = args; + return this; + } + + /** + * Get the env property: Container environment variables. + * + * @return the env value. + */ + public List env() { + return this.env; + } + + /** + * Set the env property: Container environment variables. + * + * @param env the env value to set. + * @return the BaseContainer object itself. + */ + public BaseContainer withEnv(List env) { + this.env = env; + return this; + } + + /** + * Get the resources property: Container resource requirements. + * + * @return the resources value. + */ + public ContainerResources resources() { + return this.resources; + } + + /** + * Set the resources property: Container resource requirements. + * + * @param resources the resources value to set. + * @return the BaseContainer object itself. + */ + public BaseContainer withResources(ContainerResources resources) { + this.resources = resources; + return this; + } + + /** + * Get the volumeMounts property: Container volume mounts. + * + * @return the volumeMounts value. + */ + public List volumeMounts() { + return this.volumeMounts; + } + + /** + * Set the volumeMounts property: Container volume mounts. + * + * @param volumeMounts the volumeMounts value to set. + * @return the BaseContainer object itself. + */ + public BaseContainer withVolumeMounts(List volumeMounts) { + this.volumeMounts = volumeMounts; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (env() != null) { + env().forEach(e -> e.validate()); + } + if (resources() != null) { + resources().validate(); + } + if (volumeMounts() != null) { + volumeMounts().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeter.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeter.java new file mode 100644 index 000000000000..91dbe4dc9194 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeter.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.azure.core.management.ProxyResource; +import com.azure.core.management.SystemData; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** A premium billing meter. */ +@Fluent +public final class BillingMeter extends ProxyResource { + /* + * Region for the billing meter. + */ + @JsonProperty(value = "location") + private String location; + + /* + * Revision resource specific properties + */ + @JsonProperty(value = "properties") + private BillingMeterProperties properties; + + /* + * Azure Resource Manager metadata containing createdBy and modifiedBy information. + */ + @JsonProperty(value = "systemData", access = JsonProperty.Access.WRITE_ONLY) + private SystemData systemData; + + /** Creates an instance of BillingMeter class. */ + public BillingMeter() { + } + + /** + * Get the location property: Region for the billing meter. + * + * @return the location value. + */ + public String location() { + return this.location; + } + + /** + * Set the location property: Region for the billing meter. + * + * @param location the location value to set. + * @return the BillingMeter object itself. + */ + public BillingMeter withLocation(String location) { + this.location = location; + return this; + } + + /** + * Get the properties property: Revision resource specific properties. + * + * @return the properties value. + */ + public BillingMeterProperties properties() { + return this.properties; + } + + /** + * Set the properties property: Revision resource specific properties. + * + * @param properties the properties value to set. + * @return the BillingMeter object itself. + */ + public BillingMeter withProperties(BillingMeterProperties 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/models/BillingMeterCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterCollection.java new file mode 100644 index 000000000000..167deef302ed --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterCollection.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.models; + +import com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner; +import java.util.List; + +/** An immutable client-side representation of BillingMeterCollection. */ +public interface BillingMeterCollection { + /** + * Gets the value property: Collection of billing meters. + * + * @return the value value. + */ + List value(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.BillingMeterCollectionInner object. + * + * @return the inner object. + */ + BillingMeterCollectionInner innerModel(); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterProperties.java new file mode 100644 index 000000000000..d60049b6b205 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeterProperties.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; + +/** Revision resource specific properties. */ +@Fluent +public final class BillingMeterProperties { + /* + * Used to map workload profile types to billing meter. + */ + @JsonProperty(value = "category") + private Category category; + + /* + * Billing meter type. + */ + @JsonProperty(value = "meterType") + private String meterType; + + /* + * The everyday name of the billing meter. + */ + @JsonProperty(value = "displayName") + private String displayName; + + /** Creates an instance of BillingMeterProperties class. */ + public BillingMeterProperties() { + } + + /** + * Get the category property: Used to map workload profile types to billing meter. + * + * @return the category value. + */ + public Category category() { + return this.category; + } + + /** + * Set the category property: Used to map workload profile types to billing meter. + * + * @param category the category value to set. + * @return the BillingMeterProperties object itself. + */ + public BillingMeterProperties withCategory(Category category) { + this.category = category; + return this; + } + + /** + * Get the meterType property: Billing meter type. + * + * @return the meterType value. + */ + public String meterType() { + return this.meterType; + } + + /** + * Set the meterType property: Billing meter type. + * + * @param meterType the meterType value to set. + * @return the BillingMeterProperties object itself. + */ + public BillingMeterProperties withMeterType(String meterType) { + this.meterType = meterType; + return this; + } + + /** + * Get the displayName property: The everyday name of the billing meter. + * + * @return the displayName value. + */ + public String displayName() { + return this.displayName; + } + + /** + * Set the displayName property: The everyday name of the billing meter. + * + * @param displayName the displayName value to set. + * @return the BillingMeterProperties object itself. + */ + public BillingMeterProperties withDisplayName(String displayName) { + this.displayName = displayName; + 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/BillingMeters.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeters.java new file mode 100644 index 000000000000..c67c45e0e69d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BillingMeters.java @@ -0,0 +1,40 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.http.rest.Response; +import com.azure.core.util.Context; + +/** Resource collection API of BillingMeters. */ +public interface BillingMeters { + /** + * Get billing meters by location. + * + *

Get all billingMeters for a location. + * + * @param location The name of Azure region. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all billingMeters for a location along with {@link Response}. + */ + Response getWithResponse(String location, Context context); + + /** + * Get billing meters by location. + * + *

Get all billingMeters for a location. + * + * @param location The name of Azure region. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return all billingMeters for a location. + */ + BillingMeterCollection get(String location); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BindingType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BindingType.java index 69780955f149..675cbf07a216 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BindingType.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/BindingType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for BindingType. */ +/** Custom Domain binding type. */ public final class BindingType extends ExpandableStringEnum { /** Static value Disabled for BindingType. */ public static final BindingType DISABLED = fromString("Disabled"); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Category.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Category.java new file mode 100644 index 000000000000..0d54e4ba911a --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Category.java @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Used to map workload profile types to billing meter. */ +public final class Category extends ExpandableStringEnum { + /** Static value PremiumSkuGeneralPurpose for Category. */ + public static final Category PREMIUM_SKU_GENERAL_PURPOSE = fromString("PremiumSkuGeneralPurpose"); + + /** Static value PremiumSkuMemoryOptimized for Category. */ + public static final Category PREMIUM_SKU_MEMORY_OPTIMIZED = fromString("PremiumSkuMemoryOptimized"); + + /** Static value PremiumSkuComputeOptimized for Category. */ + public static final Category PREMIUM_SKU_COMPUTE_OPTIMIZED = fromString("PremiumSkuComputeOptimized"); + + /** + * Creates or finds a Category from its string representation. + * + * @param name a name to look for. + * @return the corresponding Category. + */ + @JsonCreator + public static Category fromString(String name) { + return fromString(name, Category.class); + } + + /** + * Gets known Category values. + * + * @return known Category values. + */ + public static Collection values() { + return values(Category.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateCollection.java index c87a49d5b2d1..b2d35859d852 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateCollection.java @@ -25,6 +25,10 @@ public final class CertificateCollection { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of CertificateCollection class. */ + public CertificateCollection() { + } + /** * Get the value property: Collection of resources. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificatePatch.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificatePatch.java index 545a780bde5a..f567a5f4f7d8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificatePatch.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificatePatch.java @@ -19,6 +19,10 @@ public final class CertificatePatch { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map tags; + /** Creates an instance of CertificatePatch class. */ + public CertificatePatch() { + } + /** * Get the tags property: Application-specific metadata in the form of key-value pairs. * 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..efc126b11fcb 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 */ @@ -72,6 +79,10 @@ public final class CertificateProperties { @JsonProperty(value = "publicKeyHash", access = JsonProperty.Access.WRITE_ONLY) private String publicKeyHash; + /** Creates an instance of CertificateProperties class. */ + public CertificateProperties() { + } + /** * Get the provisioningState property: Provisioning state of the certificate. * @@ -110,6 +121,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/CertificateProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProvisioningState.java index 010c6954f6a7..af98d56fd8b8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProvisioningState.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CertificateProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for CertificateProvisioningState. */ +/** Provisioning state of the certificate. */ public final class CertificateProvisioningState extends ExpandableStringEnum { /** Static value Succeeded for CertificateProvisioningState. */ public static final CertificateProvisioningState SUCCEEDED = fromString("Succeeded"); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificates.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificates.java index 6da4c95d16f9..7a068f3e8d0b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificates.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Certificates.java @@ -43,13 +43,15 @@ public interface Certificates { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param certificateName Name of the Certificate. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate. + * @return the specified Certificate along with {@link Response}. */ - Certificate get(String resourceGroupName, String environmentName, String certificateName); + Response getWithResponse( + String resourceGroupName, String environmentName, String certificateName, Context context); /** * Get the specified Certificate. @@ -57,15 +59,13 @@ public interface Certificates { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param certificateName Name of the Certificate. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the specified Certificate along with {@link Response}. + * @return the specified Certificate. */ - Response getWithResponse( - String resourceGroupName, String environmentName, String certificateName, Context context); + Certificate get(String resourceGroupName, String environmentName, String certificateName); /** * Deletes the specified Certificate. @@ -73,12 +73,15 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param certificateName Name of the Certificate. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String environmentName, String certificateName); + Response deleteWithResponse( + String resourceGroupName, String environmentName, String certificateName, Context context); /** * Deletes the specified Certificate. @@ -86,15 +89,12 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param certificateName Name of the Certificate. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String environmentName, String certificateName, Context context); + void delete(String resourceGroupName, String environmentName, String certificateName); /** * Get the specified Certificate. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityReason.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityReason.java index 33c8af8b3707..3a44345d05f5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityReason.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityReason.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for CheckNameAvailabilityReason. */ +/** The reason why the given name is not available. */ public final class CheckNameAvailabilityReason extends ExpandableStringEnum { /** Static value Invalid for CheckNameAvailabilityReason. */ public static final CheckNameAvailabilityReason INVALID = fromString("Invalid"); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityRequest.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityRequest.java index d4d09570fe05..ebdac57ca900 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityRequest.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CheckNameAvailabilityRequest.java @@ -22,6 +22,10 @@ public final class CheckNameAvailabilityRequest { @JsonProperty(value = "type") private String type; + /** Creates an instance of CheckNameAvailabilityRequest class. */ + public CheckNameAvailabilityRequest() { + } + /** * Get the name property: The name of the resource for which availability needs to be checked. * 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..9486ee8854e0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientCredentialMethod.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientCredentialMethod.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Defines values for ClientCredentialMethod. */ +/** The method that should be used to authenticate the user. */ public enum ClientCredentialMethod { /** Enum value ClientSecretPost. */ CLIENT_SECRET_POST("ClientSecretPost"); @@ -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)) { @@ -36,6 +39,7 @@ public static ClientCredentialMethod fromString(String value) { return null; } + /** {@inheritDoc} */ @JsonValue @Override public String toString() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientRegistration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientRegistration.java index 394450cf7e59..d8d3cdfcf9ba 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientRegistration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ClientRegistration.java @@ -22,6 +22,10 @@ public final class ClientRegistration { @JsonProperty(value = "clientSecretSettingName") private String clientSecretSettingName; + /** Creates an instance of ClientRegistration class. */ + public ClientRegistration() { + } + /** * Get the clientId property: The Client ID of the app used for login. * 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..230e78772bb1 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; @@ -47,6 +43,16 @@ public final class Configuration { @JsonProperty(value = "dapr") private Dapr dapr; + /* + * Optional. Max inactive revisions a Container App can have. + */ + @JsonProperty(value = "maxInactiveRevisions") + private Integer maxInactiveRevisions; + + /** Creates an instance of Configuration class. */ + public Configuration() { + } + /** * Get the secrets property: Collection of secrets used by a Container app. * @@ -155,6 +161,26 @@ public Configuration withDapr(Dapr dapr) { return this; } + /** + * Get the maxInactiveRevisions property: Optional. Max inactive revisions a Container App can have. + * + * @return the maxInactiveRevisions value. + */ + public Integer maxInactiveRevisions() { + return this.maxInactiveRevisions; + } + + /** + * Set the maxInactiveRevisions property: Optional. Max inactive revisions a Container App can have. + * + * @param maxInactiveRevisions the maxInactiveRevisions value to set. + * @return the Configuration object itself. + */ + public Configuration withMaxInactiveRevisions(Integer maxInactiveRevisions) { + this.maxInactiveRevisions = maxInactiveRevisions; + return this; + } + /** * Validates the instance. * 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..76246c732054 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironment.java @@ -0,0 +1,351 @@ +// Copyright (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 customDomainConfiguration property: Custom domain configuration for the environment. + * + * @return the customDomainConfiguration value. + */ + CustomDomainConfiguration customDomainConfiguration(); + + /** + * Gets the region of the resource. + * + * @return the region of the resource. + */ + Region region(); + + /** + * Gets the name of the resource region. + * + * @return the name of the resource region. + */ + String regionName(); + + /** + * Gets the name of the resource group. + * + * @return the name of the resource group. + */ + String resourceGroupName(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ConnectedEnvironmentInner object. + * + * @return the inner object. + */ + ConnectedEnvironmentInner innerModel(); + + /** The entirety of the ConnectedEnvironment definition. */ + interface Definition + extends DefinitionStages.Blank, + DefinitionStages.WithLocation, + DefinitionStages.WithResourceGroup, + DefinitionStages.WithCreate { + } + /** The 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, + DefinitionStages.WithCustomDomainConfiguration { + /** + * Executes the create request. + * + * @return the created resource. + */ + ConnectedEnvironment create(); + + /** + * Executes the create request. + * + * @param context The context to associate with this operation. + * @return the created resource. + */ + ConnectedEnvironment create(Context context); + } + /** The stage of the ConnectedEnvironment definition allowing to specify tags. */ + 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); + } + /** The stage of the ConnectedEnvironment definition allowing to specify customDomainConfiguration. */ + interface WithCustomDomainConfiguration { + /** + * Specifies the customDomainConfiguration property: Custom domain configuration for the environment. + * + * @param customDomainConfiguration Custom domain configuration for the environment. + * @return the next definition stage. + */ + WithCreate withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration); + } + } + /** + * Begins update for the ConnectedEnvironment resource. + * + * @return the stage of resource update. + */ + ConnectedEnvironment.Update update(); + + /** The template for ConnectedEnvironment update. */ + interface Update + extends UpdateStages.WithTags, + UpdateStages.WithExtendedLocation, + UpdateStages.WithStaticIp, + UpdateStages.WithDaprAIConnectionString, + UpdateStages.WithCustomDomainConfiguration { + /** + * 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); + } + /** The stage of the ConnectedEnvironment update allowing to specify customDomainConfiguration. */ + interface WithCustomDomainConfiguration { + /** + * Specifies the customDomainConfiguration property: Custom domain configuration for the environment. + * + * @param customDomainConfiguration Custom domain configuration for the environment. + * @return the next definition stage. + */ + Update withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration); + } + } + /** + * 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..7b7e7fcb9144 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentCollection.java @@ -0,0 +1,70 @@ +// Copyright (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; + + /** Creates an instance of ConnectedEnvironmentCollection class. */ + public ConnectedEnvironmentCollection() { + } + + /** + * 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..cfb4a1c8867c --- /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; + +/** Provisioning state of the Kubernetes Environment. */ +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..199d8dd7ab4f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ConnectedEnvironmentStorageProperties.java @@ -0,0 +1,53 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Storage properties. */ +@Fluent +public final class ConnectedEnvironmentStorageProperties { + /* + * Azure file properties + */ + @JsonProperty(value = "azureFile") + private AzureFileProperties azureFile; + + /** Creates an instance of ConnectedEnvironmentStorageProperties class. */ + public ConnectedEnvironmentStorageProperties() { + } + + /** + * 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..74729069dd72 --- /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. + * @param context The context to associate with this 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); + + /** + * 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); + + /** + * 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. + * @param context The context to associate with this 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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..e0277e08760b --- /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. + * @param context The context to associate with this 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); +} 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..aa40ae8d3ec6 --- /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. + * @param context The context to associate with this 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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 for ListSecrets Action along with {@link Response}. + */ + Response listSecretsWithResponse( + String resourceGroupName, String connectedEnvironmentName, String componentName, Context context); + + /** + * List secrets for a dapr component. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param connectedEnvironmentName Name of the connected environment. + * @param componentName Name of the Dapr Component. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return dapr component Secrets Collection for ListSecrets Action. + */ + DaprSecretsCollection listSecrets(String resourceGroupName, String connectedEnvironmentName, String componentName); +} 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..0a7d28221974 --- /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. + * @param context The context to associate with this 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 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 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); + + /** + * 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); + + /** + * 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); + + /** + * 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); + + /** + * 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/Container.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java index 8bb7266d9ff0..24556e20cbe2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Container.java @@ -10,212 +10,83 @@ /** Container App container definition. */ @Fluent -public final class Container { - /* - * Container image tag. - */ - @JsonProperty(value = "image") - private String image; - - /* - * Custom container name. - */ - @JsonProperty(value = "name") - private String name; - - /* - * Container start command. - */ - @JsonProperty(value = "command") - private List command; - - /* - * Container start command arguments. - */ - @JsonProperty(value = "args") - private List args; - - /* - * Container environment variables. - */ - @JsonProperty(value = "env") - private List env; - - /* - * Container resource requirements. - */ - @JsonProperty(value = "resources") - private ContainerResources resources; - +public final class Container extends BaseContainer { /* * List of probes for the container. */ @JsonProperty(value = "probes") private List probes; - /* - * Container volume mounts. - */ - @JsonProperty(value = "volumeMounts") - private List volumeMounts; + /** Creates an instance of Container class. */ + public Container() { + } /** - * Get the image property: Container image tag. + * Get the probes property: List of probes for the container. * - * @return the image value. + * @return the probes value. */ - public String image() { - return this.image; + public List probes() { + return this.probes; } /** - * Set the image property: Container image tag. + * Set the probes property: List of probes for the container. * - * @param image the image value to set. + * @param probes the probes value to set. * @return the Container object itself. */ - public Container withImage(String image) { - this.image = image; + public Container withProbes(List probes) { + this.probes = probes; return this; } - /** - * Get the name property: Custom container name. - * - * @return the name value. - */ - public String name() { - return this.name; + /** {@inheritDoc} */ + @Override + public Container withImage(String image) { + super.withImage(image); + return this; } - /** - * Set the name property: Custom container name. - * - * @param name the name value to set. - * @return the Container object itself. - */ + /** {@inheritDoc} */ + @Override public Container withName(String name) { - this.name = name; + super.withName(name); return this; } - /** - * Get the command property: Container start command. - * - * @return the command value. - */ - public List command() { - return this.command; - } - - /** - * Set the command property: Container start command. - * - * @param command the command value to set. - * @return the Container object itself. - */ + /** {@inheritDoc} */ + @Override public Container withCommand(List command) { - this.command = command; + super.withCommand(command); return this; } - /** - * Get the args property: Container start command arguments. - * - * @return the args value. - */ - public List args() { - return this.args; - } - - /** - * Set the args property: Container start command arguments. - * - * @param args the args value to set. - * @return the Container object itself. - */ + /** {@inheritDoc} */ + @Override public Container withArgs(List args) { - this.args = args; + super.withArgs(args); return this; } - /** - * Get the env property: Container environment variables. - * - * @return the env value. - */ - public List env() { - return this.env; - } - - /** - * Set the env property: Container environment variables. - * - * @param env the env value to set. - * @return the Container object itself. - */ + /** {@inheritDoc} */ + @Override public Container withEnv(List env) { - this.env = env; + super.withEnv(env); return this; } - /** - * Get the resources property: Container resource requirements. - * - * @return the resources value. - */ - public ContainerResources resources() { - return this.resources; - } - - /** - * Set the resources property: Container resource requirements. - * - * @param resources the resources value to set. - * @return the Container object itself. - */ + /** {@inheritDoc} */ + @Override public Container withResources(ContainerResources resources) { - this.resources = resources; + super.withResources(resources); return this; } - /** - * Get the probes property: List of probes for the container. - * - * @return the probes value. - */ - public List probes() { - return this.probes; - } - - /** - * Set the probes property: List of probes for the container. - * - * @param probes the probes value to set. - * @return the Container object itself. - */ - public Container withProbes(List probes) { - this.probes = probes; - return this; - } - - /** - * Get the volumeMounts property: Container volume mounts. - * - * @return the volumeMounts value. - */ - public List volumeMounts() { - return this.volumeMounts; - } - - /** - * Set the volumeMounts property: Container volume mounts. - * - * @param volumeMounts the volumeMounts value to set. - * @return the Container object itself. - */ + /** {@inheritDoc} */ + @Override public Container withVolumeMounts(List volumeMounts) { - this.volumeMounts = volumeMounts; + super.withVolumeMounts(volumeMounts); return this; } @@ -224,18 +95,11 @@ public Container withVolumeMounts(List volumeMounts) { * * @throws IllegalArgumentException thrown if the instance is not valid. */ + @Override public void validate() { - if (env() != null) { - env().forEach(e -> e.validate()); - } - if (resources() != null) { - resources().validate(); - } + super.validate(); if (probes() != null) { probes().forEach(e -> e.validate()); } - if (volumeMounts() != null) { - volumeMounts().forEach(e -> e.validate()); - } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerApp.java index 8793ada5e92c..58433c067706 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 @@ -6,6 +6,7 @@ import com.azure.core.http.rest.Response; 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.ContainerAppInner; import java.util.List; @@ -48,6 +49,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. @@ -56,6 +64,13 @@ public interface ContainerApp { */ ManagedServiceIdentity identity(); + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + /** * Gets the provisioningState property: Provisioning state of the Container App. * @@ -64,12 +79,26 @@ 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 workloadProfileType property: Workload profile type to pin for container app execution. + * + * @return the workloadProfileType value. + */ + String workloadProfileType(); + /** * Gets the latestRevisionName property: Name of the latest revision of the Container App. * @@ -112,6 +141,13 @@ public interface ContainerApp { */ List outboundIpAddresses(); + /** + * Gets the eventStreamEndpoint property: The endpoint of the eventstream of the container app. + * + * @return the eventStreamEndpoint value. + */ + String eventStreamEndpoint(); + /** * Gets the region of the resource. * @@ -186,8 +222,11 @@ interface WithResourceGroup { */ interface WithCreate extends DefinitionStages.WithTags, + DefinitionStages.WithExtendedLocation, DefinitionStages.WithIdentity, DefinitionStages.WithManagedEnvironmentId, + DefinitionStages.WithEnvironmentId, + DefinitionStages.WithWorkloadProfileType, DefinitionStages.WithConfiguration, DefinitionStages.WithTemplate { /** @@ -215,6 +254,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 +279,33 @@ 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 workloadProfileType. */ + interface WithWorkloadProfileType { + /** + * Specifies the workloadProfileType property: Workload profile type to pin for container app execution.. + * + * @param workloadProfileType Workload profile type to pin for container app execution. + * @return the next definition stage. + */ + WithCreate withWorkloadProfileType(String workloadProfileType); + } /** The stage of the ContainerApp definition allowing to specify configuration. */ interface WithConfiguration { /** @@ -268,7 +337,9 @@ interface WithTemplate { /** The template for ContainerApp update. */ interface Update extends UpdateStages.WithTags, + UpdateStages.WithExtendedLocation, UpdateStages.WithIdentity, + UpdateStages.WithWorkloadProfileType, UpdateStages.WithConfiguration, UpdateStages.WithTemplate { /** @@ -298,6 +369,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 { /** @@ -310,6 +391,16 @@ interface WithIdentity { */ Update withIdentity(ManagedServiceIdentity identity); } + /** The stage of the ContainerApp update allowing to specify workloadProfileType. */ + interface WithWorkloadProfileType { + /** + * Specifies the workloadProfileType property: Workload profile type to pin for container app execution.. + * + * @param workloadProfileType Workload profile type to pin for container app execution. + * @return the next definition stage. + */ + Update withWorkloadProfileType(String workloadProfileType); + } /** The stage of the ContainerApp update allowing to specify configuration. */ interface WithConfiguration { /** @@ -346,6 +437,20 @@ interface WithTemplate { */ ContainerApp refresh(Context context); + /** + * Analyzes a custom hostname for a Container App. + * + * @param customHostname Custom hostname. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return custom domain analysis along with {@link Response}. + */ + Response listCustomHostnameAnalysisWithResponse( + String customHostname, Context context); + /** * Analyzes a custom hostname for a Container App. * @@ -357,18 +462,16 @@ interface WithTemplate { CustomHostnameAnalysisResult listCustomHostnameAnalysis(); /** - * Analyzes a custom hostname for a Container App. + * List secrets for a container app. * - * @param customHostname Custom hostname. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return custom domain analysis along with {@link Response}. + * @return container App Secrets Collection ARM resource along with {@link Response}. */ - Response listCustomHostnameAnalysisWithResponse( - String customHostname, Context context); + Response listSecretsWithResponse(Context context); /** * List secrets for a container app. @@ -381,14 +484,22 @@ Response listCustomHostnameAnalysisWithResponse( SecretsCollection listSecrets(); /** - * List secrets for a container app. + * Get auth token for a container app. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Secrets Collection ARM resource along with {@link Response}. + * @return auth token for a container app along with {@link Response}. */ - Response listSecretsWithResponse(Context context); + Response getAuthTokenWithResponse(Context context); + + /** + * Get auth token for a container app. + * + * @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 auth token for a container app. + */ + ContainerAppAuthToken getAuthToken(); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppAuthToken.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppAuthToken.java new file mode 100644 index 000000000000..8b00db3906e5 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppAuthToken.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppAuthTokenInner; +import java.time.OffsetDateTime; +import java.util.Map; + +/** An immutable client-side representation of ContainerAppAuthToken. */ +public interface ContainerAppAuthToken { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the token property: Auth token value. + * + * @return the token value. + */ + String token(); + + /** + * Gets the expires property: Token expiration date. + * + * @return the expires value. + */ + OffsetDateTime expires(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppAuthTokenInner object. + * + * @return the inner object. + */ + ContainerAppAuthTokenInner innerModel(); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppCollection.java index daf9f9aed7f6..a84d9ec65676 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppCollection.java @@ -25,6 +25,10 @@ public final class ContainerAppCollection { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of ContainerAppCollection class. */ + public ContainerAppCollection() { + } + /** * Get the value property: Collection of resources. * 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..7b275d050e03 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; @@ -85,6 +77,10 @@ public final class ContainerAppProbe { @JsonProperty(value = "type") private Type type; + /** Creates an instance of ContainerAppProbe class. */ + public ContainerAppProbe() { + } + /** * Get the failureThreshold property: Minimum consecutive failures for the probe to be considered failed after * having succeeded. Defaults to 3. Minimum value is 1. Maximum value is 10. 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..e02fc6655783 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; @@ -43,6 +42,10 @@ public final class ContainerAppProbeHttpGet { @JsonProperty(value = "scheme") private Scheme scheme; + /** Creates an instance of ContainerAppProbeHttpGet class. */ + public ContainerAppProbeHttpGet() { + } + /** * Get the host property: Host name to connect to, defaults to the pod IP. You probably want to set "Host" in * httpHeaders instead. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGetHttpHeadersItem.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGetHttpHeadersItem.java index cc171a18eb50..b722bc0e1365 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGetHttpHeadersItem.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProbeHttpGetHttpHeadersItem.java @@ -23,6 +23,10 @@ public final class ContainerAppProbeHttpGetHttpHeadersItem { @JsonProperty(value = "value", required = true) private String value; + /** Creates an instance of ContainerAppProbeHttpGetHttpHeadersItem class. */ + public ContainerAppProbeHttpGetHttpHeadersItem() { + } + /** * Get the name property: The header field name. * 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..617a498af181 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,12 +17,16 @@ 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; + /** Creates an instance of ContainerAppProbeTcpSocket class. */ + public ContainerAppProbeTcpSocket() { + } + /** * Get the host property: Optional: Host name to connect to, defaults to the pod IP. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProvisioningState.java index 06a070fd6167..f1b0dfdbda2e 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProvisioningState.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ContainerAppProvisioningState. */ +/** Provisioning state of the Container App. */ public final class ContainerAppProvisioningState extends ExpandableStringEnum { /** Static value InProgress for ContainerAppProvisioningState. */ public static final ContainerAppProvisioningState IN_PROGRESS = fromString("InProgress"); @@ -22,6 +22,9 @@ public final class ContainerAppProvisioningState extends ExpandableStringEnum getByResourceGroupWithResponse( + String resourceGroupName, String containerAppName, Context context); /** * Get the properties of a Container App. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. - * @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}. + * @return the properties of a Container App. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String containerAppName, Context context); + ContainerApp getByResourceGroup(String resourceGroupName, String containerAppName); /** * Delete a Container App. @@ -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. @@ -137,6 +141,22 @@ Response getByResourceGroupWithResponse( void update( String resourceGroupName, String containerAppName, ContainerAppInner containerAppEnvelope, Context context); + /** + * Analyzes a custom hostname for a Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param customHostname Custom hostname. + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return custom domain analysis along with {@link Response}. + */ + Response listCustomHostnameAnalysisWithResponse( + String resourceGroupName, String containerAppName, String customHostname, Context context); + /** * Analyzes a custom hostname for a Container App. * @@ -151,20 +171,19 @@ void update( CustomHostnameAnalysisResult listCustomHostnameAnalysis(String resourceGroupName, String containerAppName); /** - * Analyzes a custom hostname for a Container App. + * List secrets for a container app. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. - * @param customHostname Custom hostname. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return custom domain analysis along with {@link Response}. + * @return container App Secrets Collection ARM resource along with {@link Response}. */ - Response listCustomHostnameAnalysisWithResponse( - String resourceGroupName, String containerAppName, String customHostname, Context context); + Response listSecretsWithResponse( + String resourceGroupName, String containerAppName, Context context); /** * List secrets for a container app. @@ -180,20 +199,31 @@ Response listCustomHostnameAnalysisWithResponse( SecretsCollection listSecrets(String resourceGroupName, String containerAppName); /** - * List secrets for a container app. + * Get auth token for a container app. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. - * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request - * is rejected by server. + * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return container App Secrets Collection ARM resource along with {@link Response}. + * @return auth token for a container app along with {@link Response}. */ - Response listSecretsWithResponse( + Response getAuthTokenWithResponse( String resourceGroupName, String containerAppName, Context context); + /** + * Get auth token for a container app. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.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 auth token for a container app. + */ + ContainerAppAuthToken getAuthToken(String resourceGroupName, String containerAppName); + /** * Get the properties of a Container App. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsAuthConfigs.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsAuthConfigs.java index 73736b132e78..09373e21dca1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsAuthConfigs.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsAuthConfigs.java @@ -43,13 +43,15 @@ public interface ContainerAppsAuthConfigs { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AuthConfig of a Container App. + * @return a AuthConfig of a Container App along with {@link Response}. */ - AuthConfig get(String resourceGroupName, String containerAppName, String authConfigName); + Response getWithResponse( + String resourceGroupName, String containerAppName, String authConfigName, Context context); /** * Get a AuthConfig of a Container App. @@ -57,15 +59,13 @@ public interface ContainerAppsAuthConfigs { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a AuthConfig of a Container App along with {@link Response}. + * @return a AuthConfig of a Container App. */ - Response getWithResponse( - String resourceGroupName, String containerAppName, String authConfigName, Context context); + AuthConfig get(String resourceGroupName, String containerAppName, String authConfigName); /** * Delete a Container App AuthConfig. @@ -73,12 +73,15 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String containerAppName, String authConfigName); + Response deleteWithResponse( + String resourceGroupName, String containerAppName, String authConfigName, Context context); /** * Delete a Container App AuthConfig. @@ -86,15 +89,12 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param authConfigName Name of the Container App AuthConfig. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String containerAppName, String authConfigName, Context context); + void delete(String resourceGroupName, String containerAppName, String authConfigName); /** * Get a AuthConfig of a 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..977b6d530baa --- /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. + * @param context The context to associate with this 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 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 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. + * @param context The context to associate with this 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 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 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); + + /** + * 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); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisionReplicas.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisionReplicas.java index 82d3de9d5e54..221ffd8e23ce 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisionReplicas.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisionReplicas.java @@ -16,13 +16,15 @@ public interface ContainerAppsRevisionReplicas { * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @param replicaName Name of the Container App Revision Replica. + * @param context The context to associate with this 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 replica for a Container App Revision. + * @return a replica for a Container App Revision along with {@link Response}. */ - Replica getReplica(String resourceGroupName, String containerAppName, String revisionName, String replicaName); + Response getReplicaWithResponse( + String resourceGroupName, String containerAppName, String revisionName, String replicaName, Context context); /** * Get a replica for a Container App Revision. @@ -31,15 +33,13 @@ public interface ContainerAppsRevisionReplicas { * @param containerAppName Name of the Container App. * @param revisionName Name of the Container App Revision. * @param replicaName Name of the Container App Revision Replica. - * @param context The context to associate with this 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 replica for a Container App Revision along with {@link Response}. + * @return a replica for a Container App Revision. */ - Response getReplicaWithResponse( - String resourceGroupName, String containerAppName, String revisionName, String replicaName, Context context); + Replica getReplica(String resourceGroupName, String containerAppName, String revisionName, String replicaName); /** * List replicas for a Container App Revision. @@ -47,13 +47,15 @@ Response getReplicaWithResponse( * @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 container App Revision Replicas collection ARM resource. + * @return container App Revision Replicas collection ARM resource along with {@link Response}. */ - ReplicaCollection listReplicas(String resourceGroupName, String containerAppName, String revisionName); + Response listReplicasWithResponse( + String resourceGroupName, String containerAppName, String revisionName, Context context); /** * List replicas for a Container App Revision. @@ -61,13 +63,11 @@ Response getReplicaWithResponse( * @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 container App Revision Replicas collection ARM resource along with {@link Response}. + * @return container App Revision Replicas collection ARM resource. */ - Response listReplicasWithResponse( - String resourceGroupName, String containerAppName, String revisionName, Context context); + ReplicaCollection listReplicas(String resourceGroupName, String containerAppName, String revisionName); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisions.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisions.java index 967230379074..4d6a333e6fb6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisions.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsRevisions.java @@ -39,20 +39,6 @@ public interface ContainerAppsRevisions { 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. * @@ -70,7 +56,7 @@ Response getRevisionWithResponse( String resourceGroupName, String containerAppName, String revisionName, Context context); /** - * Activates a revision for a Container App. + * 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. @@ -79,8 +65,9 @@ Response getRevisionWithResponse( * @throws com.azure.resourcemanager.appcontainers.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. */ - void activateRevision(String resourceGroupName, String containerAppName, String revisionName); + Revision getRevision(String resourceGroupName, String containerAppName, String revisionName); /** * Activates a revision for a Container App. @@ -99,7 +86,7 @@ Response activateRevisionWithResponse( String resourceGroupName, String containerAppName, String revisionName, Context context); /** - * Deactivates a revision for a Container App. + * Activates a revision for a Container App. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. @@ -109,7 +96,7 @@ Response activateRevisionWithResponse( * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void deactivateRevision(String resourceGroupName, String containerAppName, String revisionName); + void activateRevision(String resourceGroupName, String containerAppName, String revisionName); /** * Deactivates a revision for a Container App. @@ -128,7 +115,7 @@ Response deactivateRevisionWithResponse( String resourceGroupName, String containerAppName, String revisionName, Context context); /** - * Restarts a revision for a Container App. + * Deactivates a revision for a Container App. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. @@ -138,7 +125,7 @@ Response deactivateRevisionWithResponse( * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. */ - void restartRevision(String resourceGroupName, String containerAppName, String revisionName); + void deactivateRevision(String resourceGroupName, String containerAppName, String revisionName); /** * Restarts a revision for a Container App. @@ -155,4 +142,17 @@ Response deactivateRevisionWithResponse( */ Response restartRevisionWithResponse( String resourceGroupName, String containerAppName, String revisionName, Context context); + + /** + * Restarts a revision for a Container App. + * + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param containerAppName Name of the Container App. + * @param revisionName Name of the Container App Revision. + * @throws IllegalArgumentException thrown if parameters fail the validation. + * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request + * is rejected by server. + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + */ + void restartRevision(String resourceGroupName, String containerAppName, String revisionName); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsSourceControls.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsSourceControls.java index d113787ae751..1506120e596a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsSourceControls.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerAppsSourceControls.java @@ -45,13 +45,15 @@ public interface ContainerAppsSourceControls { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SourceControl of a Container App. + * @return a SourceControl of a Container App along with {@link Response}. */ - SourceControl get(String resourceGroupName, String containerAppName, String sourceControlName); + Response getWithResponse( + String resourceGroupName, String containerAppName, String sourceControlName, Context context); /** * Get a SourceControl of a Container App. @@ -59,15 +61,13 @@ public interface ContainerAppsSourceControls { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param containerAppName Name of the Container App. * @param sourceControlName Name of the Container App SourceControl. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a SourceControl of a Container App along with {@link Response}. + * @return a SourceControl of a Container App. */ - Response getWithResponse( - String resourceGroupName, String containerAppName, String sourceControlName, Context context); + SourceControl get(String resourceGroupName, String containerAppName, String sourceControlName); /** * Delete a Container App SourceControl. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerResources.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerResources.java index a9fc9a6be7df..2daecab42dbe 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerResources.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ContainerResources.java @@ -28,6 +28,10 @@ public final class ContainerResources { @JsonProperty(value = "ephemeralStorage", access = JsonProperty.Access.WRITE_ONLY) private String ephemeralStorage; + /** Creates an instance of ContainerResources class. */ + public ContainerResources() { + } + /** * Get the cpu property: Required CPU in cores, e.g. 0.5. * 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..3eb091b10ed5 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,12 +17,15 @@ 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; + /** Creates an instance of CookieExpiration class. */ + public CookieExpiration() { + } + /** * Get the convention property: The convention used when determining the session cookie's expiration. * 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..defc5483b6e0 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CookieExpirationConvention.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CookieExpirationConvention.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Defines values for CookieExpirationConvention. */ +/** The convention used when determining the session cookie's expiration. */ public enum CookieExpirationConvention { /** Enum value FixedTime. */ FIXED_TIME("FixedTime"), @@ -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)) { @@ -39,6 +42,7 @@ public static CookieExpirationConvention fromString(String value) { return null; } + /** {@inheritDoc} */ @JsonValue @Override public String toString() { 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..c7e9540e075d 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,12 +24,15 @@ 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; + /** Creates an instance of CustomDomain class. */ + public CustomDomain() { + } + /** * Get the name property: Hostname. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomainConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomainConfiguration.java new file mode 100644 index 000000000000..2c403bd755ed --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomDomainConfiguration.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.annotation.Fluent; +import com.azure.core.util.CoreUtils; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.time.OffsetDateTime; + +/** Configuration properties for apps environment custom domain. */ +@Fluent +public final class CustomDomainConfiguration { + /* + * Id used to verify domain name ownership + */ + @JsonProperty(value = "customDomainVerificationId", access = JsonProperty.Access.WRITE_ONLY) + private String customDomainVerificationId; + + /* + * Dns suffix for the environment domain + */ + @JsonProperty(value = "dnsSuffix") + private String dnsSuffix; + + /* + * PFX or PEM blob + */ + @JsonProperty(value = "certificateValue") + private byte[] certificateValue; + + /* + * Certificate password + */ + @JsonProperty(value = "certificatePassword") + private byte[] certificatePassword; + + /* + * Certificate expiration date. + */ + @JsonProperty(value = "expirationDate", access = JsonProperty.Access.WRITE_ONLY) + private OffsetDateTime expirationDate; + + /* + * Certificate thumbprint. + */ + @JsonProperty(value = "thumbprint", access = JsonProperty.Access.WRITE_ONLY) + private String thumbprint; + + /* + * Subject name of the certificate. + */ + @JsonProperty(value = "subjectName", access = JsonProperty.Access.WRITE_ONLY) + private String subjectName; + + /** Creates an instance of CustomDomainConfiguration class. */ + public CustomDomainConfiguration() { + } + + /** + * Get the customDomainVerificationId property: Id used to verify domain name ownership. + * + * @return the customDomainVerificationId value. + */ + public String customDomainVerificationId() { + return this.customDomainVerificationId; + } + + /** + * Get the dnsSuffix property: Dns suffix for the environment domain. + * + * @return the dnsSuffix value. + */ + public String dnsSuffix() { + return this.dnsSuffix; + } + + /** + * Set the dnsSuffix property: Dns suffix for the environment domain. + * + * @param dnsSuffix the dnsSuffix value to set. + * @return the CustomDomainConfiguration object itself. + */ + public CustomDomainConfiguration withDnsSuffix(String dnsSuffix) { + this.dnsSuffix = dnsSuffix; + return this; + } + + /** + * Get the certificateValue property: PFX or PEM blob. + * + * @return the certificateValue value. + */ + public byte[] certificateValue() { + return CoreUtils.clone(this.certificateValue); + } + + /** + * Set the certificateValue property: PFX or PEM blob. + * + * @param certificateValue the certificateValue value to set. + * @return the CustomDomainConfiguration object itself. + */ + public CustomDomainConfiguration withCertificateValue(byte[] certificateValue) { + this.certificateValue = CoreUtils.clone(certificateValue); + return this; + } + + /** + * Get the certificatePassword property: Certificate password. + * + * @return the certificatePassword value. + */ + public byte[] certificatePassword() { + return CoreUtils.clone(this.certificatePassword); + } + + /** + * Set the certificatePassword property: Certificate password. + * + * @param certificatePassword the certificatePassword value to set. + * @return the CustomDomainConfiguration object itself. + */ + public CustomDomainConfiguration withCertificatePassword(byte[] certificatePassword) { + this.certificatePassword = CoreUtils.clone(certificatePassword); + return this; + } + + /** + * Get the expirationDate property: Certificate expiration date. + * + * @return the expirationDate value. + */ + public OffsetDateTime expirationDate() { + return this.expirationDate; + } + + /** + * Get the thumbprint property: Certificate thumbprint. + * + * @return the thumbprint value. + */ + public String thumbprint() { + return this.thumbprint; + } + + /** + * Get the subjectName property: Subject name of the certificate. + * + * @return the subjectName value. + */ + public String subjectName() { + return this.subjectName; + } + + /** + * 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/CustomHostnameAnalysisResult.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResult.java index b2d9b4e1aa66..e80ffbb899cf 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 @@ -75,6 +46,14 @@ public interface CustomHostnameAnalysisResult { */ Boolean hasConflictOnManagedEnvironment(); + /** + * Gets the conflictWithEnvironmentCustomDomain property: <code>true</code> if there is a conflict on + * the Container App's managed environment level custom domain; otherwise, <code>false</code>. + * + * @return the conflictWithEnvironmentCustomDomain value. + */ + Boolean conflictWithEnvironmentCustomDomain(); + /** * Gets the conflictingContainerAppResourceId property: Name of the conflicting Container App on the Managed * Environment if it's within the same subscription. 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..981f2943541f --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo.java @@ -0,0 +1,100 @@ +// Copyright (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; + + /** Creates an instance of CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo class. */ + public CustomHostnameAnalysisResultCustomDomainVerificationFailureInfo() { + } + + /** + * Get the code property: Standardized string to programmatically identify the error. + * + * @return the code value. + */ + public String code() { + 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..8324c64c41af --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem.java @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.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; + + /** Creates an instance of CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem class. */ + public CustomHostnameAnalysisResultCustomDomainVerificationFailureInfoDetailsItem() { + } + + /** + * Get the code property: Standardized string to programmatically identify the error. + * + * @return the code value. + */ + public String code() { + 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..12afd42c402d 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,26 +11,27 @@ @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; + /** Creates an instance of CustomOpenIdConnectProvider class. */ + public CustomOpenIdConnectProvider() { + } + /** * Get the enabled property: <code>false</code> if the custom Open ID provider provider should not be * enabled; otherwise, <code>true</code>. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomScaleRule.java index 077b67eef758..a3adaf102f25 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomScaleRule.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/CustomScaleRule.java @@ -33,6 +33,10 @@ public final class CustomScaleRule { @JsonProperty(value = "auth") private List auth; + /** Creates an instance of CustomScaleRule class. */ + public CustomScaleRule() { + } + /** * Get the type property: Type of the custom scale rule eg: azure-servicebus, redis etc. * 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..9d378cd0ee73 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,35 @@ public final class Dapr { @JsonProperty(value = "appPort") private Integer appPort; + /* + * Dapr max size of http header read buffer in KB to handle when sending multi-KB headers. Default is 65KB. + */ + @JsonProperty(value = "httpReadBufferSize") + private Integer httpReadBufferSize; + + /* + * Increasing max size of request body http and grpc servers parameter in MB to handle uploading of big files. + * Default is 4 MB. + */ + @JsonProperty(value = "httpMaxRequestSize") + private Integer httpMaxRequestSize; + + /* + * Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. + */ + @JsonProperty(value = "logLevel") + private LogLevel logLevel; + + /* + * Enables API logging for the Dapr sidecar + */ + @JsonProperty(value = "enableApiLogging") + private Boolean enableApiLogging; + + /** Creates an instance of Dapr class. */ + public Dapr() { + } + /** * Get the enabled property: Boolean indicating if the Dapr side car is enabled. * @@ -117,6 +145,92 @@ public Dapr withAppPort(Integer appPort) { return this; } + /** + * Get the httpReadBufferSize property: Dapr max size of http header read buffer in KB to handle when sending + * multi-KB headers. Default is 65KB. + * + * @return the httpReadBufferSize value. + */ + public Integer httpReadBufferSize() { + return this.httpReadBufferSize; + } + + /** + * Set the httpReadBufferSize property: Dapr max size of http header read buffer in KB to handle when sending + * multi-KB headers. Default is 65KB. + * + * @param httpReadBufferSize the httpReadBufferSize value to set. + * @return the Dapr object itself. + */ + public Dapr withHttpReadBufferSize(Integer httpReadBufferSize) { + this.httpReadBufferSize = httpReadBufferSize; + return this; + } + + /** + * Get the httpMaxRequestSize property: Increasing max size of request body http and grpc servers parameter in MB to + * handle uploading of big files. Default is 4 MB. + * + * @return the httpMaxRequestSize value. + */ + public Integer httpMaxRequestSize() { + return this.httpMaxRequestSize; + } + + /** + * Set the httpMaxRequestSize property: Increasing max size of request body http and grpc servers parameter in MB to + * handle uploading of big files. Default is 4 MB. + * + * @param httpMaxRequestSize the httpMaxRequestSize value to set. + * @return the Dapr object itself. + */ + public Dapr withHttpMaxRequestSize(Integer httpMaxRequestSize) { + this.httpMaxRequestSize = httpMaxRequestSize; + return this; + } + + /** + * Get the logLevel property: Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. + * Default is info. + * + * @return the logLevel value. + */ + public LogLevel logLevel() { + return this.logLevel; + } + + /** + * Set the logLevel property: Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. + * Default is info. + * + * @param logLevel the logLevel value to set. + * @return the Dapr object itself. + */ + public Dapr withLogLevel(LogLevel logLevel) { + this.logLevel = logLevel; + return this; + } + + /** + * Get the enableApiLogging property: Enables API logging for the Dapr sidecar. + * + * @return the enableApiLogging value. + */ + public Boolean enableApiLogging() { + return this.enableApiLogging; + } + + /** + * Set the enableApiLogging property: Enables API logging for the Dapr sidecar. + * + * @param enableApiLogging the enableApiLogging value to set. + * @return the Dapr object itself. + */ + public Dapr withEnableApiLogging(Boolean enableApiLogging) { + this.enableApiLogging = enableApiLogging; + return this; + } + /** * Validates the instance. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java index b2dd92608005..b8d6168c573d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponent.java @@ -75,6 +75,13 @@ public interface DaprComponent { */ List secrets(); + /** + * Gets the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. + * + * @return the secretStoreComponent value. + */ + String secretStoreComponent(); + /** * Gets the metadata property: Component metadata. * @@ -133,6 +140,7 @@ interface WithCreate DefinitionStages.WithIgnoreErrors, DefinitionStages.WithInitTimeout, DefinitionStages.WithSecrets, + DefinitionStages.WithSecretStoreComponent, DefinitionStages.WithMetadata, DefinitionStages.WithScopes { /** @@ -200,6 +208,16 @@ interface WithSecrets { */ WithCreate withSecrets(List secrets); } + /** The stage of the DaprComponent definition allowing to specify secretStoreComponent. */ + interface WithSecretStoreComponent { + /** + * Specifies the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. + * + * @param secretStoreComponent Name of a Dapr component to retrieve component secrets from. + * @return the next definition stage. + */ + WithCreate withSecretStoreComponent(String secretStoreComponent); + } /** The stage of the DaprComponent definition allowing to specify metadata. */ interface WithMetadata { /** @@ -235,6 +253,7 @@ interface Update UpdateStages.WithIgnoreErrors, UpdateStages.WithInitTimeout, UpdateStages.WithSecrets, + UpdateStages.WithSecretStoreComponent, UpdateStages.WithMetadata, UpdateStages.WithScopes { /** @@ -304,6 +323,16 @@ interface WithSecrets { */ Update withSecrets(List secrets); } + /** The stage of the DaprComponent update allowing to specify secretStoreComponent. */ + interface WithSecretStoreComponent { + /** + * Specifies the secretStoreComponent property: Name of a Dapr component to retrieve component secrets from. + * + * @param secretStoreComponent Name of a Dapr component to retrieve component secrets from. + * @return the next definition stage. + */ + Update withSecretStoreComponent(String secretStoreComponent); + } /** The stage of the DaprComponent update allowing to specify metadata. */ interface WithMetadata { /** @@ -343,22 +372,22 @@ interface WithScopes { /** * List secrets for a dapr component. * + * @param context The context to associate with this operation. + * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection ARM resource. + * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response}. */ - DaprSecretsCollection listSecrets(); + Response listSecretsWithResponse(Context context); /** * List secrets for a dapr component. * - * @param context The context to associate with this operation. - * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @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}. + * @return dapr component Secrets Collection for ListSecrets Action. */ - Response listSecretsWithResponse(Context context); + DaprSecretsCollection listSecrets(); } 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..43295443f0f0 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 @@ -43,13 +43,15 @@ public interface DaprComponents { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component. + * @return a dapr component along with {@link Response}. */ - DaprComponent get(String resourceGroupName, String environmentName, String componentName); + Response getWithResponse( + String resourceGroupName, String environmentName, String componentName, Context context); /** * Get a dapr component. @@ -57,44 +59,46 @@ public interface DaprComponents { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return a dapr component along with {@link Response}. + * @return a dapr component. */ - Response getWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context); + DaprComponent get(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. * @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}. */ - void delete(String resourceGroupName, String environmentName, String componentName); + Response deleteWithResponse( + 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. * @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 environmentName, String componentName, Context context); + void delete(String resourceGroupName, String environmentName, String componentName); /** * List secrets for a dapr component. @@ -102,13 +106,15 @@ Response deleteWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection ARM resource. + * @return dapr component Secrets Collection for ListSecrets Action along with {@link Response}. */ - DaprSecretsCollection listSecrets(String resourceGroupName, String environmentName, String componentName); + Response listSecretsWithResponse( + String resourceGroupName, String environmentName, String componentName, Context context); /** * List secrets for a dapr component. @@ -116,15 +122,13 @@ Response deleteWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Managed Environment. * @param componentName Name of the Dapr Component. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return dapr component Secrets Collection ARM resource along with {@link Response}. + * @return dapr component Secrets Collection for ListSecrets Action. */ - Response listSecretsWithResponse( - String resourceGroupName, String environmentName, String componentName, Context context); + DaprSecretsCollection listSecrets(String resourceGroupName, String environmentName, String componentName); /** * Get a dapr component. @@ -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/DaprComponentsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentsCollection.java index 63269a149f7c..e3d61a519a55 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentsCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DaprComponentsCollection.java @@ -25,6 +25,10 @@ public final class DaprComponentsCollection { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of DaprComponentsCollection class. */ + public DaprComponentsCollection() { + } + /** * Get the value property: Collection of resources. * 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..41e6d4e7d8b3 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,12 +23,15 @@ 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; + /** Creates an instance of DaprMetadata class. */ + public DaprMetadata() { + } + /** * Get the name property: Metadata property name. * 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..701357e0e217 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,19 +12,21 @@ @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; + /** Creates an instance of DefaultAuthorizationPolicy class. */ + public DefaultAuthorizationPolicy() { + } + /** * Get the allowedPrincipals property: The configuration settings of the Azure Active Directory allowed principals. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseError.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseError.java index 0b9fad55cbb0..0fd4fc04d333 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseError.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseError.java @@ -17,6 +17,10 @@ public final class DefaultErrorResponseError extends ManagementError { @JsonProperty(value = "innererror", access = JsonProperty.Access.WRITE_ONLY) private String innererror; + /** Creates an instance of DefaultErrorResponseError class. */ + public DefaultErrorResponseError() { + } + /** * Get the innererror property: More information to debug error. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseErrorException.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseErrorException.java index 5856c94ab91e..9cfd6edb3258 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseErrorException.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DefaultErrorResponseErrorException.java @@ -30,6 +30,7 @@ public DefaultErrorResponseErrorException(String message, HttpResponse response, super(message, response, value); } + /** {@inheritDoc} */ @Override public DefaultErrorResponseError getValue() { return (DefaultErrorResponseError) super.getValue(); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadata.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadata.java new file mode 100644 index 000000000000..70380a029674 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadata.java @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +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; + + /** Creates an instance of DiagnosticDataProviderMetadata class. */ + public DiagnosticDataProviderMetadata() { + } + + /** + * 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..bc385080b743 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataProviderMetadataPropertyBagItem.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Property details. */ +@Fluent +public final class DiagnosticDataProviderMetadataPropertyBagItem { + /* + * Property name + */ + @JsonProperty(value = "name") + private String name; + + /* + * Property value + */ + @JsonProperty(value = "value") + private String value; + + /** Creates an instance of DiagnosticDataProviderMetadataPropertyBagItem class. */ + public DiagnosticDataProviderMetadataPropertyBagItem() { + } + + /** + * 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..1379ab0e2800 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseColumn.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; + +/** 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; + + /** Creates an instance of DiagnosticDataTableResponseColumn class. */ + public DiagnosticDataTableResponseColumn() { + } + + /** + * 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..6d338c3bc35b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticDataTableResponseObject.java @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; +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; + + /** Creates an instance of DiagnosticDataTableResponseObject class. */ + public DiagnosticDataTableResponseObject() { + } + + /** + * 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..b70b85b60500 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticRendering.java @@ -0,0 +1,128 @@ +// Copyright (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; + + /** Creates an instance of DiagnosticRendering class. */ + public DiagnosticRendering() { + } + + /** + * 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..db92218e5f06 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticSupportTopic.java @@ -0,0 +1,54 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Immutable; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** 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; + + /** Creates an instance of DiagnosticSupportTopic class. */ + public DiagnosticSupportTopic() { + } + + /** + * 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..dcfb30eb74e9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDataApiResponse.java @@ -0,0 +1,82 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** 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; + + /** Creates an instance of DiagnosticsDataApiResponse class. */ + public DiagnosticsDataApiResponse() { + } + + /** + * 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..0be766b4afb6 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsDefinition.java @@ -0,0 +1,185 @@ +// Copyright (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; + + /** Creates an instance of DiagnosticsDefinition class. */ + public DiagnosticsDefinition() { + } + + /** + * 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..f0edd43a932b --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsProperties.java @@ -0,0 +1,141 @@ +// Copyright (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; + + /** Creates an instance of DiagnosticsProperties class. */ + public DiagnosticsProperties() { + } + + /** + * 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..899d1bffb395 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DiagnosticsStatus.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** 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; + + /** Creates an instance of DiagnosticsStatus class. */ + public DiagnosticsStatus() { + } + + /** + * 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..be7d141905d1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DnsVerificationTestResult.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/DnsVerificationTestResult.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Defines values for DnsVerificationTestResult. */ +/** DNS verification test result. */ public enum DnsVerificationTestResult { /** Enum value Passed. */ PASSED("Passed"), @@ -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)) { @@ -42,6 +45,7 @@ public static DnsVerificationTestResult fromString(String value) { return null; } + /** {@inheritDoc} */ @JsonValue @Override public String toString() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentAuthToken.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentAuthToken.java new file mode 100644 index 000000000000..10f4f38fd2fe --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentAuthToken.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.management.SystemData; +import com.azure.resourcemanager.appcontainers.fluent.models.EnvironmentAuthTokenInner; +import java.time.OffsetDateTime; +import java.util.Map; + +/** An immutable client-side representation of EnvironmentAuthToken. */ +public interface EnvironmentAuthToken { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the location property: The geo-location where the resource lives. + * + * @return the location value. + */ + String location(); + + /** + * Gets the tags property: Resource tags. + * + * @return the tags value. + */ + Map tags(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the token property: Auth token value. + * + * @return the token value. + */ + String token(); + + /** + * Gets the expires property: Token expiration date. + * + * @return the expires value. + */ + OffsetDateTime expires(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.EnvironmentAuthTokenInner object. + * + * @return the inner object. + */ + EnvironmentAuthTokenInner innerModel(); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentProvisioningState.java index 2c2f4b4c9396..aa7e68f3d523 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentProvisioningState.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for EnvironmentProvisioningState. */ +/** Provisioning state of the Environment. */ public final class EnvironmentProvisioningState extends ExpandableStringEnum { /** Static value Succeeded for EnvironmentProvisioningState. */ public static final EnvironmentProvisioningState SUCCEEDED = fromString("Succeeded"); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentSkuProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentSkuProperties.java new file mode 100644 index 000000000000..63eaf03305c3 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/EnvironmentSkuProperties.java @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Managed Environment resource SKU properties. */ +@Fluent +public final class EnvironmentSkuProperties { + /* + * Name of the Sku. + */ + @JsonProperty(value = "name", required = true) + private SkuName name; + + /** Creates an instance of EnvironmentSkuProperties class. */ + public EnvironmentSkuProperties() { + } + + /** + * Get the name property: Name of the Sku. + * + * @return the name value. + */ + public SkuName name() { + return this.name; + } + + /** + * Set the name property: Name of the Sku. + * + * @param name the name value to set. + * @return the EnvironmentSkuProperties object itself. + */ + public EnvironmentSkuProperties withName(SkuName name) { + this.name = name; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property name in model EnvironmentSkuProperties")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(EnvironmentSkuProperties.class); +} 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..415303a593df 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,12 +23,15 @@ 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; + /** Creates an instance of EnvironmentVar class. */ + public EnvironmentVar() { + } + /** * Get the name property: Environment variable name. * 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..01baaa9fa9f5 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ExtendedLocation.java @@ -0,0 +1,76 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** 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; + + /** Creates an instance of ExtendedLocation class. */ + public ExtendedLocation() { + } + + /** + * Get the name property: The name of the extended location. + * + * @return the name value. + */ + public String name() { + 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..2fa5af06d94d --- /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; + +/** The type of extendedLocation. */ +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..217ee0f35166 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; @@ -36,6 +35,10 @@ public final class Facebook { @JsonProperty(value = "login") private LoginScopes login; + /** Creates an instance of Facebook class. */ + public Facebook() { + } + /** * Get the enabled property: <code>false</code> if the Facebook provider should not be enabled despite * the set registration; otherwise, <code>true</code>. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxy.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxy.java index 6d568be3906d..f60cb05443c4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxy.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxy.java @@ -28,6 +28,10 @@ public final class ForwardProxy { @JsonProperty(value = "customProtoHeaderName") private String customProtoHeaderName; + /** Creates an instance of ForwardProxy class. */ + public ForwardProxy() { + } + /** * Get the convention property: The convention used to determine the url of the request made. * 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..67a969e08129 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxyConvention.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ForwardProxyConvention.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Defines values for ForwardProxyConvention. */ +/** The convention used to determine the url of the request made. */ public enum ForwardProxyConvention { /** Enum value NoProxy. */ NO_PROXY("NoProxy"), @@ -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)) { @@ -42,6 +45,7 @@ public static ForwardProxyConvention fromString(String value) { return null; } + /** {@inheritDoc} */ @JsonValue @Override public String toString() { 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..3cbf2faf2f43 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; @@ -30,6 +29,10 @@ public final class GitHub { @JsonProperty(value = "login") private LoginScopes login; + /** Creates an instance of GitHub class. */ + public GitHub() { + } + /** * Get the enabled property: <code>false</code> if the GitHub provider should not be enabled despite the * set registration; otherwise, <code>true</code>. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GithubActionConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GithubActionConfiguration.java index 79344aadd0a6..18644f901af7 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GithubActionConfiguration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/GithubActionConfiguration.java @@ -58,6 +58,10 @@ public final class GithubActionConfiguration { @JsonProperty(value = "runtimeVersion") private String runtimeVersion; + /** Creates an instance of GithubActionConfiguration class. */ + public GithubActionConfiguration() { + } + /** * Get the registryInfo property: Registry configurations. * 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..9cc8c4a8f625 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,29 +15,29 @@ @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; + /** Creates an instance of GlobalValidation class. */ + public GlobalValidation() { + } + /** * Get the unauthenticatedClientAction property: The action to take when an unauthenticated client attempts to * access the app. 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..2d3054e4162d 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,12 +30,15 @@ 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; + /** Creates an instance of Google class. */ + public Google() { + } + /** * Get the enabled property: <code>false</code> if the Google provider should not be enabled despite the * set registration; otherwise, <code>true</code>. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java index f7dd48a1dc47..1e42b8eb3e4f 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/HttpScaleRule.java @@ -10,7 +10,7 @@ import java.util.List; import java.util.Map; -/** Container App container Custom scaling rule. */ +/** Container App container Http scaling rule. */ @Fluent public final class HttpScaleRule { /* @@ -26,6 +26,10 @@ public final class HttpScaleRule { @JsonProperty(value = "auth") private List auth; + /** Creates an instance of HttpScaleRule class. */ + public HttpScaleRule() { + } + /** * Get the metadata property: Metadata properties to describe http scale rule. * 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..a6b61f3c5d21 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; @@ -32,6 +32,10 @@ public final class HttpSettings { @JsonProperty(value = "forwardProxy") private ForwardProxy forwardProxy; + /** Creates an instance of HttpSettings class. */ + public HttpSettings() { + } + /** * Get the requireHttps property: <code>false</code> if the authentication/authorization responses not * having the HTTPS scheme are permissible; otherwise, <code>true</code>. 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..44e17ed42b3d 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,12 +11,15 @@ @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; + /** Creates an instance of HttpSettingsRoutes class. */ + public HttpSettingsRoutes() { + } + /** * Get the apiPrefix property: The prefix that should precede all the authentication/authorization paths. * 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..923d51db32d8 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,14 +58,17 @@ 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") @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map customOpenIdConnectProviders; + /** Creates an instance of IdentityProviders class. */ + public IdentityProviders() { + } + /** * Get the azureActiveDirectory property: The configuration settings of the Azure Active directory provider. * 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..7d3bce205292 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 @@ -29,6 +29,12 @@ public final class Ingress { @JsonProperty(value = "targetPort") private Integer targetPort; + /* + * Exposed Port in containers for TCP traffic from ingress + */ + @JsonProperty(value = "exposedPort") + private Integer exposedPort; + /* * Ingress transport protocol */ @@ -48,12 +54,22 @@ 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; + /* + * Rules to restrict incoming IP address. + */ + @JsonProperty(value = "ipSecurityRestrictions") + private List ipSecurityRestrictions; + + /** Creates an instance of Ingress class. */ + public Ingress() { + } + /** * Get the fqdn property: Hostname. * @@ -103,6 +119,26 @@ public Ingress withTargetPort(Integer targetPort) { return this; } + /** + * Get the exposedPort property: Exposed Port in containers for TCP traffic from ingress. + * + * @return the exposedPort value. + */ + public Integer exposedPort() { + return this.exposedPort; + } + + /** + * Set the exposedPort property: Exposed Port in containers for TCP traffic from ingress. + * + * @param exposedPort the exposedPort value to set. + * @return the Ingress object itself. + */ + public Ingress withExposedPort(Integer exposedPort) { + this.exposedPort = exposedPort; + return this; + } + /** * Get the transport property: Ingress transport protocol. * @@ -185,6 +221,26 @@ public Ingress withAllowInsecure(Boolean allowInsecure) { return this; } + /** + * Get the ipSecurityRestrictions property: Rules to restrict incoming IP address. + * + * @return the ipSecurityRestrictions value. + */ + public List ipSecurityRestrictions() { + return this.ipSecurityRestrictions; + } + + /** + * Set the ipSecurityRestrictions property: Rules to restrict incoming IP address. + * + * @param ipSecurityRestrictions the ipSecurityRestrictions value to set. + * @return the Ingress object itself. + */ + public Ingress withIpSecurityRestrictions(List ipSecurityRestrictions) { + this.ipSecurityRestrictions = ipSecurityRestrictions; + return this; + } + /** * Validates the instance. * @@ -197,5 +253,8 @@ public void validate() { if (customDomains() != null) { customDomains().forEach(e -> e.validate()); } + if (ipSecurityRestrictions() != null) { + ipSecurityRestrictions().forEach(e -> e.validate()); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressTransportMethod.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressTransportMethod.java index 04e6a2dce294..23fbbd3f6f4d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressTransportMethod.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IngressTransportMethod.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for IngressTransportMethod. */ +/** Ingress transport protocol. */ public final class IngressTransportMethod extends ExpandableStringEnum { /** Static value auto for IngressTransportMethod. */ public static final IngressTransportMethod AUTO = fromString("auto"); @@ -19,6 +19,9 @@ public final class IngressTransportMethod extends ExpandableStringEnum command) { + super.withCommand(command); + return this; + } + + /** {@inheritDoc} */ + @Override + public InitContainer withArgs(List args) { + super.withArgs(args); + return this; + } + + /** {@inheritDoc} */ + @Override + public InitContainer withEnv(List env) { + super.withEnv(env); + return this; + } + + /** {@inheritDoc} */ + @Override + public InitContainer withResources(ContainerResources resources) { + super.withResources(resources); + return this; + } + + /** {@inheritDoc} */ + @Override + public InitContainer withVolumeMounts(List volumeMounts) { + super.withVolumeMounts(volumeMounts); + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + @Override + public void validate() { + super.validate(); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IpSecurityRestrictionRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IpSecurityRestrictionRule.java new file mode 100644 index 000000000000..4c27320473b0 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/IpSecurityRestrictionRule.java @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Rule to restrict incoming IP address. */ +@Fluent +public final class IpSecurityRestrictionRule { + /* + * Name for the IP restriction rule. + */ + @JsonProperty(value = "name", required = true) + private String name; + + /* + * Describe the IP restriction rule that is being sent to the container-app. This is an optional field. + */ + @JsonProperty(value = "description") + private String description; + + /* + * CIDR notation to match incoming IP address + */ + @JsonProperty(value = "ipAddressRange", required = true) + private String ipAddressRange; + + /* + * Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL Allow or ALL Deny + */ + @JsonProperty(value = "action", required = true) + private Action action; + + /** Creates an instance of IpSecurityRestrictionRule class. */ + public IpSecurityRestrictionRule() { + } + + /** + * Get the name property: Name for the IP restriction rule. + * + * @return the name value. + */ + public String name() { + return this.name; + } + + /** + * Set the name property: Name for the IP restriction rule. + * + * @param name the name value to set. + * @return the IpSecurityRestrictionRule object itself. + */ + public IpSecurityRestrictionRule withName(String name) { + this.name = name; + return this; + } + + /** + * Get the description property: Describe the IP restriction rule that is being sent to the container-app. This is + * an optional field. + * + * @return the description value. + */ + public String description() { + return this.description; + } + + /** + * Set the description property: Describe the IP restriction rule that is being sent to the container-app. This is + * an optional field. + * + * @param description the description value to set. + * @return the IpSecurityRestrictionRule object itself. + */ + public IpSecurityRestrictionRule withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get the ipAddressRange property: CIDR notation to match incoming IP address. + * + * @return the ipAddressRange value. + */ + public String ipAddressRange() { + return this.ipAddressRange; + } + + /** + * Set the ipAddressRange property: CIDR notation to match incoming IP address. + * + * @param ipAddressRange the ipAddressRange value to set. + * @return the IpSecurityRestrictionRule object itself. + */ + public IpSecurityRestrictionRule withIpAddressRange(String ipAddressRange) { + this.ipAddressRange = ipAddressRange; + return this; + } + + /** + * Get the action property: Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL + * Allow or ALL Deny. + * + * @return the action value. + */ + public Action action() { + return this.action; + } + + /** + * Set the action property: Allow or Deny rules to determine for incoming IP. Note: Rules can only consist of ALL + * Allow or ALL Deny. + * + * @param action the action value to set. + * @return the IpSecurityRestrictionRule object itself. + */ + public IpSecurityRestrictionRule withAction(Action action) { + this.action = action; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (name() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException("Missing required property name in model IpSecurityRestrictionRule")); + } + if (ipAddressRange() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property ipAddressRange in model IpSecurityRestrictionRule")); + } + if (action() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property action in model IpSecurityRestrictionRule")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(IpSecurityRestrictionRule.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JwtClaimChecks.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JwtClaimChecks.java index 5249e8df6abc..987739c9a185 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JwtClaimChecks.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/JwtClaimChecks.java @@ -23,6 +23,10 @@ public final class JwtClaimChecks { @JsonProperty(value = "allowedClientApplications") private List allowedClientApplications; + /** Creates an instance of JwtClaimChecks class. */ + public JwtClaimChecks() { + } + /** * Get the allowedGroups property: The list of the allowed groups. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogAnalyticsConfiguration.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogAnalyticsConfiguration.java index bc5e22d5005e..bfc2e4c6bc58 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogAnalyticsConfiguration.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogAnalyticsConfiguration.java @@ -22,6 +22,10 @@ public final class LogAnalyticsConfiguration { @JsonProperty(value = "sharedKey") private String sharedKey; + /** Creates an instance of LogAnalyticsConfiguration class. */ + public LogAnalyticsConfiguration() { + } + /** * Get the customerId property: Log analytics customer id. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogLevel.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogLevel.java new file mode 100644 index 000000000000..cd0a46df20da --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LogLevel.java @@ -0,0 +1,44 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Sets the log level for the Dapr sidecar. Allowed values are debug, info, warn, error. Default is info. */ +public final class LogLevel extends ExpandableStringEnum { + /** Static value info for LogLevel. */ + public static final LogLevel INFO = fromString("info"); + + /** Static value debug for LogLevel. */ + public static final LogLevel DEBUG = fromString("debug"); + + /** Static value warn for LogLevel. */ + public static final LogLevel WARN = fromString("warn"); + + /** Static value error for LogLevel. */ + public static final LogLevel ERROR = fromString("error"); + + /** + * Creates or finds a LogLevel from its string representation. + * + * @param name a name to look for. + * @return the corresponding LogLevel. + */ + @JsonCreator + public static LogLevel fromString(String name) { + return fromString(name, LogLevel.class); + } + + /** + * Gets known LogLevel values. + * + * @return known LogLevel values. + */ + public static Collection values() { + return values(LogLevel.class); + } +} 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..2457b6865eb2 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") @@ -47,6 +45,10 @@ public final class Login { @JsonProperty(value = "nonce") private Nonce nonce; + /** Creates an instance of Login class. */ + public Login() { + } + /** * Get the routes property: The routes that specify the endpoints used for login and logout requests. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginRoutes.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginRoutes.java index dd37caa7d177..b46f5243d970 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginRoutes.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginRoutes.java @@ -16,6 +16,10 @@ public final class LoginRoutes { @JsonProperty(value = "logoutEndpoint") private String logoutEndpoint; + /** Creates an instance of LoginRoutes class. */ + public LoginRoutes() { + } + /** * Get the logoutEndpoint property: The endpoint at which a logout request should be made. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginScopes.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginScopes.java index 68009b49fd82..017270ea4dd1 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginScopes.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/LoginScopes.java @@ -17,6 +17,10 @@ public final class LoginScopes { @JsonProperty(value = "scopes") private List scopes; + /** Creates an instance of LoginScopes class. */ + public LoginScopes() { + } + /** * Get the scopes property: A list of the scopes that should be requested while authenticating. * 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..3fb9b640518a 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 @@ -4,10 +4,12 @@ package com.azure.resourcemanager.appcontainers.models; +import com.azure.core.http.rest.Response; 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.ManagedEnvironmentInner; +import java.util.List; import java.util.Map; /** An immutable client-side representation of ManagedEnvironment. */ @@ -47,6 +49,13 @@ public interface ManagedEnvironment { */ Map tags(); + /** + * Gets the sku property: SKU properties of the Environment. + * + * @return the sku value. + */ + EnvironmentSkuProperties sku(); + /** * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. * @@ -120,6 +129,27 @@ public interface ManagedEnvironment { */ Boolean zoneRedundant(); + /** + * Gets the customDomainConfiguration property: Custom domain configuration for the environment. + * + * @return the customDomainConfiguration value. + */ + CustomDomainConfiguration customDomainConfiguration(); + + /** + * Gets the eventStreamEndpoint property: The endpoint of the eventstream of the Environment. + * + * @return the eventStreamEndpoint value. + */ + String eventStreamEndpoint(); + + /** + * Gets the workloadProfiles property: Workload profiles configured for the Managed Environment. + * + * @return the workloadProfiles value. + */ + List workloadProfiles(); + /** * Gets the region of the resource. * @@ -194,11 +224,14 @@ interface WithResourceGroup { */ interface WithCreate extends DefinitionStages.WithTags, + DefinitionStages.WithSku, DefinitionStages.WithDaprAIInstrumentationKey, DefinitionStages.WithDaprAIConnectionString, DefinitionStages.WithVnetConfiguration, DefinitionStages.WithAppLogsConfiguration, - DefinitionStages.WithZoneRedundant { + DefinitionStages.WithZoneRedundant, + DefinitionStages.WithCustomDomainConfiguration, + DefinitionStages.WithWorkloadProfiles { /** * Executes the create request. * @@ -224,6 +257,16 @@ interface WithTags { */ WithCreate withTags(Map tags); } + /** The stage of the ManagedEnvironment definition allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: SKU properties of the Environment.. + * + * @param sku SKU properties of the Environment. + * @return the next definition stage. + */ + WithCreate withSku(EnvironmentSkuProperties sku); + } /** The stage of the ManagedEnvironment definition allowing to specify daprAIInstrumentationKey. */ interface WithDaprAIInstrumentationKey { /** @@ -280,6 +323,26 @@ interface WithZoneRedundant { */ WithCreate withZoneRedundant(Boolean zoneRedundant); } + /** The stage of the ManagedEnvironment definition allowing to specify customDomainConfiguration. */ + interface WithCustomDomainConfiguration { + /** + * Specifies the customDomainConfiguration property: Custom domain configuration for the environment. + * + * @param customDomainConfiguration Custom domain configuration for the environment. + * @return the next definition stage. + */ + WithCreate withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration); + } + /** The stage of the ManagedEnvironment definition allowing to specify workloadProfiles. */ + interface WithWorkloadProfiles { + /** + * Specifies the workloadProfiles property: Workload profiles configured for the Managed Environment.. + * + * @param workloadProfiles Workload profiles configured for the Managed Environment. + * @return the next definition stage. + */ + WithCreate withWorkloadProfiles(List workloadProfiles); + } } /** * Begins update for the ManagedEnvironment resource. @@ -290,7 +353,14 @@ interface WithZoneRedundant { /** The template for ManagedEnvironment update. */ interface Update - extends UpdateStages.WithTags, UpdateStages.WithVnetConfiguration, UpdateStages.WithAppLogsConfiguration { + extends UpdateStages.WithTags, + UpdateStages.WithSku, + UpdateStages.WithDaprAIInstrumentationKey, + UpdateStages.WithDaprAIConnectionString, + UpdateStages.WithVnetConfiguration, + UpdateStages.WithAppLogsConfiguration, + UpdateStages.WithCustomDomainConfiguration, + UpdateStages.WithWorkloadProfiles { /** * Executes the update request. * @@ -318,6 +388,40 @@ interface WithTags { */ Update withTags(Map tags); } + /** The stage of the ManagedEnvironment update allowing to specify sku. */ + interface WithSku { + /** + * Specifies the sku property: SKU properties of the Environment.. + * + * @param sku SKU properties of the Environment. + * @return the next definition stage. + */ + Update withSku(EnvironmentSkuProperties sku); + } + /** 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 { /** @@ -340,6 +444,26 @@ interface WithAppLogsConfiguration { */ Update withAppLogsConfiguration(AppLogsConfiguration appLogsConfiguration); } + /** The stage of the ManagedEnvironment update allowing to specify customDomainConfiguration. */ + interface WithCustomDomainConfiguration { + /** + * Specifies the customDomainConfiguration property: Custom domain configuration for the environment. + * + * @param customDomainConfiguration Custom domain configuration for the environment. + * @return the next definition stage. + */ + Update withCustomDomainConfiguration(CustomDomainConfiguration customDomainConfiguration); + } + /** The stage of the ManagedEnvironment update allowing to specify workloadProfiles. */ + interface WithWorkloadProfiles { + /** + * Specifies the workloadProfiles property: Workload profiles configured for the Managed Environment.. + * + * @param workloadProfiles Workload profiles configured for the Managed Environment. + * @return the next definition stage. + */ + Update withWorkloadProfiles(List workloadProfiles); + } } /** * Refreshes the resource to sync with Azure. @@ -355,4 +479,30 @@ interface WithAppLogsConfiguration { * @return the refreshed resource. */ ManagedEnvironment refresh(Context context); + + /** + * Get auth token for a managed environment + * + *

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

Checks if resource name is available. + * + * @throws com.azure.resourcemanager.appcontainers.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 environment Auth Token. + */ + EnvironmentAuthToken getAuthToken(); } 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..b3e3c06ab879 --- /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. + * @param context The context to associate with this 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 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 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); + + /** + * 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); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentOutBoundType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentOutBoundType.java new file mode 100644 index 000000000000..dc5d155af761 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentOutBoundType.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Outbound type for the cluster. */ +public final class ManagedEnvironmentOutBoundType extends ExpandableStringEnum { + /** Static value LoadBalancer for ManagedEnvironmentOutBoundType. */ + public static final ManagedEnvironmentOutBoundType LOAD_BALANCER = fromString("LoadBalancer"); + + /** Static value UserDefinedRouting for ManagedEnvironmentOutBoundType. */ + public static final ManagedEnvironmentOutBoundType USER_DEFINED_ROUTING = fromString("UserDefinedRouting"); + + /** + * Creates or finds a ManagedEnvironmentOutBoundType from its string representation. + * + * @param name a name to look for. + * @return the corresponding ManagedEnvironmentOutBoundType. + */ + @JsonCreator + public static ManagedEnvironmentOutBoundType fromString(String name) { + return fromString(name, ManagedEnvironmentOutBoundType.class); + } + + /** + * Gets known ManagedEnvironmentOutBoundType values. + * + * @return known ManagedEnvironmentOutBoundType values. + */ + public static Collection values() { + return values(ManagedEnvironmentOutBoundType.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentOutboundSettings.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentOutboundSettings.java new file mode 100644 index 000000000000..73594373fa6e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentOutboundSettings.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; + +/** Configuration used to control the Environment Egress outbound traffic. */ +@Fluent +public final class ManagedEnvironmentOutboundSettings { + /* + * Outbound type for the cluster + */ + @JsonProperty(value = "outBoundType") + private ManagedEnvironmentOutBoundType outBoundType; + + /* + * Virtual Appliance IP used as the Egress controller for the Environment + */ + @JsonProperty(value = "virtualNetworkApplianceIp") + private String virtualNetworkApplianceIp; + + /** Creates an instance of ManagedEnvironmentOutboundSettings class. */ + public ManagedEnvironmentOutboundSettings() { + } + + /** + * Get the outBoundType property: Outbound type for the cluster. + * + * @return the outBoundType value. + */ + public ManagedEnvironmentOutBoundType outBoundType() { + return this.outBoundType; + } + + /** + * Set the outBoundType property: Outbound type for the cluster. + * + * @param outBoundType the outBoundType value to set. + * @return the ManagedEnvironmentOutboundSettings object itself. + */ + public ManagedEnvironmentOutboundSettings withOutBoundType(ManagedEnvironmentOutBoundType outBoundType) { + this.outBoundType = outBoundType; + return this; + } + + /** + * Get the virtualNetworkApplianceIp property: Virtual Appliance IP used as the Egress controller for the + * Environment. + * + * @return the virtualNetworkApplianceIp value. + */ + public String virtualNetworkApplianceIp() { + return this.virtualNetworkApplianceIp; + } + + /** + * Set the virtualNetworkApplianceIp property: Virtual Appliance IP used as the Egress controller for the + * Environment. + * + * @param virtualNetworkApplianceIp the virtualNetworkApplianceIp value to set. + * @return the ManagedEnvironmentOutboundSettings object itself. + */ + public ManagedEnvironmentOutboundSettings withVirtualNetworkApplianceIp(String virtualNetworkApplianceIp) { + this.virtualNetworkApplianceIp = virtualNetworkApplianceIp; + 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/ManagedEnvironmentStorageProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorageProperties.java index 73a910108d3f..047e29ebf282 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorageProperties.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentStorageProperties.java @@ -16,6 +16,10 @@ public final class ManagedEnvironmentStorageProperties { @JsonProperty(value = "azureFile") private AzureFileProperties azureFile; + /** Creates an instance of ManagedEnvironmentStorageProperties class. */ + public ManagedEnvironmentStorageProperties() { + } + /** * Get the azureFile property: Azure file properties. * 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..313f77bd226b 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,35 +67,41 @@ 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. + * @param context The context to associate with this 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. + * @return the properties of a Managed Environment used to host container apps along with {@link Response}. */ - ManagedEnvironment getByResourceGroup(String resourceGroupName, String environmentName); + Response getByResourceGroupWithResponse( + String resourceGroupName, String environmentName, 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. - * @param context The context to associate with this 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}. + * @return the properties of a Managed Environment used to host container apps. */ - Response getByResourceGroupWithResponse( - String resourceGroupName, String environmentName, Context context); + ManagedEnvironment getByResourceGroup(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. @@ -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,75 @@ void update( String resourceGroupName, String environmentName, ManagedEnvironmentInner environmentEnvelope, Context context); /** - * Get the properties of a Managed Environment used to host container apps. + * Get auth token for a managed environment + * + *

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

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

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

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

Get the properties of a Managed Environment used to host container apps. * * @param id the resource ID. * @throws IllegalArgumentException thrown if parameters fail the validation. @@ -152,7 +240,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 +255,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 +268,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/ManagedEnvironmentsCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsCollection.java index 3948eedadd71..a57a3e082679 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsCollection.java @@ -25,6 +25,10 @@ public final class ManagedEnvironmentsCollection { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of ManagedEnvironmentsCollection class. */ + public ManagedEnvironmentsCollection() { + } + /** * Get the value property: Collection of resources. * 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..516893bd6ae0 --- /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. + * @param context The context to associate with this 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); + + /** + * 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); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsStorages.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsStorages.java index 914cd071857e..4ee96342baee 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsStorages.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedEnvironmentsStorages.java @@ -14,28 +14,28 @@ public interface ManagedEnvironmentsStorages { * * @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 all storages for a managedEnvironment. + * @return all storages for a managedEnvironment along with {@link Response}. */ - ManagedEnvironmentStoragesCollection list(String resourceGroupName, String environmentName); + Response listWithResponse( + String resourceGroupName, String environmentName, Context context); /** * Get all storages for a managedEnvironment. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. - * @param context The context to associate with this 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 managedEnvironment along with {@link Response}. + * @return all storages for a managedEnvironment. */ - Response listWithResponse( - String resourceGroupName, String environmentName, Context context); + ManagedEnvironmentStoragesCollection list(String resourceGroupName, String environmentName); /** * Get storage for a managedEnvironment. @@ -43,13 +43,15 @@ Response listWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a managedEnvironment. + * @return storage for a managedEnvironment along with {@link Response}. */ - ManagedEnvironmentStorage get(String resourceGroupName, String environmentName, String storageName); + Response getWithResponse( + String resourceGroupName, String environmentName, String storageName, Context context); /** * Get storage for a managedEnvironment. @@ -57,15 +59,13 @@ Response listWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return storage for a managedEnvironment along with {@link Response}. + * @return storage for a managedEnvironment. */ - Response getWithResponse( - String resourceGroupName, String environmentName, String storageName, Context context); + ManagedEnvironmentStorage get(String resourceGroupName, String environmentName, String storageName); /** * Delete storage for a managedEnvironment. @@ -73,12 +73,15 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. + * @return the {@link Response}. */ - void delete(String resourceGroupName, String environmentName, String storageName); + Response deleteWithResponse( + String resourceGroupName, String environmentName, String storageName, Context context); /** * Delete storage for a managedEnvironment. @@ -86,15 +89,12 @@ Response getWithResponse( * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param environmentName Name of the Environment. * @param storageName Name of the storage. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the {@link Response}. */ - Response deleteWithResponse( - String resourceGroupName, String environmentName, String storageName, Context context); + void delete(String resourceGroupName, String environmentName, String storageName); /** * Get storage for a managedEnvironment. 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..f65a48d3ce27 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. */ @@ -46,6 +44,10 @@ public class ManagedServiceIdentity { @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) private Map userAssignedIdentities; + /** Creates an instance of ManagedServiceIdentity class. */ + public ManagedServiceIdentity() { + } + /** * Get the principalId property: The service principal ID of the system assigned identity. This property will only * be provided for a system assigned identity. diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentityType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentityType.java index a76352c38df3..b06d0fb6ca05 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentityType.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ManagedServiceIdentityType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for ManagedServiceIdentityType. */ +/** Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). */ public final class ManagedServiceIdentityType extends ExpandableStringEnum { /** Static value None for ManagedServiceIdentityType. */ public static final ManagedServiceIdentityType NONE = fromString("None"); 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..bf527d3027b7 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,36 +10,40 @@ /** 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. * @param checkNameAvailabilityRequest The check name availability request. + * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result. + * @return the check availability result along with {@link Response}. */ - CheckNameAvailabilityResponse checkNameAvailability( - String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest); + Response checkNameAvailabilityWithResponse( + String resourceGroupName, + String environmentName, + CheckNameAvailabilityRequest checkNameAvailabilityRequest, + Context context); /** - * 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. * @param checkNameAvailabilityRequest The check name availability request. - * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.appcontainers.models.DefaultErrorResponseErrorException thrown if the request * is rejected by server. * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent. - * @return the check availability result along with {@link Response}. + * @return the check availability result. */ - Response checkNameAvailabilityWithResponse( - String resourceGroupName, - String environmentName, - CheckNameAvailabilityRequest checkNameAvailabilityRequest, - Context context); + CheckNameAvailabilityResponse checkNameAvailability( + String resourceGroupName, String environmentName, CheckNameAvailabilityRequest checkNameAvailabilityRequest); } 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..92dfa219b508 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; @@ -23,6 +23,10 @@ public final class Nonce { @JsonProperty(value = "nonceExpirationInterval") private String nonceExpirationInterval; + /** Creates an instance of Nonce class. */ + public Nonce() { + } + /** * Get the validateNonce property: <code>false</code> if the nonce should not be validated while * completing the login flow; otherwise, <code>true</code>. 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..2331e42f625e 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,12 +17,15 @@ 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; + /** Creates an instance of OpenIdConnectClientCredential class. */ + public OpenIdConnectClientCredential() { + } + /** * Get the method property: The method that should be used to authenticate the user. * 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..08d9bc0e41fd 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,12 +35,15 @@ 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; + /** Creates an instance of OpenIdConnectConfig class. */ + public OpenIdConnectConfig() { + } + /** * Get the authorizationEndpoint property: The endpoint to be used to make an authorization request. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectLogin.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectLogin.java index 2d0d9c6ec738..2d5eeaf03614 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectLogin.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OpenIdConnectLogin.java @@ -23,6 +23,10 @@ public final class OpenIdConnectLogin { @JsonProperty(value = "scopes") private List scopes; + /** Creates an instance of OpenIdConnectLogin class. */ + public OpenIdConnectLogin() { + } + /** * Get the nameClaimType property: The name of the claim that contains the users name. * 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..85683990f70f 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,12 +23,15 @@ 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; + /** Creates an instance of OpenIdConnectRegistration class. */ + public OpenIdConnectRegistration() { + } + /** * Get the clientId property: The client id of the custom Open ID Connect provider. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDisplay.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDisplay.java index cadca9077e2e..2233a26203b5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDisplay.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/OperationDisplay.java @@ -34,6 +34,10 @@ public final class OperationDisplay { @JsonProperty(value = "description") private String description; + /** Creates an instance of OperationDisplay class. */ + public OperationDisplay() { + } + /** * Get the provider property: Resource provider of the operation. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/QueueScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/QueueScaleRule.java index c47f2b4bed00..cfbffd1cecb8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/QueueScaleRule.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/QueueScaleRule.java @@ -29,6 +29,10 @@ public final class QueueScaleRule { @JsonProperty(value = "auth") private List auth; + /** Creates an instance of QueueScaleRule class. */ + public QueueScaleRule() { + } + /** * Get the queueName property: Queue name. * 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..bb5b53a159fa 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,13 +29,16 @@ 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; + /** Creates an instance of RegistryCredentials class. */ + public RegistryCredentials() { + } + /** * Get the server property: Container Registry Server. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryInfo.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryInfo.java index 9b1bd2a3a16d..719abbb378b5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryInfo.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RegistryInfo.java @@ -28,6 +28,10 @@ public final class RegistryInfo { @JsonProperty(value = "registryPassword") private String registryPassword; + /** Creates an instance of RegistryInfo class. */ + public RegistryInfo() { + } + /** * Get the registryUrl property: registry server Url. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaContainer.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaContainer.java index 24b473e1d826..cc5137a779d8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaContainer.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ReplicaContainer.java @@ -40,6 +40,22 @@ public final class ReplicaContainer { @JsonProperty(value = "restartCount") private Integer restartCount; + /* + * Log Stream endpoint + */ + @JsonProperty(value = "logStreamEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String logStreamEndpoint; + + /* + * Container exec endpoint + */ + @JsonProperty(value = "execEndpoint", access = JsonProperty.Access.WRITE_ONLY) + private String execEndpoint; + + /** Creates an instance of ReplicaContainer class. */ + public ReplicaContainer() { + } + /** * Get the name property: The Name of the Container. * @@ -140,6 +156,24 @@ public ReplicaContainer withRestartCount(Integer restartCount) { return this; } + /** + * Get the logStreamEndpoint property: Log Stream endpoint. + * + * @return the logStreamEndpoint value. + */ + public String logStreamEndpoint() { + return this.logStreamEndpoint; + } + + /** + * Get the execEndpoint property: Container exec endpoint. + * + * @return the execEndpoint value. + */ + public String execEndpoint() { + return this.execEndpoint; + } + /** * Validates the instance. * 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..8faab8b965f7 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 @@ -45,6 +45,14 @@ public interface Revision { */ OffsetDateTime createdTime(); + /** + * Gets the lastActiveTime property: Timestamp describing when the revision was last active. Only meaningful when + * revision is inactive. + * + * @return the lastActiveTime value. + */ + OffsetDateTime lastActiveTime(); + /** * Gets the fqdn property: Fully qualified domain name of the revision. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionCollection.java index 4969b570ec39..18b8b90d9908 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionCollection.java @@ -25,6 +25,10 @@ public final class RevisionCollection { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of RevisionCollection class. */ + public RevisionCollection() { + } + /** * Get the value property: Collection of resources. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionHealthState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionHealthState.java index 23bd9205b40c..dc40a43691f8 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionHealthState.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionHealthState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for RevisionHealthState. */ +/** Current health State of the revision. */ public final class RevisionHealthState extends ExpandableStringEnum { /** Static value Healthy for RevisionHealthState. */ public static final RevisionHealthState HEALTHY = fromString("Healthy"); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionProvisioningState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionProvisioningState.java index e34f70978f59..5f5205cd2321 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionProvisioningState.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/RevisionProvisioningState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for RevisionProvisioningState. */ +/** Current provisioning State of the revision. */ public final class RevisionProvisioningState extends ExpandableStringEnum { /** Static value Provisioning for RevisionProvisioningState. */ public static final RevisionProvisioningState PROVISIONING = fromString("Provisioning"); 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..4880d5368288 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; @@ -30,6 +29,10 @@ public final class Scale { @JsonProperty(value = "rules") private List rules; + /** Creates an instance of Scale class. */ + public Scale() { + } + /** * Get the minReplicas property: Optional. Minimum number of container replicas. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRule.java index 363923140cb9..7072b43fc40b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRule.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRule.java @@ -34,6 +34,16 @@ public final class ScaleRule { @JsonProperty(value = "http") private HttpScaleRule http; + /* + * Tcp requests based scaling. + */ + @JsonProperty(value = "tcp") + private TcpScaleRule tcp; + + /** Creates an instance of ScaleRule class. */ + public ScaleRule() { + } + /** * Get the name property: Scale Rule Name. * @@ -114,6 +124,26 @@ public ScaleRule withHttp(HttpScaleRule http) { return this; } + /** + * Get the tcp property: Tcp requests based scaling. + * + * @return the tcp value. + */ + public TcpScaleRule tcp() { + return this.tcp; + } + + /** + * Set the tcp property: Tcp requests based scaling. + * + * @param tcp the tcp value to set. + * @return the ScaleRule object itself. + */ + public ScaleRule withTcp(TcpScaleRule tcp) { + this.tcp = tcp; + return this; + } + /** * Validates the instance. * @@ -129,5 +159,8 @@ public void validate() { if (http() != null) { http().validate(); } + if (tcp() != null) { + tcp().validate(); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRuleAuth.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRuleAuth.java index de5ee74e06ee..417502d90267 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRuleAuth.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/ScaleRuleAuth.java @@ -22,6 +22,10 @@ public final class ScaleRuleAuth { @JsonProperty(value = "triggerParameter") private String triggerParameter; + /** Creates an instance of ScaleRuleAuth class. */ + public ScaleRuleAuth() { + } + /** * Get the secretRef property: Name of the Container App secret from which to pull the auth params. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scheme.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scheme.java index c561ce421911..a6818740846a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scheme.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Scheme.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for Scheme. */ +/** Scheme to use for connecting to the host. Defaults to HTTP. */ public final class Scheme extends ExpandableStringEnum { /** Static value HTTP for Scheme. */ public static final Scheme HTTP = fromString("HTTP"); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Secret.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Secret.java index 92c6faf7e0db..664ee95339c6 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Secret.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Secret.java @@ -22,6 +22,10 @@ public final class Secret { @JsonProperty(value = "value") private String value; + /** Creates an instance of Secret class. */ + public Secret() { + } + /** * Get the name property: Secret Name. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SkuName.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SkuName.java new file mode 100644 index 000000000000..2f9018c8ebff --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SkuName.java @@ -0,0 +1,38 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.util.ExpandableStringEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.util.Collection; + +/** Name of the Sku. */ +public final class SkuName extends ExpandableStringEnum { + /** Static value Consumption for SkuName. */ + public static final SkuName CONSUMPTION = fromString("Consumption"); + + /** Static value Premium for SkuName. */ + public static final SkuName PREMIUM = fromString("Premium"); + + /** + * Creates or finds a SkuName from its string representation. + * + * @param name a name to look for. + * @return the corresponding SkuName. + */ + @JsonCreator + public static SkuName fromString(String name) { + return fromString(name, SkuName.class); + } + + /** + * Gets known SkuName values. + * + * @return known SkuName values. + */ + public static Collection values() { + return values(SkuName.class); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlCollection.java index f2afb0afb903..ba48d5e1579d 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlCollection.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlCollection.java @@ -25,6 +25,10 @@ public final class SourceControlCollection { @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) private String nextLink; + /** Creates an instance of SourceControlCollection class. */ + public SourceControlCollection() { + } + /** * Get the value property: Collection of resources. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlOperationState.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlOperationState.java index efaab9ad14ef..e99c063b3a2a 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlOperationState.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/SourceControlOperationState.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for SourceControlOperationState. */ +/** Current provisioning State of the operation. */ public final class SourceControlOperationState extends ExpandableStringEnum { /** Static value InProgress for SourceControlOperationState. */ public static final SourceControlOperationState IN_PROGRESS = fromString("InProgress"); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/StorageType.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/StorageType.java index 23beb970b46d..e1887e683715 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/StorageType.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/StorageType.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for StorageType. */ +/** Storage type for the volume. If not provided, use EmptyDir. */ public final class StorageType extends ExpandableStringEnum { /** Static value AzureFile for StorageType. */ public static final StorageType AZURE_FILE = fromString("AzureFile"); diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpScaleRule.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpScaleRule.java new file mode 100644 index 000000000000..f297d3d3bf85 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TcpScaleRule.java @@ -0,0 +1,83 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; + +/** Container App container Tcp scaling rule. */ +@Fluent +public final class TcpScaleRule { + /* + * Metadata properties to describe tcp scale rule. + */ + @JsonProperty(value = "metadata") + @JsonInclude(value = JsonInclude.Include.NON_NULL, content = JsonInclude.Include.ALWAYS) + private Map metadata; + + /* + * Authentication secrets for the tcp scale rule. + */ + @JsonProperty(value = "auth") + private List auth; + + /** Creates an instance of TcpScaleRule class. */ + public TcpScaleRule() { + } + + /** + * Get the metadata property: Metadata properties to describe tcp scale rule. + * + * @return the metadata value. + */ + public Map metadata() { + return this.metadata; + } + + /** + * Set the metadata property: Metadata properties to describe tcp scale rule. + * + * @param metadata the metadata value to set. + * @return the TcpScaleRule object itself. + */ + public TcpScaleRule withMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + + /** + * Get the auth property: Authentication secrets for the tcp scale rule. + * + * @return the auth value. + */ + public List auth() { + return this.auth; + } + + /** + * Set the auth property: Authentication secrets for the tcp scale rule. + * + * @param auth the auth value to set. + * @return the TcpScaleRule object itself. + */ + public TcpScaleRule withAuth(List auth) { + this.auth = auth; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (auth() != null) { + auth().forEach(e -> e.validate()); + } + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java index 14758f6e7ba9..e4bc9d02cee2 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Template.java @@ -20,6 +20,12 @@ public final class Template { @JsonProperty(value = "revisionSuffix") private String revisionSuffix; + /* + * List of specialized containers that run before app containers. + */ + @JsonProperty(value = "initContainers") + private List initContainers; + /* * List of container definitions for the Container App. */ @@ -38,6 +44,10 @@ public final class Template { @JsonProperty(value = "volumes") private List volumes; + /** Creates an instance of Template class. */ + public Template() { + } + /** * Get the revisionSuffix property: User friendly suffix that is appended to the revision name. * @@ -58,6 +68,26 @@ public Template withRevisionSuffix(String revisionSuffix) { return this; } + /** + * Get the initContainers property: List of specialized containers that run before app containers. + * + * @return the initContainers value. + */ + public List initContainers() { + return this.initContainers; + } + + /** + * Set the initContainers property: List of specialized containers that run before app containers. + * + * @param initContainers the initContainers value to set. + * @return the Template object itself. + */ + public Template withInitContainers(List initContainers) { + this.initContainers = initContainers; + return this; + } + /** * Get the containers property: List of container definitions for the Container App. * @@ -124,6 +154,9 @@ public Template withVolumes(List volumes) { * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (initContainers() != null) { + initContainers().forEach(e -> e.validate()); + } if (containers() != null) { containers().forEach(e -> e.validate()); } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TrafficWeight.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TrafficWeight.java index b572fe457095..bf509ea5c3ce 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TrafficWeight.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/TrafficWeight.java @@ -34,6 +34,10 @@ public final class TrafficWeight { @JsonProperty(value = "label") private String label; + /** Creates an instance of TrafficWeight class. */ + public TrafficWeight() { + } + /** * Get the revisionName property: Name of a revision. * 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..2cd7a0a5a635 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,19 +11,22 @@ @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; + /** Creates an instance of Twitter class. */ + public Twitter() { + } + /** * Get the enabled property: <code>false</code> if the Twitter provider should not be enabled despite * the set registration; otherwise, <code>true</code>. 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..26f1599daa13 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,13 +19,16 @@ 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") private String consumerSecretSettingName; + /** Creates an instance of TwitterRegistration class. */ + public TwitterRegistration() { + } + /** * Get the consumerKey property: The OAuth 1.0a consumer key of the Twitter application used for sign-in. This * setting is required for enabling Twitter Sign-In. Twitter Sign-In documentation: diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Type.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Type.java index fa69222e8fa1..f6780b693f9b 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Type.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Type.java @@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import java.util.Collection; -/** Defines values for Type. */ +/** The type of probe. */ public final class Type extends ExpandableStringEnum { /** Static value Liveness for Type. */ public static final Type LIVENESS = fromString("Liveness"); 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..0cc5de4ca521 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UnauthenticatedClientActionV2.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UnauthenticatedClientActionV2.java @@ -7,7 +7,7 @@ import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; -/** Defines values for UnauthenticatedClientActionV2. */ +/** The action to take when an unauthenticated client attempts to access the app. */ public enum UnauthenticatedClientActionV2 { /** Enum value RedirectToLoginPage. */ REDIRECT_TO_LOGIN_PAGE("RedirectToLoginPage"), @@ -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)) { @@ -45,6 +48,7 @@ public static UnauthenticatedClientActionV2 fromString(String value) { return null; } + /** {@inheritDoc} */ @JsonValue @Override public String toString() { diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UserAssignedIdentity.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UserAssignedIdentity.java index e6f4577f931c..0078780653c5 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UserAssignedIdentity.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/UserAssignedIdentity.java @@ -23,6 +23,10 @@ public class UserAssignedIdentity { @JsonProperty(value = "clientId", access = JsonProperty.Access.WRITE_ONLY) private UUID clientId; + /** Creates an instance of UserAssignedIdentity class. */ + public UserAssignedIdentity() { + } + /** * Get the principalId property: The principal ID of the assigned identity. * 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..411c85b2c65a 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,61 @@ @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; + /* + * Configuration used to control the Environment Egress outbound traffic + */ + @JsonProperty(value = "outboundSettings") + private ManagedEnvironmentOutboundSettings outboundSettings; + + /** Creates an instance of VnetConfiguration class. */ + public VnetConfiguration() { + } + /** * Get the internal property: Boolean indicating the environment only has an internal load balancer. These - * environments do not have a public static IP resource, 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 +75,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. @@ -194,11 +198,34 @@ public VnetConfiguration withPlatformReservedDnsIp(String platformReservedDnsIp) return this; } + /** + * Get the outboundSettings property: Configuration used to control the Environment Egress outbound traffic. + * + * @return the outboundSettings value. + */ + public ManagedEnvironmentOutboundSettings outboundSettings() { + return this.outboundSettings; + } + + /** + * Set the outboundSettings property: Configuration used to control the Environment Egress outbound traffic. + * + * @param outboundSettings the outboundSettings value to set. + * @return the VnetConfiguration object itself. + */ + public VnetConfiguration withOutboundSettings(ManagedEnvironmentOutboundSettings outboundSettings) { + this.outboundSettings = outboundSettings; + return this; + } + /** * Validates the instance. * * @throws IllegalArgumentException thrown if the instance is not valid. */ public void validate() { + if (outboundSettings() != null) { + outboundSettings().validate(); + } } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Volume.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Volume.java index 8162fe3a7dad..63d746c6e0b4 100644 --- a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Volume.java +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/Volume.java @@ -28,6 +28,10 @@ public final class Volume { @JsonProperty(value = "storageName") private String storageName; + /** Creates an instance of Volume class. */ + public Volume() { + } + /** * Get the name property: Volume name. * 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..d0bcf4169241 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,12 +17,15 @@ 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; + /** Creates an instance of VolumeMount class. */ + public VolumeMount() { + } + /** * Get the volumeName property: This must match the Name of a Volume. * diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfile.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfile.java new file mode 100644 index 000000000000..7f65d679f7e8 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfile.java @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. +// Code generated by Microsoft (R) AutoRest Code Generator. + +package com.azure.resourcemanager.appcontainers.models; + +import com.azure.core.annotation.Fluent; +import com.azure.core.util.logging.ClientLogger; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** Workload profile to scope container app execution. */ +@Fluent +public final class WorkloadProfile { + /* + * Workload profile type for the workloads to run on. + */ + @JsonProperty(value = "workloadProfileType", required = true) + private String workloadProfileType; + + /* + * The minimum capacity. + */ + @JsonProperty(value = "minimumCount", required = true) + private int minimumCount; + + /* + * The maximum capacity. + */ + @JsonProperty(value = "maximumCount", required = true) + private int maximumCount; + + /** Creates an instance of WorkloadProfile class. */ + public WorkloadProfile() { + } + + /** + * Get the workloadProfileType property: Workload profile type for the workloads to run on. + * + * @return the workloadProfileType value. + */ + public String workloadProfileType() { + return this.workloadProfileType; + } + + /** + * Set the workloadProfileType property: Workload profile type for the workloads to run on. + * + * @param workloadProfileType the workloadProfileType value to set. + * @return the WorkloadProfile object itself. + */ + public WorkloadProfile withWorkloadProfileType(String workloadProfileType) { + this.workloadProfileType = workloadProfileType; + return this; + } + + /** + * Get the minimumCount property: The minimum capacity. + * + * @return the minimumCount value. + */ + public int minimumCount() { + return this.minimumCount; + } + + /** + * Set the minimumCount property: The minimum capacity. + * + * @param minimumCount the minimumCount value to set. + * @return the WorkloadProfile object itself. + */ + public WorkloadProfile withMinimumCount(int minimumCount) { + this.minimumCount = minimumCount; + return this; + } + + /** + * Get the maximumCount property: The maximum capacity. + * + * @return the maximumCount value. + */ + public int maximumCount() { + return this.maximumCount; + } + + /** + * Set the maximumCount property: The maximum capacity. + * + * @param maximumCount the maximumCount value to set. + * @return the WorkloadProfile object itself. + */ + public WorkloadProfile withMaximumCount(int maximumCount) { + this.maximumCount = maximumCount; + return this; + } + + /** + * Validates the instance. + * + * @throws IllegalArgumentException thrown if the instance is not valid. + */ + public void validate() { + if (workloadProfileType() == null) { + throw LOGGER + .logExceptionAsError( + new IllegalArgumentException( + "Missing required property workloadProfileType in model WorkloadProfile")); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadProfile.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStates.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStates.java new file mode 100644 index 000000000000..a09c589800a9 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStates.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.WorkloadProfileStatesInner; + +/** An immutable client-side representation of WorkloadProfileStates. */ +public interface WorkloadProfileStates { + /** + * Gets the id property: Fully qualified resource Id for the resource. + * + * @return the id value. + */ + String id(); + + /** + * Gets the name property: The name of the resource. + * + * @return the name value. + */ + String name(); + + /** + * Gets the type property: The type of the resource. + * + * @return the type value. + */ + String type(); + + /** + * Gets the properties property: Workload Profile resource specific properties. + * + * @return the properties value. + */ + WorkloadProfileStatesProperties properties(); + + /** + * Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information. + * + * @return the systemData value. + */ + SystemData systemData(); + + /** + * Gets the inner com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner object. + * + * @return the inner object. + */ + WorkloadProfileStatesInner innerModel(); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesCollection.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesCollection.java new file mode 100644 index 000000000000..b863517afddd --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesCollection.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.azure.core.util.logging.ClientLogger; +import com.azure.resourcemanager.appcontainers.fluent.models.WorkloadProfileStatesInner; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** Collection of workloadProfileStates. */ +@Fluent +public final class WorkloadProfileStatesCollection { + /* + * Collection of resources. + */ + @JsonProperty(value = "value", required = true) + private List value; + + /* + * Link to next page of resources. + */ + @JsonProperty(value = "nextLink", access = JsonProperty.Access.WRITE_ONLY) + private String nextLink; + + /** Creates an instance of WorkloadProfileStatesCollection class. */ + public WorkloadProfileStatesCollection() { + } + + /** + * 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 WorkloadProfileStatesCollection object itself. + */ + public WorkloadProfileStatesCollection 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 WorkloadProfileStatesCollection")); + } else { + value().forEach(e -> e.validate()); + } + } + + private static final ClientLogger LOGGER = new ClientLogger(WorkloadProfileStatesCollection.class); +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesProperties.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesProperties.java new file mode 100644 index 000000000000..f38519788088 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/main/java/com/azure/resourcemanager/appcontainers/models/WorkloadProfileStatesProperties.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; + +/** Workload Profile resource specific properties. */ +@Fluent +public final class WorkloadProfileStatesProperties { + /* + * Minimum count of instances. + */ + @JsonProperty(value = "minimumCount") + private Integer minimumCount; + + /* + * Maximum count of nodes. + */ + @JsonProperty(value = "maximumCount") + private Integer maximumCount; + + /* + * Current count of nodes. + */ + @JsonProperty(value = "currentCount") + private Integer currentCount; + + /** Creates an instance of WorkloadProfileStatesProperties class. */ + public WorkloadProfileStatesProperties() { + } + + /** + * Get the minimumCount property: Minimum count of instances. + * + * @return the minimumCount value. + */ + public Integer minimumCount() { + return this.minimumCount; + } + + /** + * Set the minimumCount property: Minimum count of instances. + * + * @param minimumCount the minimumCount value to set. + * @return the WorkloadProfileStatesProperties object itself. + */ + public WorkloadProfileStatesProperties withMinimumCount(Integer minimumCount) { + this.minimumCount = minimumCount; + return this; + } + + /** + * Get the maximumCount property: Maximum count of nodes. + * + * @return the maximumCount value. + */ + public Integer maximumCount() { + return this.maximumCount; + } + + /** + * Set the maximumCount property: Maximum count of nodes. + * + * @param maximumCount the maximumCount value to set. + * @return the WorkloadProfileStatesProperties object itself. + */ + public WorkloadProfileStatesProperties withMaximumCount(Integer maximumCount) { + this.maximumCount = maximumCount; + return this; + } + + /** + * Get the currentCount property: Current count of nodes. + * + * @return the currentCount value. + */ + public Integer currentCount() { + return this.currentCount; + } + + /** + * Set the currentCount property: Current count of nodes. + * + * @param currentCount the currentCount value to set. + * @return the WorkloadProfileStatesProperties object itself. + */ + public WorkloadProfileStatesProperties withCurrentCount(Integer currentCount) { + this.currentCount = currentCount; + 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/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.java new file mode 100644 index 000000000000..cb3b124a6d1d --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/AvailableWorkloadProfilesGetSamples.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 AvailableWorkloadProfiles Get. */ +public final class AvailableWorkloadProfilesGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/AvailableWorkloadProfiles_Get.json + */ + /** + * Sample code: BillingMeters_Get. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void billingMetersGet(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.availableWorkloadProfiles().get("East US", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.java new file mode 100644 index 000000000000..5a61c09fc519 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/BillingMetersGetSamples.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 BillingMeters Get. */ +public final class BillingMetersGetSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/BillingMeters_Get.json + */ + /** + * Sample code: BillingMeters_Get. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void billingMetersGet(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.billingMeters().getWithResponse("East US", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/CertificatesCreateOrUpdateSamples.java index 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..522f5ec60a7e --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ConnectedEnvironmentsCreateOrUpdateSamples.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.generated; + +import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; + +/** Samples for ConnectedEnvironments CreateOrUpdate. */ +public final class ConnectedEnvironmentsCreateOrUpdateSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-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/") + .withCustomDomainConfiguration( + new CustomDomainConfiguration() + .withDnsSuffix("www.my-name.com") + .withCertificateValue("PFX-or-PEM-blob".getBytes()) + .withCertificatePassword("private key password".getBytes())) + .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..e60fa035af7a 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 @@ -4,6 +4,7 @@ package com.azure.resourcemanager.appcontainers.generated; +import com.azure.resourcemanager.appcontainers.models.Action; import com.azure.resourcemanager.appcontainers.models.AppProtocol; import com.azure.resourcemanager.appcontainers.models.BindingType; import com.azure.resourcemanager.appcontainers.models.Configuration; @@ -11,12 +12,19 @@ import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; +import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeTcpSocket; +import com.azure.resourcemanager.appcontainers.models.ContainerResources; import com.azure.resourcemanager.appcontainers.models.CustomDomain; import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; import com.azure.resourcemanager.appcontainers.models.Dapr; import com.azure.resourcemanager.appcontainers.models.Ingress; +import com.azure.resourcemanager.appcontainers.models.IngressTransportMethod; +import com.azure.resourcemanager.appcontainers.models.InitContainer; +import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; +import com.azure.resourcemanager.appcontainers.models.LogLevel; import com.azure.resourcemanager.appcontainers.models.Scale; import com.azure.resourcemanager.appcontainers.models.ScaleRule; +import com.azure.resourcemanager.appcontainers.models.TcpScaleRule; import com.azure.resourcemanager.appcontainers.models.Template; import com.azure.resourcemanager.appcontainers.models.TrafficWeight; import com.azure.resourcemanager.appcontainers.models.Type; @@ -27,7 +35,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,8 +49,9 @@ 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") + .withWorkloadProfileType("GeneralPurpose") .withConfiguration( new Configuration() .withIngress( @@ -68,10 +77,43 @@ public static void createOrUpdateContainerApp( .withName("www.my-other-name.com") .withBindingType(BindingType.SNI_ENABLED) .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com")))) - .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000))) + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions( + Arrays + .asList( + new IpSecurityRestrictionRule() + .withName("Allow work IP A subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/32") + .withAction(Action.ALLOW), + new IpSecurityRestrictionRule() + .withName("Allow work IP B subnet") + .withDescription( + "Allowing all IP's within the subnet below to access containerapp") + .withIpAddressRange("192.168.1.1/8") + .withAction(Action.ALLOW)))) + .withDapr( + new Dapr() + .withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30) + .withHttpMaxRequestSize(10) + .withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withMaxInactiveRevisions(10)) .withTemplate( new Template() + .withInitContainers( + Arrays + .asList( + new InitContainer() + .withImage("repo/testcontainerApp0:v4") + .withName("testinitcontainerApp0") + .withCommand(Arrays.asList("/bin/sh")) + .withArgs(Arrays.asList("-c", "while true; do echo hello; sleep 10;done")) + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) .withContainers( Arrays .asList( @@ -111,6 +153,67 @@ public static void createOrUpdateContainerApp( .create(); } + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_TcpApp_CreateOrUpdate.json + */ + /** + * Sample code: Create or Update Tcp App. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateTcpApp(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .containerApps() + .define("testcontainerAppTcp") + .withRegion("East US") + .withExistingResourceGroup("rg") + .withEnvironmentId( + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube") + .withConfiguration( + new Configuration() + .withIngress( + new Ingress() + .withExternal(true) + .withTargetPort(3000) + .withExposedPort(4000) + .withTransport(IngressTransportMethod.TCP) + .withTraffic( + Arrays + .asList( + new TrafficWeight() + .withRevisionName("testcontainerAppTcp-ab1234") + .withWeight(100))))) + .withTemplate( + new Template() + .withContainers( + Arrays + .asList( + new Container() + .withImage("repo/testcontainerAppTcp:v1") + .withName("testcontainerAppTcp") + .withProbes( + Arrays + .asList( + new ContainerAppProbe() + .withInitialDelaySeconds(3) + .withPeriodSeconds(3) + .withTcpSocket(new ContainerAppProbeTcpSocket().withPort(8080)) + .withType(Type.LIVENESS))))) + .withScale( + new Scale() + .withMinReplicas(1) + .withMaxReplicas(5) + .withRules( + Arrays + .asList( + new ScaleRule() + .withName("tcpscalingrule") + .withTcp( + new TcpScaleRule() + .withMetadata(mapOf("concurrentConnections", "50"))))))) + .create(); + } + @SuppressWarnings("unchecked") private static Map mapOf(Object... inputs) { Map map = new HashMap<>(); 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/ContainerAppsGetAuthTokenSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.java new file mode 100644 index 000000000000..d12d281193dc --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ContainerAppsGetAuthTokenSamples.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 ContainerApps GetAuthToken. */ +public final class ContainerAppsGetAuthTokenSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ContainerApps_GetAuthToken.json + */ + /** + * Sample code: Get Container App Auth Token. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getContainerAppAuthToken( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.containerApps().getAuthTokenWithResponse("rg", "testcontainerApp0", 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..7c693a2a1f80 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 @@ -6,6 +6,7 @@ import com.azure.core.util.Context; import com.azure.resourcemanager.appcontainers.fluent.models.ContainerAppInner; +import com.azure.resourcemanager.appcontainers.models.Action; import com.azure.resourcemanager.appcontainers.models.AppProtocol; import com.azure.resourcemanager.appcontainers.models.BindingType; import com.azure.resourcemanager.appcontainers.models.Configuration; @@ -13,10 +14,14 @@ import com.azure.resourcemanager.appcontainers.models.ContainerAppProbe; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGet; import com.azure.resourcemanager.appcontainers.models.ContainerAppProbeHttpGetHttpHeadersItem; +import com.azure.resourcemanager.appcontainers.models.ContainerResources; import com.azure.resourcemanager.appcontainers.models.CustomDomain; import com.azure.resourcemanager.appcontainers.models.CustomScaleRule; import com.azure.resourcemanager.appcontainers.models.Dapr; import com.azure.resourcemanager.appcontainers.models.Ingress; +import com.azure.resourcemanager.appcontainers.models.InitContainer; +import com.azure.resourcemanager.appcontainers.models.IpSecurityRestrictionRule; +import com.azure.resourcemanager.appcontainers.models.LogLevel; import com.azure.resourcemanager.appcontainers.models.Scale; import com.azure.resourcemanager.appcontainers.models.ScaleRule; import com.azure.resourcemanager.appcontainers.models.Template; @@ -29,7 +34,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. @@ -70,10 +75,43 @@ public static void patchContainerApp(com.azure.resourcemanager.appcontainers.Con .withName("www.my-other-name.com") .withBindingType(BindingType.SNI_ENABLED) .withCertificateId( - "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com")))) - .withDapr(new Dapr().withEnabled(true).withAppProtocol(AppProtocol.HTTP).withAppPort(3000))) + "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube/certificates/my-certificate-for-my-other-name-dot-com"))) + .withIpSecurityRestrictions( + Arrays + .asList( + new IpSecurityRestrictionRule() + .withName("Allow work IP A subnet") + .withDescription( + "Allowing all IP's within the subnet below to access" + + " containerapp") + .withIpAddressRange("192.168.1.1/32") + .withAction(Action.ALLOW), + new IpSecurityRestrictionRule() + .withName("Allow work IP B subnet") + .withDescription( + "Allowing all IP's within the subnet below to access" + + " containerapp") + .withIpAddressRange("192.168.1.1/8") + .withAction(Action.ALLOW)))) + .withDapr( + new Dapr() + .withEnabled(true) + .withAppProtocol(AppProtocol.HTTP) + .withAppPort(3000) + .withHttpReadBufferSize(30) + .withHttpMaxRequestSize(10) + .withLogLevel(LogLevel.DEBUG) + .withEnableApiLogging(true)) + .withMaxInactiveRevisions(10)) .withTemplate( new Template() + .withInitContainers( + Arrays + .asList( + new InitContainer() + .withImage("repo/testcontainerApp0:v4") + .withName("testinitcontainerApp0") + .withResources(new ContainerResources().withCpu(0.2D).withMemory("100Mi")))) .withContainers( Arrays .asList( 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..ca9c24c4c77b 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,14 +11,14 @@ /** 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_Secrets.json */ /** - * Sample code: Create or update dapr component. + * Sample code: Create or update dapr component with secrets. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void createOrUpdateDaprComponent( + public static void createOrUpdateDaprComponentWithSecrets( com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager .daprComponents() @@ -39,4 +39,34 @@ public static void createOrUpdateDaprComponent( .withScopes(Arrays.asList("container-app-1", "container-app-2")) .create(); } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_CreateOrUpdate_SecretStoreComponent.json + */ + /** + * Sample code: Create or update dapr component with secret store component. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void createOrUpdateDaprComponentWithSecretStoreComponent( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager + .daprComponents() + .define("reddog") + .withExistingManagedEnvironment("examplerg", "myenvironment") + .withComponentType("state.azure.cosmosdb") + .withVersion("v1") + .withIgnoreErrors(false) + .withInitTimeout("50s") + .withSecretStoreComponent("my-secret-store") + .withMetadata( + Arrays + .asList( + new DaprMetadata().withName("url").withValue(""), + new DaprMetadata().withName("database").withValue("itemsDB"), + new DaprMetadata().withName("collection").withValue("items"), + new DaprMetadata().withName("masterkey").withSecretRef("masterkey"))) + .withScopes(Arrays.asList("container-app-1", "container-app-2")) + .create(); + } } 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..43f1c579ea9d 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,14 +9,28 @@ /** 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_SecretStoreComponent.json */ /** - * Sample code: Get Dapr Component. + * Sample code: Get Dapr Component with secret store component. * * @param manager Entry point to ContainerAppsApiManager. */ - public static void getDaprComponent(com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + public static void getDaprComponentWithSecretStoreComponent( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.daprComponents().getWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); + } + + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/DaprComponents_Get_Secrets.json + */ + /** + * Sample code: Get Dapr Component with secrets. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getDaprComponentWithSecrets( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { manager.daprComponents().getWithResponse("examplerg", "myenvironment", "reddog", Context.NONE); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/DaprComponentsListSamples.java index 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..750e5d106db9 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 @@ -5,12 +5,20 @@ package com.azure.resourcemanager.appcontainers.generated; import com.azure.resourcemanager.appcontainers.models.AppLogsConfiguration; +import com.azure.resourcemanager.appcontainers.models.CustomDomainConfiguration; +import com.azure.resourcemanager.appcontainers.models.EnvironmentSkuProperties; import com.azure.resourcemanager.appcontainers.models.LogAnalyticsConfiguration; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentOutBoundType; +import com.azure.resourcemanager.appcontainers.models.ManagedEnvironmentOutboundSettings; +import com.azure.resourcemanager.appcontainers.models.SkuName; +import com.azure.resourcemanager.appcontainers.models.VnetConfiguration; +import com.azure.resourcemanager.appcontainers.models.WorkloadProfile; +import java.util.Arrays; /** 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. @@ -23,13 +31,40 @@ public static void createEnvironments(com.azure.resourcemanager.appcontainers.Co .define("testcontainerenv") .withRegion("East US") .withExistingResourceGroup("examplerg") + .withSku(new EnvironmentSkuProperties().withName(SkuName.PREMIUM)) .withDaprAIConnectionString( "InstrumentationKey=00000000-0000-0000-0000-000000000000;IngestionEndpoint=https://northcentralus-0.in.applicationinsights.azure.com/") + .withVnetConfiguration( + new VnetConfiguration() + .withOutboundSettings( + new ManagedEnvironmentOutboundSettings() + .withOutBoundType(ManagedEnvironmentOutBoundType.USER_DEFINED_ROUTING) + .withVirtualNetworkApplianceIp("192.168.1.20"))) .withAppLogsConfiguration( new AppLogsConfiguration() .withLogAnalyticsConfiguration( new LogAnalyticsConfiguration().withCustomerId("string").withSharedKey("string"))) .withZoneRedundant(true) + .withCustomDomainConfiguration( + new CustomDomainConfiguration() + .withDnsSuffix("www.my-name.com") + .withCertificateValue("PFX-or-PEM-blob".getBytes()) + .withCertificatePassword("private key password".getBytes())) + .withWorkloadProfiles( + Arrays + .asList( + new WorkloadProfile() + .withWorkloadProfileType("GeneralPurpose") + .withMinimumCount(3) + .withMaximumCount(12), + new WorkloadProfile() + .withWorkloadProfileType("MemoryOptimized") + .withMinimumCount(3) + .withMaximumCount(6), + new WorkloadProfile() + .withWorkloadProfileType("ComputeOptimized") + .withMinimumCount(3) + .withMaximumCount(6))) .create(); } } diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsDeleteSamples.java index 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/ManagedEnvironmentsGetAuthTokenSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.java new file mode 100644 index 000000000000..bdf62a7cc8a2 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsGetAuthTokenSamples.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 ManagedEnvironments GetAuthToken. */ +public final class ManagedEnvironmentsGetAuthTokenSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_GetAuthToken.json + */ + /** + * Sample code: Get Managed Environment Auth Token. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void getManagedEnvironmentAuthToken( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironments().getAuthTokenWithResponse("rg", "testenv", 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/ManagedEnvironmentsListWorkloadProfileStatesSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.java new file mode 100644 index 000000000000..5ae4808ba630 --- /dev/null +++ b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsListWorkloadProfileStatesSamples.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 ManagedEnvironments ListWorkloadProfileStates. */ +public final class ManagedEnvironmentsListWorkloadProfileStatesSamples { + /* + * x-ms-original-file: specification/app/resource-manager/Microsoft.App/preview/2022-06-01-preview/examples/ManagedEnvironments_ListWorkloadProfileStates.json + */ + /** + * Sample code: List environments by subscription. + * + * @param manager Entry point to ContainerAppsApiManager. + */ + public static void listEnvironmentsBySubscription( + com.azure.resourcemanager.appcontainers.ContainerAppsApiManager manager) { + manager.managedEnvironments().listWorkloadProfileStates("examplerg", "jlaw-demo1", Context.NONE); + } +} diff --git a/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java b/sdk/appcontainers/azure-resourcemanager-appcontainers/src/samples/java/com/azure/resourcemanager/appcontainers/generated/ManagedEnvironmentsStoragesCreateOrUpdateSamples.java index 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.